Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: QueenM56 on June 10, 2018, 05:10:38 AM
-
Hi all,
I'd like to create a 'hold button shooting' function for my game.
I'm currently using 'get key down' and 'spawn bullets', but it only spawns one bullet each time. Is there any way I can make continuous bullets until the button is up?
Please, anyone can help?
Thanks!
M
-
Put wait as the last action, and loop the state into itself. Wait time will be your rate of fire basically.
-
Don't use get key down though in this case, I think it won't trigger if you enter the state with it held down?
Use get key followed by a bool compare action
-
Yeah, forgot about that.
-
Thanks for the suggestions krmko and Terri.
I did try set bool value after 'get key down', but the problem is it starts to loop in infinite bullet shoot once I set the bool value to true.
I haven't found an effective way to set the bool value back to false.
Does anyone know how to solve it?
Cheers,
M
-
Hi guys, the 'get key' set bool value works!
Thank you so much!
M