How do I change the animation in double jump

0 favourites
  • 6 posts
From the Asset Store
Ninja char for your game! Make your own Shinobi game with this art.
  • Hello in my game my player can double jump

    in the first jump i have an animation

    but when get the double jump how i can change the animation??

  • via a STATE which can be represented as a variable,

    Player press jump key statevar jumped = true

    if jumped = true

    player press jump key statevar doublejumped = true

    if double jumped and animation = jumpedone

    do doublejump animation change

  • is there another form?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • is there another form?

    Ofcourse there is, but all of them are similar to the solution above..

    Construct 2 doesn't have a condition "is double-jumping" so you would have to create a way to check for it yourself..

    This is done by using (instance) variables, setting them at the right time and checking them in a condition to verify the player "is double-jumping"

  • is there another form?

    Well, None that I can see. As you now know, variables are the only way to hold any kind of state you want in your game/application. So regardless of how you do it, you're going to need to push a value to some kind of variable (whether a local, or object variable) and then retrieve it. I mean you could try to use an array and have states tied to a spot in an array and cycle through them when you press the key twice within a certain amount of time or from a certain time and spot in your array but to pass the array value your going to need, yet again, another variable. This way was most direct that I can think of. Perhaps you can make it simple.

  • You might actually pull it of with:

    keyboard on pressed up arrow

    player is not on floor

    set animation to doublejump

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)