Help Stamina/energy bar needed

AdamgoproAdamgopro Member Posts: 310
edited September 2012 in Working with GS (Mac)
ok i have made a side shooter style game and i have 4 buttons as to which fire bullets but if i keep clicking each button it makes the game easy as to why i need a energy type stamina bar how would i do this?

basically so when i press each button it has to wait like 1 - 2 seconds to be able to fire another bullet?

would reallty appreciate this i am very close to finishing my game but really need this.

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    You've asked two questions: how to limit firing speed and how to have an energy bar. You can limit firing speed by having a game boolean attribute game.ReadyToFire to true and doing When [button is pressed] AND attribute game.ReadyToFire is true --> [fire a bullet] and Change Attribute game.ReadyToFire to false; Timer (run to completion checked) after 2 seconds Change Attribute game.ReadyToFire to true.

    I have a couple of videos that explain how to make an energy bar: and

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

  • AdamgoproAdamgopro Member Posts: 310
    @tatiang excellent thank you so much ! Hope this helps others too!

    :)
Sign In or Register to comment.