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

Joined
Jul 12, 2020
Messages
96
Reaction score
18
First Language
English
Primarily Uses
RMMV
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?
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,430
Reaction score
7,711
First Language
German
Primarily Uses
RMMV
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...
 

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
7,867
Reaction score
5,240
First Language
Dutch
Primarily Uses
RMXP

I've moved this thread to Plugin Requests. Please be sure to post your threads in the correct forum next time. Thank you.

 
Joined
Jul 12, 2020
Messages
96
Reaction score
18
First Language
English
Primarily Uses
RMMV
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.
 
Joined
Jul 12, 2020
Messages
96
Reaction score
18
First Language
English
Primarily Uses
RMMV
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?
 

ramza

Lunatic Coder
Veteran
Joined
Jan 28, 2013
Messages
781
Reaction score
492
First Language
English
Primarily Uses
RMMV
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.
 
Joined
Jul 12, 2020
Messages
96
Reaction score
18
First Language
English
Primarily Uses
RMMV
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 : )
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.
Can someone recommend some fun story-heavy RPGs to me? Coming up with good gameplay is a nightmare! I was thinking of making some gameplay platforming-based, but that doesn't work well in RPG form*. I also was thinking of removing battles, but that would be too much like OneShot. I don't even know how to make good puzzles!
one bad plugin combo later and one of my followers is moonwalking off the screen on his own... I didn't even more yet on the new map lol.

Forum statistics

Threads
106,035
Messages
1,018,454
Members
137,821
Latest member
Capterson
Top