Usually event priority is changed by switching to a different event page. Is there a reason you are using a script instead?
😅
By default events decide their
_priorityType based on the event data (
$dataMap), which gets loaded when the game is launched. So if you want the
_priorityType change to remain after a player saves and quits then you'll need a plugin, e.g. something to change how event priorities are handled, or something to run an event or script on game load.
😮💨
Did you do this:
- With a Script command in an event? Or in the console?
- With a plugin (separate js file loaded via the Plugin Manager)? (Recommended!)
- By editing rpg_objects.js? (Not recommended!)
It would be much easier for us to help if we could see your code.
😅
events are automatic change priorityType when player status changed
or event are overlap each other
it's better to use Plugin
i'm not go in to save event priorityType when player quits or change Map
now i try to make sure it's work on console
and then add to my Plugin
I found if event i already interact with and when i change priorityType on console
it will immediately change on screen .
but events player are not interact yet it's not change on screen until player
interact with it.
Code:
//StepHigh is some player status return bool
Game_Event.prototype.refreshPriorityType = function(x, y) {
if(this.isEventOnSelf(x, y) && $gamePlayer.isStepHigh() && this.isNormalObject()){
this._priorityType = 0;
}else if(this.isOnEvent(x, y) && !$gamePlayer.isStepHigh() && this.isHoldableObject()){
this._priorityType = 1;
}
};
Game_Event.prototype.isEventOnSelf = function(x, y){
var events = $gameMap.eventsXy(x,y);
var eventLast = events[events.length - 1];
return events.length > 1 && eventLast.eventId() === this.eventId();
};
Game_Event.prototype.isOnEvent = function(x, y){
var events = $gameMap.eventsXy(x,y);
var eventLast = events[events.length - 1];
return events.length > 1 && !eventLast.isHoldableObject() && eventLast.eventId() !== this.eventId();
};