So I have something in my game where I press “g” and glowsticks are thrown from the character. How would I set a limit on the number of spawnable glowsticks, so the character can’t just throw glowsticks infinitely?
- Create a variable
2.Create a if there(variable>0) and bind to spawn actor node
3.End of the spawn actor node decrease the variable by 1
so,
before the spawn actor node, if statement will control the variable and if is bigger than 0 executing the spawn actor node, then the variable will decrease 1.
1 Like
called “branch” node
just – the glowstick variable after spawn it
That did it actually, thank you very much.
2 Likes