Hi all, I'm trying to make my goblin king appear only after all the minions are dead. There are 4 minions in total. I tried something like below but it only ends the game without getting the goblin king to appear. I can't seem to get it to work.
Boss to appear after minions are all dead
RPG Maker MZ SupportYou've set your condition to "Don't run". If you do that, it...won't run. You need to give it a condition for when to actually execute.
I tried a few other conditions and all of them doesn't work and I think because my condition doesn't kick in when every enemy dies. If there is no other solution to this, I might have to tweak it so that the boss only appears after the HP is lower than a certain amount.
Add the boss with the other troops and right click on him. After that, select "appear mid-battle" and then try to run your command and see if it works.
(And change the span of the command from "turn" to "battle" if it doesn't work. Just don't forget to set a self switch after the boss appear so that the event doesn't run again and again)
I'm not quite 100% certain here, but I don't think this if condition works.
You can try adding +1 to a variable whenever a goblin is dead and then make the event page if "goblin counter" = 4 , enemy appear.
You can try adding +1 to a variable whenever a goblin is dead and then make the event page if "goblin counter" = 4 , enemy appear.
Thanks both. I'll give those options a try.
I had this problem where the counter keeps on going up even for 1 dead goblin because the same goblin gets checked every turn.
If each death adds to a variable, and the enemy spawn is reading off that variable, I see no reason it shouldn't work perfect.
Your original method (almost) can work if you use a common trick.
At the beginning of the battle, give all your goblins an Immortal state. You make four identical troop events - each one has the condition of one of the goblins having HP <= 0%.
Inside of it, you check whether the other three goblins are dead, and if yes, spawn your boss. Then, outside of the conditional, you remove the immortal state from that goblin to let it die.
Neither of the plugins you linked to will work for this on their own, as they don't mention that specific functionality. (also, I think you mistyped, the HimeWorks plugin is for MV, not MZ)
The HimeWorks plugin End Phase Triggers was a common solution for this in MV, but I don't know that it will work in MZ. It's not on the compatibility list for Project FOSSIL, which doesn't mean it's impossible for it to work natively, but I haven't seen any information from anyone trying it.
At the beginning of the battle, give all your goblins an Immortal state. You make four identical troop events - each one has the condition of one of the goblins having HP <= 0%.
Inside of it, you check whether the other three goblins are dead, and if yes, spawn your boss. Then, outside of the conditional, you remove the immortal state from that goblin to let it die.
Because the default engine automatically ends a battle as soon as all members of the troop are dead. It will not increment that variable the fourth time and it won't execute any other events unless you use a plugin.
Neither of the plugins you linked to will work for this on their own, as they don't mention that specific functionality. (also, I think you mistyped, the HimeWorks plugin is for MV, not MZ)
The HimeWorks plugin End Phase Triggers was a common solution for this in MV, but I don't know that it will work in MZ. It's not on the compatibility list for Project FOSSIL, which doesn't mean it's impossible for it to work natively, but I haven't seen any information from anyone trying it.
That's why you'd have a separate troop event for each goblin with the span of Battle.
If you simply set the enemy/troop to spawn in when the 4th goblin is 1% or below it should work? I have done this before and the boss spawned in even when my attack killed the last enemy in one blow. The chances of you landing in that 1% margin are so damn slim it would not bother me personally.
So a 4 page battle event, 3 for adding to a variable for the first three goblins death, and a 4th page that when the last goblin is at 1% or less, do a variable check, the boss mob appears. You could even make the 4th goblin take damage to finish it off in the event at 1% or below, and then the boss appears. Nobody would ever notice lol. And this would work with no plugins at all.
I can't speak for what you managed to make work in some way, but I can promise you events will not run when the troop is completely dead without plugins.
It is possible for it to work if you use 1% as the condition and their HP lands at a value between 0% and 1%, but that's not the scenario the OP wants (as the goblin would be alive at that point).
I think it's more likely that you had such a plugin installed and didn't realize it was being done or forgot about it 😉
The only way to make this work with no plugins is to use the immortal state trick as I mentioned above. It's pretty quick for you to test this yourself in a new project, or to find some of the many threads on the topic.
This actually works pretty well. Some tweaking required. Removing state from goblin to let it die outside of condition doesn't work. Instead removing the immortal state under if then ELSE works for me. Not sure why. Another thing is I could not figure out how to hide the immortal state from popping up, so I created a new empty state with resist Dead. That kinda do the trick.
Original thread: https://forums.rpgmakerweb.com/threads/boss-to-appear-after-minions-are-all-dead.153952/