Setting Up Reload Times?

How would I set up a reload for my cannon, like 1 second or so, so it is not semi-automatic shooting?

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    Create a real attribute called game.lastFiredTime.

    When touch is pressed AND attribute game.Time ≥ game.lastFiredTime + 1
    , [spawn bullet], change attribute game.lastFiredTime to game.Time

    The "1" in that rule condition is the delay. If you wanted a 5-second delay, you would add 5.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • Colty27Colty27 Member Posts: 7

    Thank You! Works like a charm @tatiang

Sign In or Register to comment.