Can't use other animation while returning to the original one

Hello,

I’m currently experiencing something wierd… I’m making my sprite changing form when is life is under 10HP, but when he returns to the normal, the only animation playing is “Idle Right”
I’m trying to get the other animation working too after this (for ex: running when pressing left, jump etc…) But he keep doing Idle Right even if I used a Trigger once…

If someone as an idea of what I did wrong ^^

In the second event of your screen snip, you delete the life object after colliding with it, you increase the HP and you have a trigger once. These conditions prevent the actions being run continuously.

Instead, it suggests that there are other animation setting actions you haven’t shown. Please screen snip these other events.

And what are you doing with the global variable “Normal”?

Hi, thx for ure answer,
the other actions are thoses : SC 1 and SC 2, but i managed to make it working a time ago but now it doesnt work anymore, bc I tried to expand it on all the other scene with the Variable “Normal” set as true went player is moving shooting etc… and set on false when the animation is Core X


What do those events do? Can you give screen shots of them?


From your first set of screen shots, you only change it to “Core-X” if HP < 10, or “idle right” if HP < 10 and player is touching life object.

But where do you set it to another animation?


BTW, just some tips - if this is saying “set Normal to false if animation is Core-X and HP < 10, otherwise set Normal to true” :

then it can be reduced to :


And this :

could be better written as :

It’s cleaner and more efficient.

Thanks for the tips, i’m really bad at coding so I let u imagine how my player works (hint : almost 200 lines of codes for simple moves and directions, i have many of them (like in the 2D metroid games in fact)

I adjusted my code as what u told me

In fact when u go under 10HP the player become a Core X, (SC 2)
so its not able to shoot jump etc… but when it touch the life its supposed to go back to its normal state (SC 1),
the problem is that I coded it, and with the “Idle_Right” animation, it stay locked on this postition until i exit the room…

Normal :

Capture d’écran 2021-11-15 004859

Core X :

Capture d’écran 2021-11-15 004918

Yes, because there is nowhere in the screen snips you’ve provided which appear to change the animation to anything else.