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,364
Reaction score
15,179
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
707
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

JRPG Maker
Veteran
Joined
Jun 4, 2021
Messages
84
Reaction score
63
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
707
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

Doing RPG Maker News for 21st September 2021


Malak is still waiting for Dark Deception Chapter 4... This was him yesterday after another sugar crash.
Again, he's fine. He's just bored at this point, considering he's exhausted his entire vacation bucket list.
Am I the only one who files custom resources under specific folders to remember who to credit? :kaoswt2:
1632263519730.png
I always smile to myself when I see someone do the "immediate halt and spin around" from forgetting something. I find it sort of endearing how we all do it without ever being taught to.

Forum statistics

Threads
115,260
Messages
1,088,432
Members
149,862
Latest member
raeellee
Top