Joystick touch

thorepthorep Member Posts: 1

Hi! Im moving from Buildbox to Gamesalad.
I have a game ( top down view) where i can move in all 4 directions and have to avoid the walls.
The game is for iphone.

In buildbox i used the joystick touch control to move the player smooth in all directions by touch.
How do i do this in game salad?

Answers

  • tiger27tiger27 Member Posts: 127

    Create an attribute called TouchX and another called TouchY (make them both integer attributes).

    Rule:

    If touch is pressed
    
    change attribute Game.TouchX to Game.Touches.Touch1.X
    
    change attribute Game.TouchY to Game.Touches.Touch1.Y
    ____________________________________________________
    move to Game.TouchX, Game.TouchY relative to scene
    at a speed of 300 (or whatever speed you want)
    

    Hope this helps! By the way, gamesalad forum is an awesome place for any help.

  • UtopianGamesUtopianGames Member Posts: 5,692

    We have a free 8 direction joystick that can easily be edited over at deepblueapps.

    http://www.deepblueapps.com/8-way-controller-template/

Sign In or Register to comment.