Forums Index >> Modding >> How to make "new" weapons for your mods...



Page : <1> :


EDITED

1. Get the special.cs file and put it in the game/server/scripts folder.

2. Open that file and add this at the bottom of it.:

 

                                        
//-------------------------------------------------------
//----------------New Projectiles----------------
//------------------------------------------------------
Datablock ProjectileData(Custom) // Projectile Name Within ( )
{
velocity = 40.0; // meters per second
inheritVelocity = 1.00; // how much of shooters velocity to inherit
numBounce = 0; // usually 0
splashArea = 5.0; // usually 0
count = 10; // how many shots per clip?
saveOldCartridge = true; // chuck old cartridge or keep it around
canSave = false; // can this cartridge be saved if another comes along?
reloadTime = 1000; // in milliseconds
burstDelay = 1000; // milliseconds until next burst if button held down
burstCount = 1; // number of projectiles to fire per burst
synchTime = 1000; // synch over this many milliseconds
synchBefore = 500; // synch if not older than this in milliseconds
damage = 3; // usually 1
gravityScale = 0.5; //
sizeScale = 0.7; // scale of projectile (meters for bitmaps)
resource = "~/data/shapes/tanks/AreaProjectile.png"; // shape or bitmap
tankExplosion = "SplashExplosion"; // datablock for explosion
ownTankExplosion = "SplashExplosion"; // datablock for explosion
bounceExplosion = "DefaultExplosion"; // datablock for explosion
otherExplosion = "SplashExplosion"; // datablock for explosion
reticle = "OtherReticle"; // Reticle? OtherReticle --> Area , SpeedyReticle, BounceReticle, DefaultReticle
emitter = "areaemitter"; // OPTIONAL; leave empty if you want no emitter
};

 

EDIT this.And Also rename your new projectile!!! I think the "// BlaBla" Explains everything eh? Btw for this part:

 

                                        
tankExplosion = "SplashExplosion"; // datablock for explosion
ownTankExplosion = "SplashExplosion"; // datablock for explosion
bounceExplosion = "DefaultExplosion"; // datablock for explosion
otherExplosion = "SplashExplosion"; // datablock for explosion

 

"___"Explosion can be:

SplashExplosion
RockExplosion
Bouncetankexplosion
defaulttankexplosion
Bounceowntankexplosion
BounceBump
BounceExplosion
DefaultExplosion

Just play around till you know what all the explosions look like.

3. Then find this in the file (Near 8/10 of the way down):

 

                                        
$NumPupTypes = 3;
$pupTypes[0] = "SpeedyProjectile";
$pupTypes[1] = "BounceProjectile";
$pupTypes[2] = "SplashProjectile";
//-------------------------------------------------
$pupSnds[0] = "ActivateSpeedy";
$pupSnds[1] = "ActivateBounce";
$pupSnds[2] = "ActivateSplash";

 

Then Add this line to the 'top' section:

 

                                        
$pupTypes[3] = "Custom";

 

And this line to the 'bottom' section:

 

                                        
$pupSnds[3] = "ActivateSplash"; // Can be ActivateSplash , ActivateSpeedy , or ActivateBounce

 

So now it looks like this:

 

                                        
$NumPupTypes = 4; // Number of Weapons? In this case there are 4, so we change 3 to 4.
$pupTypes[0] = "SpeedyProjectile";
$pupTypes[1] = "BounceProjectile";
$pupTypes[2] = "SplashProjectile";
$pupTypes[3] = "Custom";
//--------------------------------------------
$pupSnds[0] = "ActivateSpeedy";
$pupSnds[1] = "ActivateBounce";
$pupSnds[2] = "ActivateSplash";
$pupSnds[3] = "ActivateSplash"; // Can be ActivateSplash , ActivateSpeedy , or ActivateBounce

 

When adding new weapons REMEMBER to change the number in between the [ ]. Add 1 each time you add a weapon!

And that's All! You can go into your server and get a powerup for your new weapon. If you don't get it in a powerup you probably did something wrong! Even missing 1 lousy ; can make it not work!


Last edited: Friday, July 22, 2005 at 7:05:43 PM

Thursday, March 24, 2005 at 8:59:16 AM

Page : <1> :

insert quote insert url insert email insert image bold italic underline superscript subscript horizontal rule : : Help on using forum codes

Add comment:

HTML is disabled within comments, but ZBB Code is enabled.

Back to the top

Web site designed, maintained and funded by -z- and Dan MacDonald