HOW TO SHOOT without haveing to hold down
azemurder
Member Posts: 2
i want to shoot missiles with a 5 second interval... but i can't figure out how to set it without it only shootting every 5 seconds by holding down the button. Is there a way to fire a missile every 5 seconds without having to hold the button down that long?
Comments
Spawn actor" missile " every 5 seconds
Thats it
When attribute game.shoot is true
spawn bullet
Timer - every 2 seconds (or whatever)
----spawn bullet
By putting a spawn before the timer and in the timer you can tap the button or hold it down. The draw back is that the user can tap the shoot button as fast as their thumb is able and bullets will spawn at that rate. To limit this you could wrap this rule in a rule that says when self.shotAllowed is true. Then in the when game.shoot is true timer section have a change attribte behavior that changes self.shotAllowed to false and a timer that says after 2 seconds change self.shotallowed to true (be sure to check run to completion).