How do I stop my touch to shoot controls, firing when other control buttons are pressed?

TechNoirTechNoir Member, PRO Posts: 117
edited April 2012 in Working with GS (Mac)
So in my game a side scrolling shooter,, I have my hero flying up and down with separate up and down buttons, that works fine, to shoot I have rules that shoot to where the user touches (anywhere on the screen) meaning that my hero also shoots towards the up and down buttons, when they are pressed.. (which is not really what I would like)

Is there any way I can prevent shooting my up and down buttons? Also, the way I have it set up, does not allow the user to hold the up button and shoot at the same time...

I hope this makes sense...

Many thanks,

TN

Best Answer

  • tatiangtatiang Posts: 11,936
    Accepted Answer
    Add a rule to your up and down buttons: When touch is pressed change attribute game.UpOrDownPressed to true; Otherwise change attribute game.UpOrDown to false. On your shoot actor, add a rule/condition that says When attribute game.UpOrDownPressed is false [shoot a bullet].

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

Answers

Sign In or Register to comment.