Best way to do an Animation System

Not favoritedFavorited Favorited 0 favourites
  • 3 posts
From the Asset Store
Best car suspension with spring effect and very cool terrain generation.
  • Whats the best way to go about doing an animation system? I think everyone knows how to do basic things like walking and jumping ect. however the problem is when you want to do more things with player animations. For example if you wanted to have a player do a short animation when shooting something for grabbing something. You could do this by adding "if animation 'walking' is not playing" then play "animation shooting" and sure that works sometimes and its what ive always done. however when you want to do more complex things this technique can get really messy. you end up having 10 separate events of "if not walking" "if not jumping" ect and its really hard to keep track of everything. and then eventually events start conflicting with each other.

    You'd have to do some sort of state system but I haven't really found a good way to go about it right now especially when a character preforms 2 actions at the same time. And these are pretty small animation changes that only really appear for a few seconds so I'm not sure if a State Machine would even be worth it in this case.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi there, the way I've done this is to have an instance variable on the player idle(default) walk, run, attack, hurt etc. I've then got separate groups in the event sheet that control animations/controls. These aren't active initially and I switch them on and off depending on player state. Hope that makes sense. Good luck

  • The system I work with for my game has vars for every state, so like if the player jumps while running it might look like this:

    Idle_(Default)

    Walk_(Fast)

    Jump_(Long)

    Land_(Moving)

    As apposed to when the player jumps while idle:

    Idle_(Default)

    Walk_(Default)

    Jump_(Static)

    Land_(Static)

    I also use bools that manage the player states to keep condition comparisons as small and readable as possible.

    I've also found that it's important to be able to turn off parts of the animation system like walking, idle, and jumping to make adding new mechanics a lot easier.

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