0 Favourites

[SOLVED]Animations won't change with On Animation Finished

  • Hello guys,

    I have made a setup where a character I have in my game has 4 types of animations dependent on damage taken. So at 3/4 of HP it will be an animation and at 1/2 will play another and so on. However, what I wanted is that when these animations end they play the default animation of that character. Think of it like any game when you hit a character it staggers a bit then goes back to its normal animation.

    I had my action as follows:

    Events:

    Character's HP is =< 15 and Character's HP is > 10 then Play animation 3/4 from beginning.

    On finished 3/4 then Play animation default from beginning

    Character's HP is =< 10 and Character's HP is > 5 then Play animation 1/2 from beginning.

    On finished 1/2 then Play animation default from beginning

    There are two problems with the above... first when the "Character's HP is =< 15 and Character's HP is > 10 then Play animation 3/4 from beginning." or any similar event is triggered the animation loops (even when the settings for the animation has loop as No" second the On Finished event never happens for some reason.

    I tried putting them at the same level as seen above (both the On Finished event and the special condition animation events). It produced the same problems. Then I thought I'd nest the On Finished event as a subevent under the special condition animation's event. Same problems occurred.

    Can anyone please point out what I am doing wrong? I have loops off. The conditions aren't part of a loop and certainly they aren't part of an Every Tick event or something similar.

    As always, thank you very much in advance

    Vallar

  • i think it's looping because as long as the hp matches those numbers, it's going to keep playing. which is also why the on finished never triggers. a "trigger once while true" might work here.

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • Oh, I always forgot about these two things >.< thank you very much, that really did it

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