Two Conflicting Events

This is for MV.

So, I just encountered a problem with my game. In the screenshot below, you can see I have narrow paths through a storage room. The event on the path, in front of the player, is a lighting event.

1672522684164.png


In my game battles aren't random. There are enemy sprites patrolling the maps. Also... you don't obtain your loot during the battle scene (once you win). I have a loot box that drops where the enemy event was once it triggered. Players can then open the loot box for randomized items.

The problem is if the player happens to be standing on the lighting event when the battle triggers... when it's over, that player can't loot the box in front of them because they're on the lighting event... and the engine is attemping to interact with that event instead. I'm guessing events the player stands on take priority over those in front of them. So... is there a way to set, within an event, that it should take priority over another? So... if this does happen, the lighting event has lower priority and the treasure event has higher... so players will open the chest instead?

I do have a workaround. I'm moving the lighting event off the path and setting the x-offset. So, that does fix it, but I'm also curious if there is way to fix the issue above without doing this... in case I run into this issue in the future.

Figured I'd ask 🙂
Is the lighting event plugin based or an image/movement?
Actually, the ID of the event might be the cause of the priority. Try this:

Take the event with the lowest ID and make a copy of it. Then delete the original. Then drag the copy to the place of the original. Now the new copy should have an higher ID than the event it clashes with.

Hope that helps!
This is because of how the MV core scripts check targets for the action button. The default order is:
  1. Get on/off vehicle;
  2. Trigger event "here", i.e. on the same tile as the player ("below/above characters");
  3. Trigger event "there", i.e. a "same as characters" priority event:
    • 1 tile in front, or if that fails and the tile is a counter, then...
    • 2 tiles in front.
Only the first one in the list applies, so as you are seeing, standing on a "below characters" action button event will block interaction with a "same as characters" action button event.

If you want to change this, you'd need a plugin. I wrote one named Cae_TwoEventsOneTrigger (link to plugin, link to thread): it lets you trigger all 3 of these cases (vehicle, here, and there) once per press of the action button. They will still run one at a time in the same order: "here", then "there".

I'm not sure if that will have any unwanted side-effects, though...safest to just work around it the default behaviour instead~
This is because of how the MV core scripts check targets for the action button. The default order is:
  1. Get on/off vehicle;
  2. Trigger event "here", i.e. on the same tile as the player ("below/above characters");
  3. Trigger event "there", i.e. a "same as characters" priority event:
    • 1 tile in front, or if that fails and the tile is a counter, then...
    • 2 tiles in front.
Only the first one in the list applies, so as you are seeing, standing on a "below characters" action button event will block interaction with a "same as characters" action button event.

If you want to change this, you'd need a plugin. I wrote one named Cae_TwoEventsOneTrigger (link to plugin, link to thread): it lets you trigger all 3 of these cases (vehicle, here, and there) once per press of the action button. They will still run one at a time in the same order: "here", then "there".

I'm not sure if that will have any unwanted side-effects, though...safest to just work around it the default behaviour instead~
Thanks. I'll check the plugin out, but I agree... there are workarounds for this. Glad I accidentally discovered it. Was not aware of this until it happened. Really appreciate you taking the time to explain that!

Actually, the ID of the event might be the cause of the priority. Try this:

Take the event with the lowest ID and make a copy of it. Then delete the original. Then drag the copy to the place of the original. Now the new copy should have an higher ID than the event it clashes with.

Hope that helps!
I can always give that a try and test it. I'll let you know if it works.

Is the lighting event plugin based or an image/movement?
Image. The lighting plugin command has to be within an event for it to trigger on that location. Good news is I can change the X & Y offset, so I easily just moved it to a safe tile and shifted it with the X-offset.
I can always give that a try and test it. I'll let you know if it works.
Well... Caeth is probably right. And that would mean I am not.

Original thread: https://forums.rpgmakerweb.com/threads/two-conflicting-events.153651/