Assigning Animations?

This forum is currently in read-only mode.
From the Asset Store
3 pixel charaters with over 8 animations each + animations with a gun
  • Alright, maybe this is just me missing something but I can't seem to find this anywhere so here's the problem.

    I have a character with an Idle animation, a Walking Animation, and various other animations like Attack, Block, etc. The Idle animation is set to play when the character is not moving, and the Walking animation is set to play when the character IS moving. This works fine and dandy. But the Attack animation is set to play when the Left Mouse Button is clicked, but when I click the Left Mouse Button, the animation glitches for a second and just continues to be idle, like it's trying to play the Attack animation but goes back to Idle anyway. I know this probably has something to do with him still not moving and clicking the button at the same time but I dont know how to separate the two.

  • Yeah your animations are conflicting. I normally have multiple groups for animations, then toggle them on or off so they don't conflict.

    Try putting all your 'basic' animations in a group like walking, idle, jumping, falling, etc. Then put your attacking ones in another group.

    When you attack, deactivate the basic animation group. When the attack animation is finished, or your attacking value is 1 but the animation is not playing, re-activate the basic group and deactivate the attacking group.

    You can also just add more conditions like "Play idle if attacking is 0" but that can get messy.

  • There are some good examples of state based platform engines on the forum that will probably help to solve this. Do a search for those terms and you should find them fairly easily, one was by Minor, the other was by another member (forget who) but I think it was called 'Super Platformer' or something like that. It was much more complex and used the function object but was very impressive

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Tokinsom, your grouping idea worked like a charm, thank you! And untune, thank you for directing me towards those forum topics, I took a look at them and they are actually pretty helpful for other things as well. <img src="smileys/smiley1.gif" border="0" align="middle" />

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