Rpg Maker MV defeat a room of enemies question.

liamx2000

Regular
Regular
Joined
Feb 13, 2016
Messages
89
Reaction score
7
First Language
English
Primarily Uses
Hi all , in one of my dungeons I want to be able to do a Zelda like puzzle where you have to defeat a room of enemies to open a door, so my room has four enemies walking around and when you walk into them a battle starts so now I just want to be able to make it so the game knows when all four enemies have been beaten that the door to the next room will open , whats the best way to achieve this ?
Hope I posted this in the right place also as I can't see a help section.
 

ShadowDragon

Realist
Regular
Joined
Oct 8, 2018
Messages
7,740
Reaction score
3,161
First Language
Dutch
Primarily Uses
RMMV
if its on map enemies, when battle starts
when win
variable x +1
when lose
nothing here (or game over)

use a variable that can be set to 0 to re-use it for a different thing with
similair effect.

on the door, make sure to see if variable x >= 4 so the door can be opend.
 

Wavelength

MSD Strong
Global Mod
Joined
Jul 22, 2014
Messages
6,114
Reaction score
5,910
First Language
English
Primarily Uses
RMVXA
Simply have each Enemy Encounter event increase a variable (Control Variables) when it's defeated. Then, give the door two event pages: the first has no condition and is a locked door; the second page has a condition that the variable must be 4 or greater, and is an open door that will take you to the next room (or let you walk through it to the next room).

The one thing you have to be careful about is the Events coming back. You either need to make sure they don't come back (by also having them turn on a Self Switch when defeated, and making their last Event Page require this self switch and there's literally nothing on that page, not even an enemy sprite)... or, you need to reset the Variable to 0 whenever the player enters the room if the enemies also respawn into it.
 

ShadowDragon

Realist
Regular
Joined
Oct 8, 2018
Messages
7,740
Reaction score
3,161
First Language
Dutch
Primarily Uses
RMMV
you can do also do 1 event page and use a conditional branch

if: if variable x = 4 (because of 4 enemies)
open door here
self switch A = ON
else
The door is locked
end

event page 2 can be transfer only, if you dont reset the variable,
if enemies respawn, reset variable to 0 upon entering that room.
than you have a static 1 page event.

but there are some methodes that can fit, there are around 4 different methodes
on how to unlock the door to your needs.
but the basic one is how WaveLenghts provides or me, but 1 variable is needed.

conditional branch is more usefull in this case though, but its up to you how to approach it.
 

liamx2000

Regular
Regular
Joined
Feb 13, 2016
Messages
89
Reaction score
7
First Language
English
Primarily Uses
Thank you all I shall give it a go.
 

Latest Threads

Latest Posts

Latest Profile Posts

New update for Battle Castle: Shadow from the Past A Shadow's Echo. No gameplay changes or new content, but lots of things got renamed, including the game title, for extra immersion. Some things related to sound too, like activating chests and taking things.
Obvious One.gif
Meet my new mascot. He's also a mimic! No prizes for guessing this guy's name, though, haha
BANNER2.png
I put out a new pack and I swear, I did not realize how it looks like the ones on the right are scared/nervous of the one on the left until way after o_O I just wanted to showcase some of them randomly xD
Well, if anyone has a funny, simple, easy RM game they want me to playtest/review, I would love it.
Someone close to me straight up told me they didn't think my relationship with my girlfriend would last. No lead up, very bluntly. Like it's obvious or something. Trying not to let it get to my head, but it's hard.
The distraction would be a life saver.
QuestMZPlugin.png

My first foray into a plugin that I plan to release. Working on something for those who want to set up a Dragon Quest style battle HUD with minimal fuss. Includes the ability to round the battleback corners to fit your windowskin and, of course, front-view animations.

QuestMZPLugin_CustomWindow.png

Forum statistics

Threads
134,756
Messages
1,250,359
Members
177,520
Latest member
crimnt
Top