Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - TechWarroir

Pages: [1] 2
1
Suggestions & Requests / Re: Module music support
« on: April 01, 2008, 03:07:13 AM »
Man heck i'd be fine with MIDI support. They may not be the best quality, wait are'nt MIDI files completly computer generated, meaning they are the cleanest and clearest more than any studio could ever make (Minus the comparison to the real instrument). Anyways they would be very compact and we are'nt exactly making a production movie here lol. Take the entertainer for example i have a 3:36 version of it that sounds perfect and its only 16K or 6.28K ziped up.

2
Suggestions & Requests / Server brick efficiency
« on: March 18, 2008, 10:03:25 PM »
I ran into a problem recently that brought my building grinding to a hault. I went over the brick limit and after doing some searching i found why. Now i think i might have a way to fix the problem. The problem is that if badspot were to increase the bits so we can have more bricks it would also increase load time, and if you go to over 1mill bricks like i intend to do the load time will be huge. To solve this my idea is to prompt the clients as they enter a server asking them if they would like to automatically save the bricks from the server to there computers for faster loading next time they join. Then as they play on the server and build, everything is saved to a file on there computer. Then when they leave, the server will keep a record of what changes while they are gone and then next time they join the server will only have to send them what has changed while they were gone. Though i do know this would put a load on the servers, i kinda mean this more as an idea for dedicated servers that should have the power to spare. To cut down on memory use maybe allow the server to clear data its holding for clients that have not joined for a set amount of time.

BTW badspot can you put the brick limit as high as you can like maybe a few million bricks or so. i mean i paid money for a game i could build in and now i cant build because there is a limit. dont forget computers are getting better and better every day and i can get over 100,000 bricks on screen at once with no lag on a slow old computer.

3
Modification Help / Dedicated Server
« on: March 12, 2008, 03:35:29 PM »
Ok long story short i am running a dedicated server and i have a program that will restart it every night at midnight and can type commands into the dedicated servers window to. I need a script or command that will save everything on the server to a file (any file) and then a command to load it all back into the server after it restarts. I have searched for 2 hours now on the forums for any such command and i have found none that work i need it badly though.

Thanks in advance.

4
Clan Discussion / Re: Galtech Industries Server Info
« on: March 09, 2008, 09:08:19 PM »
No my idea is that clients can only save what they have built or have build trust to so i dont have noobs coming in and taking our stuff. The last thing i want is to see some noob come along and save the entire build and then host it on they're own server and try to take credit for it and mess with it.

5
Suggestions & Requests / Re: "We demand" List for v9
« on: March 09, 2008, 09:03:21 PM »
I hate to delay it more but. I realy need some doors in v9 that can be password protected. Or a list of people who can enter. And it would be nice if they were part of the new event system. Oh and the only people that can overwrite the doors would be super admins, not admins.

6
Suggestions & Requests / Re: Save list
« on: February 29, 2008, 09:59:04 PM »
Yea the suggestions im making are to badspot as idea for v9 or after.

BTW it would be nice if v9 came out before lego universe. lol

7
Suggestions & Requests / Re: Save list
« on: February 29, 2008, 03:07:20 PM »
Yes i know you can clear bricks from other players but how do you clear them from players that have left the server.

And i do also enjoy destroying the crap (Not the good stuff though) that people leave behind but not everyday and not with the amount i would have to when im running a dedicated server 24/7.

And also another idea i thought of was that we need somthing like a dulicator wand that has the same functions as igob did in tbm. make the duplicator wand a retail version of igob that can cut copy and paste bricks on a baseplate and add a few more options like color all selected and stuff.

Last but not least i would like to be able to disable saving an entire servers bricks as in players cant come in and save the entire build not just the stuff they built. and it would realy be nice if the duplicator wand could be built into the game and allow us to save the bricks it selects.

8
Suggestions & Requests / Save list
« on: February 28, 2008, 11:44:06 PM »
Ok i was hosting a server a while ago and when i got ready to close it for the day i realized that when i save that everything in the server will be saved including all the random crap people came in a build and left. So i was wondering if its posible to make a list of peoples to keep builds from so when we save it only saves bricks from people on that list and does not save all the useless stuff that people came and built and left. That way we could open servers and let noobs in and not have to worry about what they build and leave behind.

Edit: After an hour of work and a fresh instal of blockland i got my player list working right. lol I could never get it to let me clear bricks of people that left the server no idea why but i thought that you could not since mine never worked lol.

9
Clan Discussion / Galtech Industries Server Info
« on: February 22, 2008, 06:11:38 PM »
Server Name: Galtech Industries (Gtech for short)
Build Type: Detailed City Build
Dedicated: Yes
Status: Closed for updates
Blockland Version: v8

* Organized, Pre-Planned Building

* Star Wars Tall Skyscrapers

* Server shut down once a month for maintenance


