Hello,
I'd like to temporarily change the player's priority to Below Characters, so that events will walk right over the player. I know I could instead change the priority of all the moving events to Above Characters, but I don't want to do that for other reasons. Is there a way to change the player character's priority?
Thanks!
If it's the player, $gamePlayer.setPriorityType(0) will make the player Below Characters.
If it's one or more followers, it'll be $gamePlayer.followers()[n].setPriorityType(0) where n is the follower number. Use 0 instead of n for the first follower, 1 for the second, and 2 for the third.
You might need to add $gameMap.requestRefresh() afterwards.
no
depending on what exactly you want you might set the player to through, or set the events to through instead - but that disables all passability checks.
if you give us a description of what you want to do (ingame terms) instead of how you want to do it, we might be able to point you to another solution
EDIT: ninja's, didn't know the script command
What DOES happen? Is it that your player can't go through those events, or when they go through, they're not showing under them?
Changing the priority will not allow a player to go through an event if the event is not set to through.
The alternative is to just change the events' priority to be above characters. You could do this by turning on a switch, and giving all events an additional page conditioned by that switch, with the same image, but Above Characters.
I did explain that changing the player's priority will not suddenly allow them to go through events, unless the events, or the player, are set to Through.
I also added an edit to say you could just change the priority of the events rather than the player. That might be a better option.
So, when you posted your request, I thought you were only asking for a way to ensure the player's sprite showed below an event's. I assumed you had already taken care of where everyone could go (in fact I didn't even think about it to be honest).
Priority is used for two things. It's used to determine what image gets displayed on top when two objects are on the same tile. It's also used to determine whether objects CAN go onto the same tile. The snippet I gave you only takes care of the first, not the second.
There's quite a bit of coding around where events can and can't go, and what makes a player interact with an event. It works on the assumption that the player is always going to be 'Same as Characters' priority and that events can't move onto a tile where the player is or where another event is, unless one of the two is set to through.
So to change that, you'd probably need a full, proper plugin, rather than just a code snippet to change the appearance. There are also quite a few plugins out there that do manipulate this a bit, so anything that was written for you would run the risk of being incompatible with others.