Problem with a Coin Toss Skill (Using Lunatic State BTW)

So, I'm making a state that have an effect depending on a Coin Toss. 3 Coins to be exactly.
I made an animation for every possible combination of throw (because I couldn't combine 3 of the same animation, but that's not the point here).

Now, I made a state call in the lunatic state that it works with the "react" tag. So, when I'm being attacked, this state pops the effect.
I tried the effect in 2 different ways:

1658160817552.png
1658160912936.png


So, the state has actually just 2 effects. The first one is when you land 3 heads, which is the animation 146.
The other is when you land it in 3 tails, which is animation 147.
For some reason, the second effect some times appear with other animations. I'm doing something wrong?
Is there a better method to accomplish what I want?
For some reason, the second effect some times appear with other animations.
Kind of makes sense, but your popup system must be seeing the change in hp and playing an animation for it.

Or do you mean it plays animation 146 and 147 sometimes?
The first version looks fine, but I would have done what you did in the second.
coin = rand(8)
case coin
when 0
Kind of makes sense, but your popup system must be seeing the change in hp and playing an animation for it.
Yeah, and I also have a problem. This state applies with the "react" tag. But for some reason, the animation of the coin happen after the damage and animation of the opponent attack, and not only that, but the animation doesn't wait for it to resolve. As the enemy's attack resolve I see the coin and my turn starting at the same time.
I tried with the "wait_for_animation" and even "wait(60)" but those command doesn't work with the lunatic state for some reason because looks like they can't be related to the actor. The Game_Actor always return an error with lunatic state when I tried some weird script calls.

Original thread: https://forums.rpgmakerweb.com/threads/problem-with-a-coin-toss-skill-using-lunatic-state-btw.149588/