Fire Button in 2 directions

GingerBGamesGingerBGames Member Posts: 390
edited November -1 in Working with GS (Mac)
Hello GS'ers,

I'm trying to make a shooter here and I'm having a bit of a problem. I have only one fire button. What I want to have happen is this. When my character is facing right, fire my laser right. When i'm facing left I want my character to fire left. It sounds easy I know, but I can't get the darn thing to work. Has anyone else accomplished this? Or can anyone lend me a hand please?

Comments

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    You could try the following: make a scene attribute, boolean would do, called LR, for instance. In the rule for moving your character left, make LR false (OK, it's not false anything, it's a switch). And in your Rule for moving right, make LR true.

    Now in your fire button, make it fire left if LR is false, otherwise fire right if its true. Should work, I think!

    :-)

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • CodeMonkeyCodeMonkey Head Chef, Member, PRO Posts: 1,803
    There's a shared project for that: http://gamesalad.com/game/play/23210
Sign In or Register to comment.