Author Topic: Making a Projectile Stay on Impact?  (Read 821 times)

Does anyone know the part of the bow script that makes the arrow stay?
I'm pretty sure it would be this.
Code: [Select]
};
datablock ParticleEmitterData(arrowStickExplosionEmitter)
{
   ejectionPeriodMS = 1;
   periodVarianceMS = 0;
   ejectionVelocity = 5;
   velocityVariance = 0.0;
   ejectionOffset   = 0.0;
   thetaMin         = 80;
   thetaMax         = 80;
   phiReferenceVel  = 0;
   phiVariance      = 360;
   overrideAdvance = false;
   particles = "arrowStickExplosionParticle";

   useEmitterColors = true;
   uiName = "Arrow Stick";
Not to sure though.

try editing that part out and testing it ingame?

try editing that part out and testing it ingame?
I'm pretty sure that that would just make the projectile invisible until it hits something.

It's in the projectile datablock and it has to do with ballistics and stick variables.

Can't you just look at the arrow's code?

Code: [Select]
   minStickVelocity    = 10;

Can't you just look at the arrow's code?
Have you ever scripted before?

Look up Bushido's Nail Gun.  It has a good example of how to do it.

Set the projectile's arming delay to less than the lifetime. Then, set "isBallistic" to false. This will make the projectile stay in the ground when fired and disappear later.

If you want an impact explosion, create an explosion datablock that will be the impact, and in the projectile datablock add this:

Code: [Select]
bounceExplosion = <name of the impact explosion>;
The normal explosion is like when the arrow vanishes. Unless the projectile is supposed to explode after going into the ground, you dont want it to do any damage.

Hope this helps you.
« Last Edit: September 12, 2010, 01:29:49 PM by takato14 »