How do I...call a common event with a State?

I'm trying to figure this out...

Okay so, you know how RPG Maker gives you the Knockout (state) by default?
Well, I'm trying to make it to where, when the player enters this state, (HP drops to 0), a unique death-cutscene plays before cutting away to the Game Over screen.
My first instinct was to link the state to a common event, but...there's no options for that.


Problem is, I can't find a proper trigger for it to be a global thing...
How would I go about doing that?
maybe try using this plugin?
hope this help
it can't be done by default that way, because a state cannot call a common event.

what is possible to do is using a troop event, but that needs an additional trick.

you need one troop event that gives a temporariy immortal state at the beginning of the battle, and then one troop event for each possible target/actor to check for HP=0, then play the cutscene, then remove the immortal state.

you can use a base troop plugin to copy those troop events to every battle...
You can use Yanfly State Core Plugin http://www.yanfly.moe/wiki/Buffs_&_States_Core_(YEP) and then add this to the Death State's Notetag:

Code:
<Custom Apply Effect>
$gameTemp.reserveCommonEvent(1);
</Custom Apply Effect>

Replace the 1 with the ID of your Common Event

I've moved this thread to Plugin Requests. Thank you.

Hey guys!
Thanks for the replies so far!

I sort of overl
You can use Yanfly State Core Plugin http://www.yanfly.moe/wiki/Buffs_&_States_Core_(YEP) and then add this to the Death State's Notetag:

Code:
<Custom Apply Effect>
$gameTemp.reserveCommonEvent(1);
</Custom Apply Effect>

Replace the 1 with the ID of your Common Event


Ohhhh my gosh it played the common event!!!!!

Thank you sooo much dude x//3



By the way, I'm sorry I forgot to mention this guys, but there really is no battle system in my game. I meant to say that when the player enters the state in the overworld! Because the player can only really die in the overworld.
Wait, actually...

Okay, I just realized something small:
So the common event DOES play with that coding @Aerosys
The only small problem now is like...the animation sorta plays before being abruptly cut off by the game over screen. I think what's happening is that the game detects its in the KO state, so it takes me to the game over screen WHILE playing the common event (animation) at the same time.

Any way I could tell the game to wait till the animation's over?
Wait, actually...

Okay, I just realized something small:
So the common event DOES play with that coding @Aerosys
The only small problem now is like...the animation sorta plays before being abruptly cut off by the game over screen. I think what's happening is that the game detects its in the KO state, so it takes me to the game over screen WHILE playing the common event (animation) at the same time.

Any way I could tell the game to wait till the animation's over?
Since the event begins playing, you could remove the death state at the beginning of the event, to prevent the game update from realizing you're dead at all, and then only the event will cause the gameover.
Oh my gosh!! It works like a charm!

Thank you all so much for helping me. I honestly don't feel like I'd be able to make this game without knowing I can reach out over here for help : )

Original thread: https://forums.rpgmakerweb.com/threads/how-do-i-call-a-common-event-with-a-state.129252/