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,365
Reaction score
8,087
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

oddly enough, at this point... 3 major things have kept me from porting my project to MZ... animations, and that's mainly because they don't match the artstyle of my game. and two... I NEED a YED Sideview Battler like plugin and I have yet to see one. 3rd, I don't have the money for all the stuff I need plugin wise. and I already have it on MV... lol
Generally speaking, would there be interest in some form of tutorial regarding general project management? I see there are a lot of indie/self-taught devs around here, and looking back i feel like there was a lack of resources on how to properly manage a project that might take several years to finish
I've been working on some ABS team A.I. for 'A New Suburbia', and thought I'd share.

I'm generally quite please although the AI is a little grenade heavy right now :rolleyes: - Sneaking and stalking next! Please excuse the terrible map... it was just for ease of viewing!
Voting for the second round of the Map Madness Tournament is now live! Vote for your favorite in each matchup! https://forums.rpgmakerweb.com/index.php?forums/map-madness-2021-polls.187/
Just bought the Visustella All Waves bundle... Time to go IN!!

Forum statistics

Threads
110,577
Messages
1,054,356
Members
143,693
Latest member
speedylmao
Top