Now to elaborate on the way things will work, as i said things will be more organized and planned out before building. We would start by asking everyone what they would like to build, then put together groups of people and we will have one person incharge of the construction of the project.  The project by the way will be big it will not be a one day job it will take a while i would like to see full sized structures. For example if we decide to build a stadium i would like to see a jaw droping olympic stadium like stcrucure not a tiny little square with a few chairs lol. So please post now what project you would like to be part of.

Server Rules.
Most of these rules are all common sense but for those who dont have any i will list them.
No Profanity - If its not allowed on public TV its not allowed in my server.
No Put downs - You can joke around with friends but no picking on people you dont know.
No complaining about the music - You will see what i mean when you join. No one is forcing you to join.
No asking for admin, superadmin.
Basicly use good judgment and common sense.
Also i will be enforcing the rules using kick or ban if necessary. Cussing is most likely to get you kicked if you do not stop then a ban will be issued. I will not ban for no reson if i ban you and you think its unfail please PM me.

Password: GTINDN
To join the server you will need to download the attached file GTI Bricks. Download it and change the file extention to zip then extract it.

At the moment i'm not ready to open the server for full building. If you want to come in and have a look around or build a prototype of your build be my geust. I do not plan to open it till after v9 because i need its features and because i need a bit more time to get other stuff ready. Also i restart the server every once and a while to make changes and other stuff so be ready to leave at any time so i can make it as quick as posible. Dont worry about your builds because i save every time before i restart. Just make shure i can find your block otherwise they may not be saved.

To join and be part of a project i would like to know how well you can build, so to find out i would like to se some stuff you have built. Build anything just build somthing and post pics of it here because my server is to full at the moment. Make sure its good and that its able to be made life size once we start to build the real thing.

Here is a list of what i have already made in the city:
Cityhall
Company H.Q.
Airport
Arena (Need a better one)

Here is a list of SOME of the buildings i would like to add to the city:
Hospital
Police Station
Fire Station
Stadium
Theater
Schools
Power Plant
Water Plant
Park
FBI H.Q.
Waste Dump
Library
Phone Office
NASA
Pool
Gymnasium
Misc. Super Tall Sky Scrapers

Businesses to build:
Arcade
Grocery Store
Bowling Alley
Artillery Store
Theater
Zoo

BTW i am open to ideas. But keep them clean. *cough* tails *cough*

10
Suggestions & Requests / Real Sound
« on: February 09, 2008, 03:59:11 PM »
Who wants real sound that fills a room like it would in real life. The current sound goes right through bricks and makes it very cheesy when you have a skyscraper and the sound from the 6th floor goes to the first floor lol. It would realy help if sound was stoped by bricks and doors like JVS doors. Plus it 's hard to make a stadium with music and the music only coves 1/10th of the stadium. Would it be posible for us to set a number on the music brick that changes the range of the sound and the volume.

11
Suggestions & Requests / Re: DTB
« on: November 25, 2007, 12:12:39 AM »
Ok how are DTB weapons any different than the retail weapons there are no logos on them noone would even know.

12
Suggestions & Requests / DTB
« on: November 24, 2007, 03:58:42 PM »
Does anyone here remember this.
http://video.google.com/videoplay?docid=-6823491646853599809

Can anyone here port the weapons from DTB to retail they are almost all open source so it should not be a problem. The TBM site has gone down so i will add a link to it later but for now i thought it would be cool to post the video. Also is there anyone here that can make a system of doors and teleporters that are compatible with Team Deathmatch v4.0 so we can have doors and teleporters that work only for team members.

Also this is a good example of why i want the editor wand back.
http://video.google.com/videoplay?docid=-1380992516914476764

If you dont like the editor wand for whatever handicapped reason i dont give a #%$* you dont have to use it but some people do like it i mainly like the one from TBM and the stuff about the engine ill have to see it to belive it. So far it looks more like you guys that say the engine cant do it are full of hot air. You show me and ill quit asking about it but until then im going to be asking.

13
Suggestions & Requests / Re: More V9 requests
« on: November 18, 2007, 02:08:47 AM »
i just want the brick limits taken away like to bricks inside other bricks, no floating bricks and no building on uneven terrain i hate there limits i want them gone if posible. and ill tell you why, because no building on eneven terrain makes it almost imposible to build on user created maps, no building inside other bricks is just stupid cause it is so dang difficult to build things like skyscrapers with that limit and things that have been rotated, and no floating bricks is just retarted i cant stand it do you have any idea how un realistic that makes the game when im building a skyscraper hello this means when i make a mistake building a wall or inside and need to destroy somthing but i cant becay=use its under another brick even though that brick its supporting is still beeing held up by 7 other walls.

Oh and i need the editor wand but more like the one from tbm and ill tell you why i need that and im shure other people do to. 1. it allows you to rotate things on any axis so i would be able to make the shower heads look more real in my buildings restrooms and also i can make things any size i want so i can make a sink with pipes that make it look like a real sink and i can make better looking beds.

