What about, instead of setting the event to Through, before each move, do a call to $gameMap.canPass and only move if it's valid to do so? Then you won't have your events moving through walls.
Passiblity of an Event w/ No Graphic
JS Plugin RequestsIs that a plugin command or script call. And do we input it each time the event has to move?
It's a script call. I think it's $gameMap.canPass(x, y, dir) where x and y are the current coordinates. You would need to call that prior to every move. That way, if your event IS set to Through, it would not move if the player or another event should not be able to move there. So in fact you could still have your events set to Through, but it would stop them moving where you shouldn't be able to based on the terrain.
@StrawberrySmiles why don't you try Yanfly Event Chase Player plugin? : ) it has anything that you want
@Isabella Ava - I have it, but my BF wanted to event everything (to familiarize himself again). When I mention it now, he gets all huffy and says, "then I just wasted my time."
Btw, @Shaz - in VX/ACE in the default scripts, he commented out a line that did exactly what he wanted. But he couldn't figure out how to do the same in JS. Is there a way to do something similar in MV?
Game_CharacterBase -> Line 207 - > || self.is_a?(Game_Event)
#--------------------------------------------------------------------------
# * Detect Collision with Event
#--------------------------------------------------------------------------
def collide_with_events?(x, y)
$game_map.events_xy_nt(x, y).any? do |event|
event.normal_priority? #|| self.is_a?(Game_Event)
end
end
Btw, @Shaz - in VX/ACE in the default scripts, he commented out a line that did exactly what he wanted. But he couldn't figure out how to do the same in JS. Is there a way to do something similar in MV?
Game_CharacterBase -> Line 207 - > || self.is_a?(Game_Event)
#--------------------------------------------------------------------------
# * Detect Collision with Event
#--------------------------------------------------------------------------
def collide_with_events?(x, y)
$game_map.events_xy_nt(x, y).any? do |event|
event.normal_priority? #|| self.is_a?(Game_Event)
end
end
Yeah, this is a bit of a subtle change in MV that I only discovered after a while.
There is this on line 6437 of rpg_objects.js:
which is overridden with this on line 8476 of the same script:
So in Ace you only had one method that handled both events and non-events (player, vehicles, followers), and in MV you have one method for events and the other for everything else.
I suspect he could achieve the same effect in MV simply by disabling the Game_Event.prototype.isCollidedWithEvents function and allowing it to fall back to the Game_CharacterBase function, as the part he commented out from the Ace script left that method looking just like the Game_CharacterBase function in the MV script.
There is this on line 6437 of rpg_objects.js:
Code:
Game_CharacterBase.prototype.isCollidedWithEvents = function(x, y) {
var events = $gameMap.eventsXyNt(x, y);
return events.some(function(event) {
return event.isNormalPriority();
});
};
which is overridden with this on line 8476 of the same script:
Code:
Game_Event.prototype.isCollidedWithEvents = function(x, y) {
var events = $gameMap.eventsXyNt(x, y);
return events.length > 0;
};
So in Ace you only had one method that handled both events and non-events (player, vehicles, followers), and in MV you have one method for events and the other for everything else.
I suspect he could achieve the same effect in MV simply by disabling the Game_Event.prototype.isCollidedWithEvents function and allowing it to fall back to the Game_CharacterBase function, as the part he commented out from the Ace script left that method looking just like the Game_CharacterBase function in the MV script.
Apparently, he found those and have attempted comment out the latter to no avail. He also tried to add or change them, but just didn't understand.
So, basically, commenting the latter out doesn't work (I tried as well, btw).
So, basically, commenting the latter out doesn't work (I tried as well, btw).
Commenting out the latter should give the same result as the edit he made to Ace. Unless he has plugins that overwrite/change the behaviour as well.
You didn't actually say what he was trying to achieve by making that edit.
You didn't actually say what he was trying to achieve by making that edit.
The edit (in VX/ACE) allowed one event to walk through an empty event, as if the empty event had "through" checked.
I just commented out the suggested part in a project with no plugins enabled, and it worked. So now we must go through the plugins to see which one is interfering with it.
*guesses the pathfinding script*
I just commented out the suggested part in a project with no plugins enabled, and it worked. So now we must go through the plugins to see which one is interfering with it.
*guesses the pathfinding script*
SO WE FIGURED OUT THE INITIAL PROBLEM!
However, a new issue still related to events, tiles, and passibility has shown itself.
When using the "jump" command in "set-move-route" the event that was told to "jump" can "jump" into walls, regardless without "through" checked and with the walls set to "X" in the system.
(He is using a move-route command to allow the player to "throw" an event, as if to grab the guard's attention).
However, a new issue still related to events, tiles, and passibility has shown itself.
When using the "jump" command in "set-move-route" the event that was told to "jump" can "jump" into walls, regardless without "through" checked and with the walls set to "X" in the system.
(He is using a move-route command to allow the player to "throw" an event, as if to grab the guard's attention).
Original thread: https://forums.rpgmakerweb.com/threads/passiblity-of-an-event-w-no-graphic.90727/