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,894
Reaction score
14,994
First Language
English
Primarily Uses
RMMV

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

 

Restart

Veteran
Veteran
Joined
Mar 15, 2019
Messages
832
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
61
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
832
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

Ami
need a time to not open my MV,still addicted with new vegas

i wonder what addiction effect behind playing new vegas too much,maybe INT & Science gone worse in many days :D
cdjensen94 wrote on Kaliya's profile.
Are you the one who develops Kaliya's Visual Map Enhancements. If so I desperately need some help. I bought the plugin back a few months. I've only started using it recently.
Cause MP Damage instead of HP, Localization Plugin for Translation | RPG Maker News #112

Here in Fla were are seeing crazy covid spikes and some vaccinated getting bad infections. I had a mild fever on Thurs but it went down fast. How is everyone else doing. Hopefully you are all well. :)
Wish I was better at art, specifically that I was faster at it, bc this one NPC took Several Days to complete! It's gonna take So Extremely Long to do all of the art for my game, never mind writing it... Anyways, here's my gorgon, Hopernica Sthyxis!

57b88732c7abbcd84981dacf624a98495af61fcc.gifv

Forum statistics

Threads
113,826
Messages
1,077,744
Members
147,884
Latest member
erora
Top