Last but not least we need some doors and switches and i like the JVS doors and teleporters but i need some that can also be opened remotly and more the doors down or to the side like the doors to an aircraft harger and i need them to be admin or team only or anyone kind of switches so i can make a fortress in a battle and have doors that open only for my team.

14
Modification Help / Re: Gun wont work
« on: November 13, 2007, 07:07:04 PM »
Then this is the ammo system script:


$inv[1,0] = nametoID(IonCannonProjectile);         //Projectile
$inv[1,1] = "Ion Cannon Battery";            //Inv Name
$inv[1,2] = "ioncannonbattery";            //Shortcut Name
$inv[1,3] = 1;                       //Amount
$inv[2,0] = nametoID(MinigunProjectile);         //Projectile
$inv[2,1] = "Minigun Ammo Box";            //Inv Name
$inv[2,2] = "minigunammobox";            //Shortcut Name
$inv[2,3] = 500;               //Amount
$inv[3,0] = nametoID(autoLaserProjectile);         //Projectile
$inv[3,1] = "autoLaser Ammo Box";            //Inv Name
$inv[3,2] = "autolaserammobox";            //Shortcut Name
$inv[3,3] = 250;               //Amount
$inv[4,0] = nametoID(flakProjectileA);         //Projectile
$inv[4,1] = "Flak Cannon Ammo Box";            //Inv Name
$inv[4,2] = "flakcannonammobox";            //Shortcut Name
$inv[4,3] = 100;               //Amount
$inv[5,0] = nametoID(flamethrowerProjectile);         //Projectile
$inv[5,1] = "Flamethrower Ammo Box";            //Inv Name
$inv[5,2] = "flamethrowerammobox";            //Shortcut Name
$inv[5,3] = 1000;               //Amount
$invX = 5;

package WeaponAmmo
{
   function GameConnection::CreatePlayer(%this,%a,%b,%c,%d,%e)
   {
      Parent::CreatePlayer(%this,%a,%b,%c,%d,%e);
      for(%i=1;%i<=$invX;%i++)
      {
         for(%j=0;%j<=5;%j++)
         {
            %this.inv[%i,%j] = $inv[%i,%j];
         }
      }
   }

   function WeaponImage::onFire(%this,%obj,%slot)
   {
      if(!%this.ammotype){Parent::onFire(%this,%obj,%slot);return;}
      %client = %obj.client;
      if(%client.ammotype[%this] && %client.inv[%client.ammotype[%this],3])
      {
      echo("Secondary Ammo");
      %projectile = %client.inv[%client.ammotype[%this],0];
          %client.inv[%client.ammotype[%this],3]--;
          commandtoclient(%client,'centerprint',"<just:left>" @ %client.inv[%client.ammotype[%this],1] @ ": " @ %client.inv[%client.ammotype[%this],3],1,1,10);
      }else if(%client.inv[%this.ammotype,3])
      {
       %projectile = %client.inv[%this.ammotype,0];
       %client.inv[%this.ammotype,3]--;
       commandtoclient(%client,'centerprint',"<just:left>" @ %client.inv[%this.ammotype,1] @ ": " @ %client.inv[%this.ammotype,3],1,1,10);
      }
      else{return;}
   
      // Determin initial projectile velocity based on the
      // gun's muzzle point and the object's current velocity
      %muzzleVector = %obj.getMuzzleVector(%slot);
      %objectVelocity = %obj.getVelocity();
      %muzzleVelocity = VectorAdd(
         VectorScale(%muzzleVector, %projectile.muzzleVelocity),
         VectorScale(%objectVelocity, %projectile.velInheritFactor));
   
      // Create the projectile object
      %p = new (%this.projectileType)() {
         dataBlock        = %projectile;
         initialVelocity  = %muzzleVelocity;
         initialPosition  = %obj.getMuzzlePoint(%slot);
         sourceObject     = %obj;
         sourceSlot       = %slot;
         client           = %obj.client;
      };
      MissionCleanup.add(%p);
      return %p;
   }
   
   function WeaponImage::onMount(%this,%obj,%slot)
   {
      Parent::onMount(%this,%obj,%slot);
      %client = %obj.client;
      if(%client.ammotype[%this] && %client.inv[%client.ammotype[%this],3])
      {
       commandtoclient(%client,'centerprint',"<just:left>" @ %client.inv[%client.ammotype[%this],1] @ ": " @ %client.inv[%client.ammotype[%this],3],1,1,10);
      }else if(%client.inv[%this.ammotype,3])
      {
       commandtoclient(%client,'centerprint',"<just:left>" @ %client.inv[%this.ammotype,1] @ ": " @ %client.inv[%this.ammotype,3],1,1,10);
      }
      else{return;}
   }
   
   function GameConnection::onDeath(%this,%a,%b,%c,%d)
   {
      makeitem(AmmoItem,%this.player.position);
      Parent::onDeath(%this,%a,%b,%c,%d);
   }
};
activatePackage(WeaponAmmo);

