CyrusVisser

Villager
Member
Joined
Jun 18, 2021
Messages
12
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
43,334
Reaction score
15,157
First Language
English
Primarily Uses
RMMV

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

 

Restart

Veteran
Veteran
Joined
Mar 15, 2019
Messages
848
Reaction score
706
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
12
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
77
Reaction score
58
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
848
Reaction score
706
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 Profile Posts

Holy cow, I have made Row Formation work again with OTB!

Now, my devious machinations can finally be born...
finished the second chapter of deltarune today, I gotta say that the 3 years wait was worth it lol

Forum statistics

Threads
115,151
Messages
1,087,673
Members
149,683
Latest member
jdavi
Top