Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Touch Controls iPhone - Help Please

JoshKahaneJoshKahane Posts: 470Member
edited November -1 in Working with GS (Mac)

So I am looking to buy the Express version soon so I can get testing on my iPod Touch but for now I wanted to check something with you, as if this was wrong I wouldn't really know what to do.

In my game I have a ball, and I want it so that when I touch to the left of the ball, it moves left, touch to the right it moves right and same with up and down. Here is what I have done with my Move Right rule:

'Attribute' 'game.Touches.Touch 1.Y' '>' 'self.Posotion.Y'

'Direction: 0' 'Relative to: Actor'
'Acceleration: 100'

Hope that makes sense, just copied what I entered in my rule. Hope you can help, but I heard that testing on the computer is the same it just replaces touch with the mouse but it isn't working if that the case, so any help much appreciated, thanks.


  • CobraCobra Posts: 160Member
    For detecting touches to the right of an object you'd need X, not Y.
  • JoshKahaneJoshKahane Posts: 470Member
    Woops, hehe. Would I need to change both 'Y's to 'X'? Or a certain one?
  • JoshKahaneJoshKahane Posts: 470Member
    Oh, on a side note, is it possible to make portrait games?
  • maniraptormaniraptor Posts: 81Member
    Yes, you would need to change both of those "Y"s in your example code to "X". So it would look like:

    'Attribute' 'game.Touches.Touch 1.X '>' 'self.Position.X'

    The reason is movement left and right happens on the X axis. Movement up and down happens on the Y axis.
This discussion has been closed.