Need Help on shooting?

777ideas.com777ideas.com Member, PRO Posts: 895
edited November -1 in Working with GS (Mac)
Hey Guys I'm currently developing a shooting game and now to test the game in preview I use the space bar to shoot I will like to know how to put a button in the game and then when its touch make the actor shoot.
Thanks

Comments

  • quantumsheepquantumsheep Member Posts: 8,188
    Make a boolean variable called 'shooting'.

    On your fire button, have the rule:

    If touch is pressed

    Change variable 'shooting' to true.
    Otherwise change variable 'shooting' to false.

    Then on your player, have a rule:
    If variable 'shooting' is true
    Spawn bullet.

    Hope that helps,

    QS :D
  • 777ideas.com777ideas.com Member, PRO Posts: 895
    Thanks It Worked!
Sign In or Register to comment.