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,909
Reaction score
15,001
First Language
English
Primarily Uses
RMMV

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

 

Restart

Veteran
Veteran
Joined
Mar 15, 2019
Messages
833
Reaction score
671
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
62
Reaction score
47
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
833
Reaction score
671
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

Last week at SLC. Cali awaits. TBH I love SLC more than SF.
Back home now. I had a good time, but I had a checkup this morning so I had to come home for that. Now I'm just waiting for my therapist meeting tomorrow...
Decided to work on Wishful Wanda today. Since it's a BFB spinoff game, I decided to make the Huang brothers
Easter eggs! I'm actually pitching this to the BFDI team, btw.
I'm a bit perturbed that my two week project in a different engine is already shaping up to be far better than anything I've done in this one. It really calls into question my future plans. :kaoswt:

I guess I'll release whatever patches I made for Poppet Quest, then abandon it for my new project. I mean unless it somehow wins (I doubt it but hey sure). I'm not sure about And Remember Tomorrow.
It's really not fun burning 4 hours looking at code and trying certain things and getting no where.
:kaoswt2: Steam seems down again... oh nevermind, it's up now

Forum statistics

Threads
113,931
Messages
1,078,482
Members
148,037
Latest member
Neky
Top