Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: unearthly on February 27, 2017, 06:03:22 AM
-
Hi
I have used an activate game object action on an FSM to show a gun smoke sprite. It is not triggered by a key or mouse press because I only want it active when the gun has ammo. That works fine, but the sprite hangs in the air too long.
I would like to control it's duration (to about a half second). I think I should be able to do that though a float variable. How could I go about it?
-
Have you tried to action "Wait" ?
Here is a basic tutorial. Wait can take a variable:
-
Here is a custom Action. I think this will help.
Destroy self with a Delay you want.
-
Thanks again tcmeric.
Used my activate game object (plus a random rotate) with a wait of .1 seconds. Works fine.
I tend to over complicate my fsm's and I had unnecessary actions attached to different states.
che1974 I have downloaded your custom action. To use would I need a create object action followed by your destroyself2 to make my gun smoke?
-
Yes, my Idee was to spawn(Smoking, Explosion,...) and destroy after delay.