ioncannonImage.ammotype = 1;
minigunImage.ammotype = 2;
autolaserImage.ammotype = 3;
flakImage.ammotype = 4;
flamethrowerImage.ammotype = 5;

function servercmdInv(%client)
{
   messageclient(%client,"","\c5Inventory List:");
   for(%i=1;%i<=$invX;%i++)
   {
      if(%client.inv[%i,3] > 0)
      {
         messageclient(%client,"","\c5" @ %client.inv[%i,1] @ "\c0 (" @ %client.inv[%i,2] @ ") \c5x" @ %client.inv[%i,3]);
      }
   }
}

function servercmdUse(%client,%name)
{
   for(%i=1;%i<=$invX;%i++)
   {
      if(%client.inv[%i,2] $= %name && %client.inv[%i,3] > 0)
      {
         echo("Found1");
         if(%client.inv[%i,4] !$= "")
         {
            echo("Found2");
            %client.ammotype[%client.inv[%i,4]] = %i;
            messageclient(%client,"","\c0" @ %client.inv[%i,5] @ " \c5ammo set to \c0" @ %client.inv[%i,1]);
            return;
         }
         else
         {
            echo("Abort1");
            messageclient(%client,"","\c5Can't use that right now.");
            return;
         }
      }
   }
   echo("Abort2");
   messageclient(%client,"","\c5Inventory item \c0" @ %name @ " \c5not found.");
}

15
Modification Help / Re: Gun wont work
« on: November 13, 2007, 07:06:13 PM »
The second gun is the Flak Cannon:

//flakCannon.cs
//Ephialtes

if(!isObject(rocketExplosionEmitter))
   exec("Add-Ons/Weapon_Rocket Launcher.cs");
if(!isObject(gunExplosionEmitter))
   exec("Add-Ons/Weapon_Gun.cs");

//audio
datablock AudioProfile(flakShot1Sound)
{
   filename = "./sound/gunShot1.wav";
   description = AudioClose3d;
   preload = true;
};

datablock AudioProfile(flakExplosionSound)
{
   filename = "./sound/spearHit.wav";
   description = AudioClose3d;
   preload = false;
};

datablock AudioProfile(flakHitSound)
{
   filename = "./sound/arrowHit.wav";
   description = AudioClose3d;
   preload = true;
};

//muzzle flash effects
datablock ParticleData(flakFlashParticle)
{
   dragCoefficient      = 6;
   gravityCoefficient   = 0;
   inheritedVelFactor   = 0;
   constantAcceleration = 0.0;
   lifetimeMS           = 350;
   lifetimeVarianceMS   = 15;
   textureName          = "base/data/particles/star1";
   spinSpeed      = 10.0;
   spinRandomMin      = -500.0;
   spinRandomMax      = 500.0;
   colors[0]     = "0.9 0.9 0.0 0.9";
   colors[1]     = "0.9 0.5 0.0 0.0";
   sizes[0]      = 0.2;
   sizes[1]      = 0.3;

   useInvAlpha = false;
};
datablock ParticleEmitterData(flakFlashEmitter)
{
   ejectionPeriodMS = 3;
   periodVarianceMS = 0;
   ejectionVelocity = 3.0;
   velocityVariance = 0.0;
   ejectionOffset   = 0;
   thetaMin         = 0;
   thetaMax         = 40;
   phiReferenceVel  = 0;
   phiVariance      = 360;
   overrideAdvance = false;
   particles = "flakFlashParticle";
};

datablock ParticleData(flakSmokeParticle)
{
   dragCoefficient      = 3;
   gravityCoefficient   = -0.5;
   inheritedVelFactor   = 0.2;
   constantAcceleration = 0.0;
   lifetimeMS           = 525;
   lifetimeVarianceMS   = 55;
   textureName          = "base/data/particles/cloud";
   spinSpeed      = 10.0;
   spinRandomMin      = -500.0;
   spinRandomMax      = 500.0;
   colors[0]     = "0.5 0.5 0.5 0.2";
   colors[1]     = "0.5 0.5 0.5 0.0";
   sizes[0]      = 0.15;
   sizes[1]      = 0.15;

   useInvAlpha = false;
};
datablock ParticleEmitterData(flakSmokeEmitter)
{
   ejectionPeriodMS = 3;
   periodVarianceMS = 0;
   ejectionVelocity = 1.0;
   velocityVariance = 0.0;
   ejectionOffset   = 0.0;
   thetaMin         = 0;
   thetaMax         = 90;
   phiReferenceVel  = 0;
   phiVariance      = 360;
   overrideAdvance = false;
   particles = "flakSmokeParticle";
};

