Has any made a D-Pad

joebear218joebear218 Member Posts: 33
edited November -1 in Working with GS (Mac)
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.

Comments

  • EastboundEastbound Member, BASIC Posts: 1,074
    When playing on the computer, touch controls are controlled by the mouse. I'm almost positive that example uses touches.
  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
    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.
Sign In or Register to comment.