help with on screen controlls

Pennez-GamesPennez-Games Member Posts: 107
edited July 2012 in Working with GS (Mac)
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.

Answers

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598

    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

  • Pennez-GamesPennez-Games Member Posts: 107

    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.
    Mmmmm kinda confused, i kind of tried to attempt what you said, it didnt work, the character just auto moved, and the button to move the character did nothing..
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited July 2012

    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

  • Pennez-GamesPennez-Games Member Posts: 107

    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.
    Thank you verry verry verry much!!!!! it worked, except i want to make the character look like its walking, (iv got two images for this) how do i do this? because at the moment it just hovers and looks wierd.

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598

    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

  • Pennez-GamesPennez-Games Member Posts: 107

    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. :-)

    Yes i now have the animation walking (abit out of time but i will find a way to fix it later) But just one question, i made my own character in PAINT, but when i put the animation in and i controll it, when it passes an object you will see a white sqaure around the character i made in paint, do you know how to fix this? if u know please tell because it is realy anoying and wont look good in my iphone game, also thank you for the controll stuff it was very usefull!
  • Pennez-GamesPennez-Games Member Posts: 107
    wait got it dw
Sign In or Register to comment.