Touches
AlexGreeneApps
Member Posts: 16
I am new at Gamesalad so let me say that first...
In the game I am creating, I want there to be the main character at the bottom of the screen and the user can drag the character side to side (only side to side) to catch falling objects. How would I go about doing this?
Thanks
In the game I am creating, I want there to be the main character at the bottom of the screen and the user can drag the character side to side (only side to side) to catch falling objects. How would I go about doing this?
Thanks
Comments
I add rule and In that rule I add a constrain attributes behavior that constrains Game.Mouse.position.X to 100 for example. what do i do from there, if what i did was even correct... thanks
(This will only work if you only have one touch... If your using multitouch you'll need to use touch 1, touch 2 etc.)
When touch is pressed constrain self.position.x to game.mouse.position.x
Then you'll need limits for your left and right walls...
If mouse.position.x < or equal to 20 constrain self.position.x to 20... And then do the same thing on your right wall.... (Just an example)
This should work, but I'm not on a computer right now so I cant test it... Good Luck!