So, I have a minecart. The minecart is set to "Same as character". When the player enters the minecart, they jump forward onto the minecart, and I do some fancy graphic changing stuff and off they go. The problem is, because the minecart is "Same as character", coming from below the minecart causes them to be under the minecart for a couple frames. So, before the character jumps, I want to set the minecart to be "below characters" so that graphic glitch doesn't occur, then change it back to "Same as character". I've searched and searched through both the Script Call List and Script Call Reference, but neither seems to have an option for changing the priority of an event, and unless I'm just missing it, neither does the "Set Movement Route" command or any other built-in command. So, I was wondering if there was a way to do this via a command I'm just not seeing (I do have terrible eyesight), or if there's a script call I need. If the latter, I need to know what that script call is, cause I can't seem to find it (but again, I have terrible eyesight, so I might just be missing it in the reference/list).
Changing the priority of an event via command?
RPG Maker MZ SupportJust give the minecart a separate page with below player and turn that on briefly when the player is jumping in from below by checking if play is facing up. set that to parallel an turn the self switch off after however many frames you need.
In case you are looking for it, it's in row 588/589 of the Script Calls Spreadsheet:
You can use
to set the priority to below character of the event running this code. Setting it to 1 is same as character.
JavaScript:
// Get the current priority for map event 1
$gameMap.event(1)._priorityType;
// Set map event 6 to Above characters priority
$gameMap.event(6).setPriorityType(2);
You can use
JavaScript:
this.character(0).setPriorityType(0)
If the priority change supposed to be only temporary, just switch between the page
The first page should be your normal event:
After that, switch to the second page using self switch and use autorun:
The second page priority will be below characters and running in autorun as to continue the normal event. At the end switch back to the first page by turning off the self switch.
The first page should be your normal event:
After that, switch to the second page using self switch and use autorun:
The second page priority will be below characters and running in autorun as to continue the normal event. At the end switch back to the first page by turning off the self switch.
Thanks, this helped tremendously! It's solved my main issue. Now I'm just trying to figure out... if there's some way to like... attach the player to an event... or move the event and player at the exact same time...At the moment, I'm changing the player's graphic to a version of them ridding in the minecart but... I forgot, I have an outfit system... so, I need a method of making both the event and player move at the same time.
Original thread: https://forums.rpgmakerweb.com/threads/changing-the-priority-of-an-event-via-command.169174/