Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: Tinker on April 02, 2012, 03:23:07 PM
-
Hello! I am working on a top-down shooter.
The main object instaniates a projectile on mouse down input like it is suppose to.
However, i cannot figure out how to constantly instaniate the projectile while the mouse is held down because it only instaniates the projectile once until I re-click again.
At the moment, I have a Listener state for the object that waits for a "Get Mouse Button Down", Which once held, sends a event to a state that performs the "Create Object" which then waits for "Get Mouse Button Up" to return back to the Listener state.
Thank you! ;D
-
Loop the state that creates the projectile. E.g. Send Event or Wait with a 0.5 second delay. Or make the delay a variable so you can expose it in the inspector and tweak it.
-
I tried having two states that kept sending the event back to eachother but i believe i am doing it wrong.
as for the "Wait" function, i don't see where the use of this is needed?
Do you mean, have a event within itself to flow back into its own state?
Can you be more specific on how the loops should be set up?
-
Sure. See attached screenshot.
-
Aha! Alright, that looks correct, thanks! ;D