Buttons to Control actor movement left and right.
Sethoi
Member Posts: 2
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
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
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
Thanks for you help!