How can I Show a Picture after all enemies are defeated?

greensdream

"GREEN'S DREAM" developer page
Veteran
Joined
Jul 15, 2017
Messages
63
Reaction score
27
First Language
English
Primarily Uses
RMMV
I would like to Show a Picture after all the enemies in a battle have been defeated. I don't see this option in the Troops tab.

The closest to what I need might be accomplished by using the Switch option, but I'd need some way to have the Switch turn on once all the enemies are defeated. Maybe there is another way?
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
32,353
Reaction score
8,081
First Language
German
Primarily Uses
RMMV
neither will work as is, because there is another problem in the way: the troop events will not be executed after the last enemy dies, it goes directly to the battle aftermath unless you trick the engine.

you'll need a variable for death counting and several troop events as well as an invisible immortal state.
you'll need one troop event to be run on turn 0 that sets the variable to the number of enemies in the troop (either manually or by script) and that gives all enemies an invisible immortal state (no messages, no icon, trait is resistance to death state).

then you'll make one troop event per enemy, conditioned on that enemies HP=0.
This troop event will count the enemies down by one, then check if the variable is zero.
If yes, display picture.
In both cases remove the immortal state after that, making the enemy correctly die only after the troop event has run.

Most people doing this also implement a bast troop plugin that copies all events from the base troop to all troops, so they don't have to manually set these events up for every troop,
 

Latest Threads

Latest Posts

Latest Profile Posts

unknown.png

A sketch of a character for an upcoming chapter. I am pre-preparing the heck out of this one and future chapters, don't want to spend time figuring the story out again. :blush:
Today *Fix the game UI
RMMZ maxRows make me tired.
The game supports real-time language switching (really interesting).
8laFKAa.png


jBYDFzZ.png


lYbvPth.png

mY99lgU.png

Swag collecting in the new randomly generated area. Now the mini map also shows the randomly generated features... And even illustrates the whole "bubble" system" that I made to manage memory... Though that part's inadvertent. We'll just call that "the fog of war"... Yes, that's what we'll do. Nobody will be the wiser! :kaopride:
not me being not lazy for 5 seconds and drawing another char portrait (her name is hazel)
its_hazel.png
Been a while since the last time I made a song remix. Had a blast making this

Forum statistics

Threads
110,457
Messages
1,053,454
Members
143,549
Latest member
darkgale
Top