//trails
datablock ParticleData(flakTrailParticle)
{
   dragCoefficient      = 3;
   gravityCoefficient   = -0.0;
   inheritedVelFactor   = 0.0;
   constantAcceleration = 0.0;
   lifetimeMS           = 225;
   lifetimeVarianceMS   = 55;
   textureName          = "base/data/particles/dot";
   spinSpeed      = 10.0;
   spinRandomMin      = -500.0;
   spinRandomMax      = 500.0;
   colors[0]     = "0.9 0.2 0.2 0.4";
   colors[1]     = "0.6 0.4 0.0 0.0";
   sizes[0]      = 0.15;
   sizes[1]      = 0.25;

   useInvAlpha = false;
};
datablock ParticleEmitterData(flakTrailEmitter)
{
   ejectionPeriodMS = 4;
   periodVarianceMS = 0;
   ejectionVelocity = 0.0;
   velocityVariance = 0.0;
   ejectionOffset   = 0.0;
   thetaMin         = 0;
   thetaMax         = 90;
   phiReferenceVel  = 0;
   phiVariance      = 360;
   overrideAdvance = false;
   particles = "flakTrailParticle";
};

datablock ParticleData(flakTrailParticleB)
{
   dragCoefficient      = 3;
   gravityCoefficient   = -0.0;
   inheritedVelFactor   = 0.0;
   constantAcceleration = 0.0;
   lifetimeMS           = 225;
   lifetimeVarianceMS   = 55;
   textureName          = "base/data/particles/cloud";
   spinSpeed      = 10.0;
   spinRandomMin      = -500.0;
   spinRandomMax      = 500.0;
   colors[0]     = "0.9 0.2 0.2 0.4";
   colors[1]     = "0.6 0.4 0.0 0.0";
   sizes[0]      = 0.55;
   sizes[1]      = 0.65;

   useInvAlpha = false;
};
datablock ParticleEmitterData(flakTrailEmitterB)
{
   ejectionPeriodMS = 4;
   periodVarianceMS = 0;
   ejectionVelocity = 0.0;
   velocityVariance = 0.0;
   ejectionOffset   = 0.0;
   thetaMin         = 0;
   thetaMax         = 90;
   phiReferenceVel  = 0;
   phiVariance      = 360;
   overrideAdvance = false;
   particles = "flakTrailParticleB";
};

//Explosion particles
datablock ParticleData(flakExplosionParticle)
{
   dragCoefficient      = 8;
   gravityCoefficient   = -0.5;
   inheritedVelFactor   = 0.2;
   constantAcceleration = 0.0;
   lifetimeMS           = 700;
   lifetimeVarianceMS   = 400;
   textureName          = "base/data/particles/cloud";
   spinSpeed      = 10.0;
   spinRandomMin      = -50.0;
   spinRandomMax      = 50.0;
   colors[0]     = "0.9 0.9 0.6 0.9";
   colors[1]     = "0.9 0.5 0.6 0.0";
   sizes[0]      = 0.25;
   sizes[1]      = 1.0;

   useInvAlpha = true;
};
datablock ParticleEmitterData(flakExplosionEmitter)
{
   ejectionPeriodMS = 1;
   periodVarianceMS = 0;
   ejectionVelocity = 5;
   velocityVariance = 1.0;
   ejectionOffset   = 0.0;
   thetaMin         = 89;
   thetaMax         = 90;
   phiReferenceVel  = 0;
   phiVariance      = 360;
   overrideAdvance = false;
   particles = "flakExplosionParticle";
};

datablock ParticleData(flakExplosionRingParticle)
{
   dragCoefficient      = 8;
   gravityCoefficient   = -0.5;
   inheritedVelFactor   = 0.2;
   constantAcceleration = 0.0;
   lifetimeMS           = 300;
   lifetimeVarianceMS   = 100;
   textureName          = "base/data/particles/star1";
   spinSpeed      = 10.0;
   spinRandomMin      = -50.0;
   spinRandomMax      = 50.0;
   colors[0]     = "1 1 0.0 0.9";
   colors[1]     = "0.9 0.0 0.0 0.0";
   sizes[0]      = 0.2;
   sizes[1]      = 0.2;

   useInvAlpha = false;
};
datablock ParticleEmitterData(flakExplosionRingEmitter)
{
   lifeTimeMS = 50;

      ejectionPeriodMS = 1;
      periodVarianceMS = 0;
      ejectionVelocity = 5;
      velocityVariance = 0.0;
      ejectionOffset   = 0.0;
      thetaMin         = 89;
      thetaMax         = 90;
      phiReferenceVel  = 0;
      phiVariance      = 360;
      overrideAdvance = false;
      particles = "flakExplosionRingParticle";
};

