CyrusVisser

Villager
Member
Joined
Jun 18, 2021
Messages
11
Reaction score
0
First Language
english
Primarily Uses
RMMV
Im sort of new to chrono engine with rpg maker and i was wondering how to make the enemies drop items but only once. Im trying to make a links awakening style dungeon, and is there any way to make an enemy that drops an item like a key if its the last of its kind in a room, but only once.
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
42,914
Reaction score
15,006
First Language
English
Primarily Uses
RMMV

I've moved this thread to Plugin Support. Thank you.

 

Restart

Veteran
Veteran
Joined
Mar 15, 2019
Messages
834
Reaction score
672
First Language
English
Primarily Uses
RMMV
Off the top of my head, the easiest way to do this is to have a treasure chest spawn when
Code:
$gameMap.enemiesF().length==0
Put it in a parallel event or something. Sorry I'll be travelling so don't really have time to do a detailed breakdown
 

CyrusVisser

Villager
Member
Joined
Jun 18, 2021
Messages
11
Reaction score
0
First Language
english
Primarily Uses
RMMV
Off the top of my head, the easiest way to do this is to have a treasure chest spawn when
Code:
$gameMap.enemiesF().length==0
Put it in a parallel event or something. Sorry I'll be travelling so don't really have time to do a detailed breakdown
Hey, sorry if you don't have the time for this its fine, but could you elaborate more. I am very new to how rpgmaker works so I'm not really sure where I make a parrallel event and where i put the code for it.
 

ElCheffe

Veteran
Veteran
Joined
Jun 4, 2021
Messages
63
Reaction score
48
First Language
German
Primarily Uses
RMMV
A parallel event is a type of event that is running in parallel while the current map is active.
You can simply create a new event anywhere on the map.
(i would recommend to put generic events in one specific corner for all maps so it is easier to find them).

parevent.png

You can then add any script into the content of the event (there is a script option available on the 3rd tab).

But be aware that too many parallel events can impact performance so don't use them too much.
 

Restart

Veteran
Veteran
Joined
Mar 15, 2019
Messages
834
Reaction score
672
First Language
English
Primarily Uses
RMMV
yeah good practice for parallel event that are checking for things is to put in a wait condition

so page 1 of event is set to 'parallel'. It checks if there are enemies in a conditional branch (using the script I listed).
if there are >0 enemies it uses a 'wait 30' command (which means that it will wait 30 frames / half a second before continuing to the next instruction. Since parallel events activate run constantly, this means it will check again and again every half second so long as enemies are around

if there are 0 enemies you have the other side of the conditional branch. That sets self switch B and plays an animation or sound or something.


page 2 of the event is a normal treasure chest, and requires self switch B to be on.
 

Latest Threads

Latest Posts

Latest Profile Posts

me: “I’m gonna take a break from game making.”
*five hours later*
me: yeah okay fine I needed to redo that map. Sure.
The OFFICIAL RPG Maker Discord Server is Here | RPG Maker News #116

And the time has come for me to enjoy a good cup of hot cocoa before I sleep... Strangely, that actually helps.
If I ever need to stay up late working on projects, I always get tired. Do you guys think I should try G-Fuel to keep me up and focused at night? And if so, what flavor is best?
I do tend to be quite a night owl.
"Same as it ever was. Same as it ever was. Same as it... EVER was."
Ugh. This update is taking so long that I'm starting to run out of topics for the weekly blogs that I was making to make up for the fact that it was taking so long to begin with!

Forum statistics

Threads
113,966
Messages
1,078,700
Members
148,072
Latest member
raffa2k
Top