I have a map, it has various areas. I am using a MapScroll plugin to show the next area when I reach the border.
I have events in each area that correspond to "enemies".
These enemies have three states:
1. Active - slime graphic - on "event touch" enable self switch A
2. Lootable (Self Switch A) - carcass Image - on "event touch", increment gold, enable self switch B and disable self switch A
3. Defeated (Self Switch B ) - no graphic - "parallel" trigger (doing nothing)
I want enemies to respawn when I return to an area so I use a different event on the border to flip self switch B for the "enemy" events which puts them back to state 1 (Active).
This seems to work but I have a few issues:
1. It doesn't work on Android, the enemy does not re-appear
2. It works intermittently on PC, the enemy sometimes re-appears
2. I think state 3 (Defeated) could be causing lag (which might explain issue 1 and 2).
The reason I think state 3 is causing lag is because I have a parallel event that does nothing (so I can remove the graphic) but I think it could be a tight loop of nothing from RPG Maker MV point of view. If I add a text box in state 3 instead the message is printed in a loop so I therefore think the engine just calls this parallel event constantly but I am doing nothing.
Is there an API I can call that means I wouldn't need state 3 and instead can "Erase Event" at state 2. There must be something because when you re-enter maps all events reset by default, I would possibly settle to be able to call whatever the engine calls when you re-enter the map but I don't know how to find that.
Thanks!
I have events in each area that correspond to "enemies".
These enemies have three states:
1. Active - slime graphic - on "event touch" enable self switch A
2. Lootable (Self Switch A) - carcass Image - on "event touch", increment gold, enable self switch B and disable self switch A
3. Defeated (Self Switch B ) - no graphic - "parallel" trigger (doing nothing)
I want enemies to respawn when I return to an area so I use a different event on the border to flip self switch B for the "enemy" events which puts them back to state 1 (Active).
This seems to work but I have a few issues:
1. It doesn't work on Android, the enemy does not re-appear
2. It works intermittently on PC, the enemy sometimes re-appears
2. I think state 3 (Defeated) could be causing lag (which might explain issue 1 and 2).
The reason I think state 3 is causing lag is because I have a parallel event that does nothing (so I can remove the graphic) but I think it could be a tight loop of nothing from RPG Maker MV point of view. If I add a text box in state 3 instead the message is printed in a loop so I therefore think the engine just calls this parallel event constantly but I am doing nothing.
Is there an API I can call that means I wouldn't need state 3 and instead can "Erase Event" at state 2. There must be something because when you re-enter maps all events reset by default, I would possibly settle to be able to call whatever the engine calls when you re-enter the map but I don't know how to find that.
Thanks!