//Explosion datablocks
datablock ExplosionData(flakShellExplosion)
{
   //explosionShape = "";
   explosionShape = "./shapes/explosionSphere1.dts";
   soundProfile = flakExplosionSound;

   lifeTimeMS = 150;

   particleEmitter = rocketExplosionEmitter;
   particleDensity = 10;
   particleRadius = 0.2;

   emitter[0] = rocketExplosionRingEmitter;

   faceViewer     = true;
   explosionScale = "1 1 1";

   shakeCamera = true;
   camShakeFreq = "10.0 11.0 10.0";
   camShakeAmp = "3.0 10.0 3.0";
   camShakeDuration = 0.5;
   camShakeRadius = 20.0;

   // Dynamic light
   lightStartRadius = 5;
   lightEndRadius = 20;
   lightStartColor = "1 1 1 1";
   lightEndColor = "0 0 0 0";

   damageRadius = 7;
   radiusDamage = 100;

   impulseRadius = 10;
   impulseForce = 4000;
};

datablock ExplosionData(flakExplosion)
{
   //explosionShape = "";
   soundProfile = bulletHitSound;

   lifeTimeMS = 150;

   particleEmitter = gunExplosionEmitter;
   particleDensity = 10;
   particleRadius = 0.2;

   emitter[0] = gunExplosionRingEmitter;

   faceViewer     = true;
   explosionScale = "1 1 1";

   shakeCamera = false;
   camShakeFreq = "10.0 11.0 10.0";
   camShakeAmp = "1.0 1.0 1.0";
   camShakeDuration = 0.5;
   camShakeRadius = 10.0;

   // Dynamic light
   lightStartRadius = 0;
   lightEndRadius = 2;
   lightStartColor = "0.3 0.6 0.7";
   lightEndColor = "0 0 0";

   damageRadius = 0;
   radiusDamage = 100;

   impulseRadius = 0;
   impulseForce = 4000;
};

//Projectiles
AddDamageType("FlakShellDirect",   '<bitmap:add-ons/ci/flakCannon> %1',    '%2 <bitmap:add-ons/ci/flakCannon> %1',1,1);
AddDamageType("FlakShellRadius",   '<bitmap:add-ons/ci/flakCannonRadius> %1',    '%2 <bitmap:add-ons/ci/flakCannonRadius> %1',1,0);
datablock ProjectileData(flakProjectileA)
{
   projectileShapeName = "./shapes/flakShell.dts";
   directDamage        = 60;
   directDamageType    = $DamageType::FlakShellDirect;
   radiusDamageType    = $DamageType::FlakShellRadius;

   brickExplosionRadius = 4;
   brickExplosionImpact = false;          //destroy a brick if we hit it directly?
   brickExplosionForce  = 30;
   brickExplosionMaxVolume = 30;          //max volume of bricks that we can destroy
   brickExplosionMaxVolumeFloati ng = 60;  //max volume of bricks that we can destroy if they aren't connected to the ground

   impactImpulse        = 1000;
   verticalImpulse     = 1000;
   explosion           = flakShellExplosion;
   particleEmitter     = flakTrailEmitterB;

   muzzleVelocity      = 30;
   velInheritFactor    = 1;

   armingDelay         = 0;
   lifetime            = 5000;
   fadeDelay           = 5000;
   bounceElasticity    = 0.6;
   bounceFriction      = 0.5;
   isBallistic         = true;
   gravityMod = 1.0;
   explodeOnDeath = true;

   hasLight    = true;
   lightRadius = 4.0;
   lightColor  = "0.9 0.3 0.1";
};

AddDamageType("FlakDirect",   '<bitmap:add-ons/ci/flakShrapnel> %1',    '%2 <bitmap:add-ons/ci/flakShrapnel> %1',1,0);
datablock ProjectileData(flakProjectileB)
{
   projectileShapeName = "./shapes/bullet.dts";
   directDamage        = 20;
   directDamageType    = $DamageType::FlakDirect;
   radiusDamageType    = $DamageType::FlakDirect;

   brickExplosionRadius = 0;
   brickExplosionImpact = true;          //destroy a brick if we hit it directly?
   brickExplosionForce  = 10;
   brickExplosionMaxVolume = 1;          //max volume of bricks that we can destroy
   brickExplosionMaxVolumeFloati ng = 2;  //max volume of bricks that we can destroy if they aren't connected to the ground

   impactImpulse        = 5;
   verticalImpulse     = 10;
   explosion           = flakExplosion;
   particleEmitter     = flakTrailEmitter;

   muzzleVelocity      = 90;
   velInheritFactor    = 1;

   armingDelay         = 5000;
   lifetime            = 5000;
   fadeDelay           = 5000;
   bounceElasticity    = 0.6;
   bounceFriction      = 0.5;
   isBallistic         = true;
   gravityMod = 0.8;
   explodeOnDeath = false;

   hasLight    = true;
   lightRadius = 1.0;
   lightColor  = "0.9 0.3 0.1";
};

