How do I change animation states so they are not overlapping?

0 favourites
  • 6 posts
From the Asset Store
2D fighting template based in the game that defined the fighting games genre.
  • Hi, any help here would be great, this player will have about 8 animations, what is the best way to create some sort of state machine. what is the best logic to use because here its no good. the player is still running when jumping.

    Thanks

  • Use platform Behaviour.

    make floor is solid

    players is on floor set animation to idle.

  • Im not sure that's going to work for multiple states. The floor is currently solid but that's not going to help with a transition between running and jumping. I dont think anyway?

  • What will be your 8 animations?

    If I had to do myself a state logic for multiple animations on a player, I would do a global variable with a string.

    In short, the initial value will be "idle". So, all your animation will be states like for example "jump", "fall", "hit", "attack", "protect", etc. All triggerable by keys or events or whatever you want them to get triggers.

    Then, inside a group (in the event sheet), you check:

    if the global variable value is "idle", then play idle animation.

    if the global variable value is "run", then play the run animation.

    And go on.

    Do you think this idea can fit your needs?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi thanks for the reply. I have read about others doing this and for them it worked well. My game will be run and gun, so the player will need to shoot while running and jumping, there will also be slides and crouching so not sure if it would work? i guess it would as long as i assign a condition to the variables no?

  • This video goes into detail about importing animations and, in the second half, triggering them.

    youtu.be/DrjblVRnal0

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