Hold Down mouse for constant firing

ccbeyerccbeyer Member Posts: 0
edited May 2012 in Working with GS (Mac)
I'm trying to make it so that my cannon shoots bullets every [reload time in seconds] while holding down the mouse button, without a need to re-click the button. I have it right now so that every click shoots a bullet, but you have to release and re-click to shoot another (assuming [reload time] has elapsed). These are my rules for shooting.

When mouse button is down -
When attribute self.loaded is true -
Change attribute self.loaded to false
Spawn Actor (bullet)

When attribute self.loaded is false -
Timer : After (game.Reloadtime) -
Change Attribute self.loaded to true

Answers

  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    Just do when mouse button is down
    timer: however many seconds you want
    spawn actor
Sign In or Register to comment.