datablock ProjectileData(flakProjectileBCol)
{
   projectileShapeName = "./shapes/bullet.dts";
   directDamage        = 20;
   directDamageType    = $DamageType::FlakDirect;
   radiusDamageType    = $DamageType::FlakDirect;

   brickExplosionRadius = 0;
   brickExplosionImpact = true;          //destroy a brick if we hit it directly?
   brickExplosionForce  = 10;
   brickExplosionMaxVolume = 1;          //max volume of bricks that we can destroy
   brickExplosionMaxVolumeFloati ng = 2;  //max volume of bricks that we can destroy if they aren't connected to the ground

   impactImpulse        = 5;
   verticalImpulse     = 10;
   explosion           = flakExplosion;
   particleEmitter     = flakTrailEmitter;

   muzzleVelocity      = 1;
   velInheritFactor    = 1;

   armingDelay         = 0;
   lifetime            = 1000;
   fadeDelay           = 1000;
   bounceElasticity    = 0.6;
   bounceFriction      = 0.3;
   isBallistic         = true;
   explodeOnDeath      = true;
   gravityMod          = 0.8;

   hasLight    = false;
   lightRadius = 3.0;
   lightColor  = "0 0 0.5";
};

//Item
datablock ItemData(FlakItem)
{
   category = "Weapon";  // Mission editor category
   className = "Weapon"; // For inventory system

    // Basic Item Properties
   shapeFile = "./shapes/flakcannon.dts";
   rotate = false;
   mass = 1;
   density = 0.2;
   elasticity = 0.2;
   friction = 0.6;
   emap = true;

   //gui stuff
   uiName = "Flak Cannon";
   iconName = "./ItemIcons/flakCannon";
   doColorShift = false;
   colorShiftColor = "0.25 0.25 0.25 1.000";

    // Dynamic properties defined by the scripts
   image = flakImage;
   canDrop = true;
};

//Image
datablock ShapeBaseImageData(flakImage)
{
   // Basic Item properties
   shapeFile = "./shapes/flakcannon.dts";
   emap = true;

   // Specify mount point & offset for 3rd person, and eye offset
   // for first person rendering.
   mountPoint = 0;
   offset = "-0.1 0.68 -0.2";
   eyeOffset = 0; //"0.7 1.2 -0.5";
   rotation = eulerToMatrix( "0 0 0" );

   // When firing from a point offset from the eye, muzzle correction
   // will adjust the muzzle vector to point to the eye LOS point.
   // Since this weapon doesn't actually fire from the muzzle point,
   // we need to turn this off. 
   correctMuzzleVector = true;

   // Add the WeaponImage namespace as a parent, WeaponImage namespace
   // provides some hooks into the inventory system.
   className = "WeaponImage";

   // Projectile && Ammo.
   item = BowItem;
   ammo = " ";
   projectile = flakProjectileA;
   projectileType = Projectile;
   minShotTime = 1800;   //minimum time allowed between shots (needed to prevent equip/dequip exploit)

   //melee particles shoot from eye node for consistancy
   melee = false;
   //raise your arm up or not
   armReady = true;

   doColorShift = false;
   colorShiftColor = flakItem.colorShiftColor;//"0.400 0.196 0 1.000";

   //casing = " ";

   // Images have a state system which controls how the animations
   // are run, which sounds are played, script callbacks, etc. This
   // state system is downloaded to the client so that clients can
   // predict state changes and animate accordingly.  The following
   // system supports basic ready->fire->reload transitions as
   // well as a no-ammo->dryfire idle state.

   // Initial start up state
   stateName[0]                     = "Activate";
   stateTimeoutValue[0]             = 0.15;
   stateTransitionOnTimeout[0]      = "Ready";
   stateSound[0]            = weaponSwitchSound;

   stateName[1]                     = "Ready";
   stateTransitionOnTriggerDown[1]  = "Fire";
   stateAllowImageChange[1]         = true;

   stateName[2]                     = "Fire";
   stateTransitionOnTimeout[2]      = "Smoke";
   stateTimeoutValue[2]             = 0.2;
   stateFire[2]                     = true;
   stateAllowImageChange[2]         = false;
   stateSequence[2]                 = "Fire";
   stateScript[2]                   = "onFire";
   stateWaitForTimeout[2]         = true;
   stateEmitter[2]            = flakFlashEmitter;
   stateEmitterTime[2]         = 0.05;
   stateEmitterNode[2]         = "muzzleNode";
   stateSound[2]            = flakShot1Sound;

   stateName[3]             = "Smoke";
   stateEmitter[3]               = flakSmokeEmitter;
   stateEmitterTime[3]         = 1.2;
   stateEmitterNode[3]         = "muzzleNode";
   stateTimeoutValue[3]             = 0.4;
   stateTransitionOnTimeout[3]      = "CoolDown";

   stateName[4]            = "CoolDown";
   stateEmitter[4]            = flakSmokeEmitter;
   stateSequence[4]            = "eject";
   stateEmitterNode[4]         = "ejectPoint";
   stateEmitterTime[4]         = 0.3;
   stateTimeoutValue[4]             = 0.4;
   stateTransitionOnTimeout[4]      = "Reload";

   stateName[5]             = "Reload";
   stateSequence[5]            = "reload";
   stateTimeoutValue[5]             = 0.8;
   stateTransitionOnTimeout[5]      = "Ready";
};

