Buttons to Control actor movement left and right.

SethoiSethoi Member Posts: 2
edited November -1 in Working with GS (Mac)
Hi,

I'm very new to using GS, and I have managed to figure out how to get my actor to move left and right using the keys on my keyboard. However, I want to make this game for iPhone which obviously has no keys.

I was wondering if anyone knew how to make it so I could use touch buttons to move my actor left and right. I was looking to have them invisble in the bottom left and bottom right corners of the screen. I have searched and searched but have not found a tutorial to teach me how to do it. Any help would be most appreciated.

Sorry if this topic has been resolved somewhere else, I have searched but not found anything!
Seth

Comments

  • ShpintShpint Member Posts: 404
    Create 3 actors. "Left, Right, Object"
    Create 1 integer attribute "Direction"

    In Left
    Rule: When left is press...change attribute "Direction" to 1

    In Right
    Rule: When Right is press...change attribute "Direction" to 2

    In Object
    Rule: When Attribute "Direction" = 1. Accelerate left
    Rule: When Attribute "Direction" = 2. Accelerate right

    Cheers
  • SethoiSethoi Member Posts: 2
    Just got this to work. Getting the hang of things now :)
    Thanks for you help!
Sign In or Register to comment.