If you have the "(Wait)" next to the Movement Route: Name, then that means you have it set so the player can't move at all until the movement route is finished processing. So I don't see how they COULD interact with the event, or am I missing something? 🤔
It's a parallel process so it runs together with every other event, so it's not waiting on the player, it's waiting on the event.
I set it to wait or else it would immediately change his Self Switch using the code below it, and then he totally wouldn't work at all.
I promise he works fine 🙂
Just want a way to stop the player from talking to him WHILE he's moving.
@Andar
I don't use the pages themselves because a lot of times I wish to have them say somthing depending on where they are and I ALWAYS need them set to parallel so they move depending on what time it is.
So when they are on Parallel they will keep repeating the lines of code over and over unless I use another event to control all of their switches.
Honestly all I was looking for was to see if there was a script you could put in a move route to prevent the player from talking to that person until the move route is complete.
As for the whole pages and times I've already had to spend a lot of time editing it to fix other problems and my problems are solved and I'm learning how to use what I' using better, but dealing with these pages and switches aren't what I'm looking for right now.
@Andar
I know I'm going to have several issues with the way I'm linking times and switches and stuff but I want to encounter those and learn how to fix them
through trial and error or else I'll never really get better.
But as for the script I'm trying to find, that's not that easy..??
Oh and before I forget to mention, my hours and minutes are assigned to two different variables using different amounts so i can't combine them into one variable unless i find some while entire way to change how I do this and oh boy.... ??
But I don't want to use the autonomous movement section with multiple pages because he will keep repeating the movement over and over or if I set it to stop he will repeat it from his current location every time I enter the map.
I want him put at specific points so that's why I'm using move routes under if statements.
The parallel processing event I have has more than several if statements constantly checking for the exact time it is, what he should do depending on what time and where he's at, and where to move to.
It works like a charm for me, it's just really messy.
I don't have any 'problems' currently I just want it so the player can't interact with the person while they're moving because then when the script "this.SavePos()" goes to save, it saves whatever direction the person is playing when the player talks to them and then once they are done moving they are facing the wrong way..
This is a bit kludgy, but you can add a script before the move route that disables player interaction altogether:
$gamePlayer.canInteractWithEvents = false;
$gamePlayer.canStartLocalEvents = function() {
return this.canInteractWithEvents && !this.isInAirship();
};
Then after the move route, re-enable interaction:
$gamePlayer.canInteractWithEvents = true;
Note this will disable interaction with all events for the duration of the move-route; you could probably jerry-rig something similar that would exclude only certain events.
Can it not be, like,
$gamePlayer.canInteractWith.thisEvent() = False
or something? x'D
I've never honestly worked with scripts
Good question. The key piece in the above snippet is this part:
$gamePlayer.canStartLocalEvents = function() {
return this.canInteractWithEvents && !this.isInAirship();
};
This is an existing function in the Game_Player class. The default looks like this:
Game_Player.prototype.canStartLocalEvents = function() {
return !this.isInAirship();
};
The above code assigns that function to each instance of the Game_Player class. The snippet overrides that function, which is used in multiple places, for example:
Game_Player.prototype.checkEventTriggerHere = function(triggers) {
if (this.canStartLocalEvents()) {
this.startMapEvent(this.x, this.y, triggers, false);
}
};
and
Game_Player.prototype.checkEventTriggerThere = function(triggers) {
if (this.canStartLocalEvents()) {
// ... do some stuff
}
};
So by overriding the function that handles event checks, all checks for event triggers are routed through the new test (whether canInteractWithEvents is true).
The canInteractWithEvents variable is arbitrary (it's a new variable we tack onto the player object), and assigned to the object in the script so it can be referenced in the updated function.
If you want to disable interaction with specific events, you probably need to override Game_Player.prototype.startMapEvent:
$gamePlayer.eventToIgnore = 4; // ID of event to ignore
$gamePlayer.startMapEvent = function(x, y, triggers, normal) {
if (!$gameMap.isEventRunning()) {
$gameMap.eventsXy(x, y).forEach(function(event) {
if (event.eventId() != $gamePlayer.eventToIgnore && event.isTriggerIn(triggers) && event.isNormalPriority() === normal) {
event.start();
}
});
}
};
Then after the move route:
$gamePlayer.eventToIgnore = -1;
Similarly kludgy, but will only ignore the specific event.