Sorry if this is a complete n00b question but I wanted to set up battle events for the enemies where they would say something when their hitpoints got low enough. But I obviously don't want them to say something on death (or... I'd do that), so how do I tell the battle event not to play the event if the enemy dies?
Stop Battle Event From Occurring if Enemy Is KO'ed?
RPG Maker MV SupportYou'll have to add another conditional branch to check if their HP is above 0% HP as well. So you'll need a conditional branch inside a conditional branch to pull this off.
I'll have to play around with this later but I didn't think there was a way to do conditional branches in battle events. Besides the main conditional branch that acts like a page condition.
Page 3 has one for enemy, though it does appear to be limited to appeared or has state x inflicted. So try if enemy has KO inflicted, don't run the text, else run the text? See if that does the trick.
Yeah, I'll try it out. Depending on how many pages you get of battle events, I wonder if setting up another event that will run when the enemy dies would take precedence over if they're under a certain amount of hp.
You can also do control variables to get the enemy's HP into a variable and check that it's > 0
It's actually a little complicated to do this. I ended up giving the enemies two speeches: one when their HP dipped below 40% and the other when they died. I could have done things the way I originally intended, with just the one speech, but either way, I would have had to set it up the same, just without a new speech in the second page. So what I did was for each enemy I made two event pages, one at or below 40% and the other for at or below 0% health. Then, before the battle starts, I made the enemies immortal. On the page with the 0% condition, at the end, I removed the immortal state. Now, I'm not sure how to get this to work properly for random battles, but I don't intend to have random battles in my game, nor would I want convos with random enemies anyway, so I guess that's fine. LOL
If it is in your Troop Event then it will run for random events as well because, by definition, the engine has to use the troop event to give you a battle.
One point, the speech at "below 40% HP" will run every turn that this condition is met. Do you want them to keep repeating it? If not, you will need to have another conditional inside the 'below 40%' one and have a switch so that the speech runs of switch #n is OFF and at the end of the speech turn that switch ON.
I see where I messed up. I needed to make a page event for the first round and make enemies immortal in there. That way I could even use this with random enemies if I were so inclined.
I will say, tho, that an easier way to not have enemies repeat themselves is to make the span set to "Battle." Then it will only do it once per battle. Really wish they had the chance style event that was in RPG Maker on the PS1 cuz then you could make up a random message that would only play some of the time. Could have several different things appear at random.
I will say, tho, that an easier way to not have enemies repeat themselves is to make the span set to "Battle." Then it will only do it once per battle. Really wish they had the chance style event that was in RPG Maker on the PS1 cuz then you could make up a random message that would only play some of the time. Could have several different things appear at random.
It is possible to have random messages, though it is a bit of work to set it up.
Set a variable to some random range, e.g. 0-5
Conditionals
variable is 0 or 1, nothing
variable is 2, text A
variable is 3 text B
etc.
Set a variable to some random range, e.g. 0-5
Conditionals
variable is 0 or 1, nothing
variable is 2, text A
variable is 3 text B
etc.
How would you get the variable to change at random?
Select Control Variables,
Make a new switch and name it so that you don't accidentally use it for something else.
Then go to the bottom half of that mini-screen, select 'Random' and set the range you want.
Make a new switch and name it so that you don't accidentally use it for something else.
Then go to the bottom half of that mini-screen, select 'Random' and set the range you want.
Huh, didn't know you could do that! I swear, when I figure this system out, I'm gonna make hella tutorial videos LOL
Original thread: https://forums.rpgmakerweb.com/threads/stop-battle-event-from-occurring-if-enemy-is-koed.95607/