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

Just started using Construct 2? Post your questions here

Post » Sun Aug 03, 2014 1:46 pm

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
Last edited by Vallar on Mon Aug 04, 2014 1:35 am, edited 1 time in total.
B
19
S
7
Posts: 161
Reputation: 1,751

Post » Sun Aug 03, 2014 9:24 pm

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.
B
86
S
43
G
71
Posts: 601
Reputation: 43,619

Post » Mon Aug 04, 2014 1:34 am

Oh, I always forgot about these two things >.< thank you very much, that really did it
B
19
S
7
Posts: 161
Reputation: 1,751


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 1 guest