I am trying to use a D-Pad to move my actor in an iPhone game. Does anyone have an experience doing this? I looked at the joystick wiki but that uses the mouse, I want to use it with touch.
a d pad should be pretty simple. I've been building one in passing, and I just used a few attributes. I made 4 attributes (up, down, left and right), and 4 actors (upButton, downButton, leftButton and right Button).
On each button I have a rule, for example, the up button:
when actor receives touch is pressed change attribute game.Up to 1
when actor receives touch is released change attribute game.Up to 0
then in the play in your move rules:
when attribute game.Up is 1 move at 90 degrees at speed whatever
that'll do it, create a set of rules for each button.
Comments
On each button I have a rule, for example, the up button:
when actor receives touch is pressed
change attribute game.Up to 1
when actor receives touch is released
change attribute game.Up to 0
then in the play in your move rules:
when attribute game.Up is 1
move at 90 degrees at speed whatever
that'll do it, create a set of rules for each button.
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left