Rpg Maker MV defeat a room of enemies question.

liamx2000

Veteran
Veteran
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
Veteran
Joined
Oct 8, 2018
Messages
6,651
Reaction score
2,581
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,883
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
Veteran
Joined
Oct 8, 2018
Messages
6,651
Reaction score
2,581
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

Veteran
Veteran
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

Thinking of getting a mechanical keyboard, eventually! Would anyone be interested in a chill keycap-painting stream?
Walked through the rain to take pictures of an 50+ year old printing press for my students. Hope they will honor that effort xD
Can I promote my %75 OFF Creator Day Sale here, or it's against forum rules as well? :kaocry:
Tests for an alert system that spawns enemy reinforcements, as a stealth game should do :kaoswt2:
playing around animations with character sprites. having parallel events playing around with variables while also having an event have that same variable does wonders.

Forum statistics

Threads
126,908
Messages
1,182,250
Members
166,713
Latest member
escuro
Top