help with on screen controlls
![Pennez-Games](http://forums.gamesalad.com/applications/dashboard/design/images/defaulticon.png)
im not the best with gamesalad, and im trying to add onscreen controlls to my game (im working on a pc not a mac).
I tried on screen controlls but the controlls moved instead of the character, any help would be appreciated! thank you.
I tried on screen controlls but the controlls moved instead of the character, any help would be appreciated! thank you.
Answers
Hi @soundwaveninja
One way is the following: make a text attribute, call it Direction.
In up button, put :
Change attribute Direction to Up
then similar for down, left & right.
In character Rules:
When attribute Direction is Up
your Move behaviour for up
When attribute Direction is Down
your Move behaviour down
etc.
hope that helps.
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
Hi, I forgot to add the touch rules again (this is the second time in a couple of days); sorry about that!
Revised, to try:
make a text attribute, call it Direction.
In up button, put :
When Touch is pressed
Change attribute Direction to Up
When touch is released
Change attribute Direction to none
then similar for down, left & right buttons
In character Rules:
When attribute Direction is Up
your Move behaviour for up
When attribute Direction is Down
your Move behaviour down
etc.
That should do it.
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
Hi again, @soundwaveninja
You use both your images in the Animate Behaviour.
I'm certain there should be details about Animate in the GameSalad Official Manual.
http://forums.gamesalad.com/discussion/45683/the-official-gamesalad-manual-now-available#latest
Also, take a look at the template called Platformer Template:
https://dl.dropbox.com/u/14060718/Platformer Template.gameproj.zip
If you study it, you'll learn a lot about platformers, the walk cycle, animation behaviours, etc.
i can't give a credit to who made the Platformer Template as I don't know but it's been available for ages.
Good luck. :-)
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps