Author Topic: Can "stateEjectShell" be delayed?  (Read 426 times)

As in, making it so the bullet ejection is not instantaneous but rather delayed by say a second.
I assume this is possible, but I do not really know if it is or how to go about doing it. Which is really what I would like to know.

If possible...
Quote
   stateName[2]                    = "Fire";
   stateTransitionOnTimeout[2]     = "Smoke";
   stateTimeoutValue[2]            = 0.14;
   stateFire[2]                    = true;
   stateAllowImageChange[2]        = false;
   stateSequence[2]                = "Fire";
   stateScript[2]                  = "onFire";
   stateWaitForTimeout[2]         = true;
   stateEmitter[2]               = gunFlashEmitter;
   stateEmitterTime[2]            = 0.05;
   stateEmitterNode[2]            = "muzzleNode";
   stateSound[2]               = gunShot1Sound;
   stateEjectShell[2]       = true;

How would it be done using this bit of code?
I also assume it would require one or more of these pieces of code:

stateTimeoutValue[X]
stateTransitionOnTimeout[X]
stateWaitForTimeout[X]

Basically, I am aiming to delay the ejection.

Use another state that comes right after.

Remove that line and put stateEjectShell
  • = true; in a different state e.g. the reload one.

Awesome, it is working. Now for tune ups! Thanks you guys.