Blockland Forums > Modification Help
Projectile Tutorial?
(1/1)
Pompmaker1:
I'm looking for a good tutorial on how to make projectiles.
Does anybody know where I can find one?
TheKhoz:
All you have to do if make a model of a projectile, have it face along the X axis, and make it the right size. Then you just need it to be centered on the Axis.
Pompmaker1:
The SCRIPT, I mean.
I need help with the SCRIPT.

My projectile does not damage anything.
TheKhoz:
You should have specified that.

And, for a gun:


--- Code: ---datablock ProjectileData(YourgunProjectile)
{
   projectileShapeName = "./YourBullet.dts";



   directDamage        = 30;



   directDamageType    = $DamageType::YourGun;
   radiusDamageType    = $DamageType::YourGun;

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

   impactImpulse     = 400;
   verticalImpulse  = 400;
   explosion           = gunExplosion;
   particleEmitter     = ""; //bulletTrailEmitter;

   muzzleVelocity      = 90;
   velInheritFactor    = 1;

   armingDelay         = 00;
   lifetime            = 4000;
   fadeDelay           = 3500;
   bounceElasticity    = 0.5;
   bounceFriction      = 0.20;
   isBallistic         = false;
   gravityMod = 0.0;

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

   uiName = "YourGun Bullet";
};
--- End code ---
Isolated is the damage it does, per shot.
Pompmaker1:
I tried that, but the hitbox of the projectile is the direct center. Is there any way to make it bigger?
Navigation
Message Index

Go to full version