Author Topic: Spear sticking with explosion impact  (Read 369 times)

  I am making a spear it is suppose to stick to objects and explode on impact. What keeps happening is the spear sticks to objects but then explodes a few seconds after. Also with a little edit to 'lifetime' then the spear will explode on impact but not stick. How can I get the spear to stick to objects for a few seconds and explode on impact?

//projectile
AddDamageType("SpearDirect", '<bitmap:add-ons/Weapon_Spear/CI_spear> %1', '%2 <bitmap:add-ons/Weapon_Spear/CI_spear> %1',1,1);

datablock ProjectileData(spearProjectile)
{
projectileShapeName = "./spearProjectile.dts";

directDamage = 50;
directDamageType = $DamageType::SpearDirect;

radiusDamage = 0;
damageRadius = 0;
directDamageType = $DamageType::SpearDirect;
explosion = spearExplosion;
particleEmitter = spearTrailEmitter;
explodeOnPlayerImpact = true;
explodeOnDeath = true;

armingDelay = 4000;
lifetime = 4000;
fadeDelay = 4000;

isBallistic = true;
bounceAngle = 170; //stick almost all the time
minStickVelocity = 10;
gravityMod = 0.25;

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

muzzleVelocity = 65;
velInheritFactor = 1;

uiName = "Spear";
};

Oops, can a moderator move this to Coding Help?