function flakImage::onFire(%this,%obj,%slot)
{
   if(%obj.getImageAmmo(%slot))
   {
      %projectile = flakProjectileB;
      %spread = 0.003;
      %shellcount = getRandom(10,15);
   
      for(%shell=0; %shell<%shellcount; %shell++)
      {
         %vector = %obj.getMuzzleVector(%slot);
         %objectVelocity = %obj.getVelocity();
         %vector1 = VectorScale(%vector,(%projectile.muzzleVelocity+getRandom(-30,30)));
         %vector2 = VectorScale(%objectVelocity, %projectile.velInheritFactor);
         %velocity = VectorAdd(%vector1,%vector2);
         %x = (getRandom() - 0.5) * 10 * 3.1415926 * %spread;
         %y = (getRandom() - 0.5) * 10 * 3.1415926 * %spread;
         %z = (getRandom() - 0.5) * 10 * 3.1415926 * %spread;
         %mat = MatrixCreateFromEuler(%x @ " " @ %y @ " " @ %z);
         %velocity = MatrixMulVector(%mat, %velocity);

         %p = new (%this.projectileType)()
         {
            dataBlock = %projectile;
            initialVelocity = %velocity;
            initialPosition = %obj.getMuzzlePoint(%slot);
            sourceObject = %obj;
            sourceSlot = %slot;
            client = %obj.client;
         };
         MissionCleanup.add(%p);
      }
      return %p;
   }
   else
   {
      %projectile = flakProjectileA;
      %spread = 0.0015;
      %shellcount = 1;

      for(%shell=0; %shell<%shellcount; %shell++)
      {
         %vector = %obj.getMuzzleVector(%slot);
         %objectVelocity = %obj.getVelocity();
         %vector1 = VectorScale(%vector,%projectile.muzzleVelocity);
         %vector2 = VectorScale(%objectVelocity, %projectile.velInheritFactor);
         %velocity = VectorAdd(%vector1,%vector2);
         %x = (getRandom() - 0.5) * 10 * 3.1415926 * %spread;
         %y = (getRandom() - 0.5) * 10 * 3.1415926 * %spread;
         %z = (getRandom() - 0.5) * 10 * 3.1415926 * %spread;
         %mat = MatrixCreateFromEuler(%x @ " " @ %y @ " " @ %z);
         %velocity = MatrixMulVector(%mat, %velocity);

         %p = new (%this.projectileType)()
         {
            dataBlock = %projectile;
            initialVelocity = %velocity;
            initialPosition = %obj.getMuzzlePoint(%slot);
            sourceObject = %obj;
            sourceSlot = %slot;
            client = %obj.client;
         };   
         MissionCleanup.add(%p);
      }
      return %p;   
   }
}

function flakProjectileB::onCollision(%this,%obj,%col,%fade,%pos,%norm)
{
   if(%col.getClassName() $= "Player")
      %obj.setDataBlock(flakProjectileBCol);
   else
   {
      %obj.numBounces++;
      serverPlay3D(hammerHitSound,%obj.getTransform());
   }
   Parent::onCollision(%this,%obj,%col,%fade,%pos,%norm);
}

function flakProjectileB::Damage(%this,%obj,%col,%fade,%pos,%norm)
{
   %bounces = %obj.numBounces;
   %damage = %this.directDamage-(%bounces*3);   
   %col.damage(%obj,%pos,%damage);
}

function flakProjectileBCol::Damage(%this,%obj,%col,%fade,%pos,%norm)
{
   %bounces = %obj.numBounces;
   %damage = %this.directDamage-(%bounces*3);   
   %col.damage(%obj,%pos,%damage);
}

package FlakCannon
{
   function armor::onTrigger(%this,%player,%slot,%val)
   {
      if(%slot $= 4 && %player.getMountedImage(0) $= flakImage.getID())
      {
         if(%val)
         {
            %player.setImageAmmo(0,0);
            %player.setImageTrigger(0,1);
            %player.setImageTrigger(0,0);
            %player.setImageAmmo(0,1);
         }
      }
      else
         Parent::onTrigger(%this,%player,%slot,%val);
   }
};
ActivatePackage(FlakCannon);

Pages: [1] 2