Author Topic: How do I get this projectile to stick?  (Read 390 times)

So I'm editing the Black Knife to have a longer throwing speed and to stick to objects but I forgot how to make it stick to objects. Everytime it hits a wall it disappears.

Code: [Select]
//Thrown projectile
datablock ProjectileData(BlackKnifeThrowProjectile)
{
   projectileShapeName = "./BlackKnifeProjectile.dts";
   directDamage        = 100;
   directDamageType  = $DamageType::BlackKnife;
   radiusDamageType  = $DamageType::BlackKnife;
   explosion           = false;

   muzzleVelocity      = 60;
   velInheritFactor    = 1;

   armingDelay         = 0;
   lifetime            = 30000;
   fadeDelay           = 30000;
   bounceElasticity    = 40;
   bounceFriction      = 10;
   isBallistic         = true;
   gravityMod = 0.0;

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

   uiName = "Black Knife Throw";
};

Code: [Select]
//projectile
AddDamageType("ArrowDirect",   '<bitmap:add-ons/Weapon_Bow/CI_arrow> %1',    '%2 <bitmap:add-ons/Weapon_Bow/CI_arrow> %1',0.5,1);

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

   directDamage        = 30;
   directDamageType    = $DamageType::ArrowDirect;

   radiusDamage        = 0;
   damageRadius        = 0;
   radiusDamageType    = $DamageType::ArrowDirect;

   explosion             = arrowExplosion;
   stickExplosion        = arrowStickExplosion;
   bloodExplosion        = arrowStickExplosion;
   particleEmitter       = arrowTrailEmitter;
   explodeOnPlayerImpact = true;
   explodeOnDeath        = true; 

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

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

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

   muzzleVelocity      = 65;
   velInheritFactor    = 1;

   uiName = "Arrow";
};

I actually figured it out before you sent that.



Anyone know where I can contact tezuni? I want to send him my edit.