key input changing problem. please help

njvdberge@gmail.comnjvdberge@gmail.com Indie Game DeveloperBreda, the NetherlandsMember Posts: 22

Hey there,

i have created a game, i used space to make my player jump.
it worked verry nice until i changed de key bindings to touch intput.
now the jump doesnt work anymore.
can somebody help me with this?

Answers

  • njvdberge@gmail.comnjvdberge@gmail.com Indie Game Developer Breda, the NetherlandsMember Posts: 22

    and some extra info: i did change it in the prototype while de character on screen is locked.

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    What is your touch rule? Have you tried a Log Debugging Statement to see if the rule is actually triggering?

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • njvdberge@gmail.comnjvdberge@gmail.com Indie Game Developer Breda, the NetherlandsMember Posts: 22

    first i had in my character when you press space you jump, now i wanted to test it on my iphone so i needed to change it. see the following picture for my current jump rule in my character actor

    http://postimg.org/image/aby3qx9uz/

    i hope you see whats the problem is..

    oh yes and i tried to log debugging statement but i dont know how to set it up in my case.

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited March 2015

    Aside from the fact that you have a Change Attribute behavior without an attribute specified, it might be the fact that you are changing self.jumping to true at the top/start of the rule (depending on whether or not that rule is inside of another rule).

    If the video below doesn't load, try clicking on the Tutorials link in my signature and watching the video titled "#13.5 [aside] Debugging".

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • njvdberge@gmail.comnjvdberge@gmail.com Indie Game Developer Breda, the NetherlandsMember Posts: 22

    hey, about that Change Attribute behavior without an attribute specified.
    this one is always off, and even now if i try when i delete that one it still wont work.

    what i tried is to create one big button over the screen with the alpha set to 0, i made a game attribute called jump (boolean). and it works for now.. well half.
    i also added my gamestart attribute, when touch is pressed the game will start.
    the only problem is the character keeps jumping now with out touching the screen.

    see following picture for my touch actor(wich triggers to start the game and let the character jump.
    http://postimg.org/image/i67kht3wj/

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    It's hard to get a full picture of how your rules work from the parts you've posted. You might consider uploading your project file (.zip it first) to a file-sharing site and then posting the download link here.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • njvdberge@gmail.comnjvdberge@gmail.com Indie Game Developer Breda, the NetherlandsMember Posts: 22
    edited March 2015

    HEY, I FINALLY FIGURED IT OUT MYSELF!
    thnx @tatiang for trying to understand and solve this problem.
    check out below how i solved it:

    i made 2 transparant actors, and stretched them all over the screen.

    this first when touch is pressed, set jump to true.
    and in the character, when collides with platform, set jump to false.

    The gameStart is in the other transparant actor.
    when touch is pressed, set gameStart to true.
    and i put a timer in the last actor, after 0,5 sec destroy actor!

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    Well done!

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

Sign In or Register to comment.