Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
43,688
Reaction score
15,294
First Language
English
Primarily Uses
RMMV
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.
 

StrawberryFlower

The Talking Fruit
Veteran
Joined
Nov 23, 2012
Messages
1,791
Reaction score
585
First Language
English
Primarily Uses
RMMV
Is that a plugin command or script call. And do we input it each time the event has to move?
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
43,688
Reaction score
15,294
First Language
English
Primarily Uses
RMMV
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.
 

StrawberryFlower

The Talking Fruit
Veteran
Joined
Nov 23, 2012
Messages
1,791
Reaction score
585
First Language
English
Primarily Uses
RMMV
@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
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
43,688
Reaction score
15,294
First Language
English
Primarily Uses
RMMV
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:
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.
 

StrawberryFlower

The Talking Fruit
Veteran
Joined
Nov 23, 2012
Messages
1,791
Reaction score
585
First Language
English
Primarily Uses
RMMV
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).
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
43,688
Reaction score
15,294
First Language
English
Primarily Uses
RMMV
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.
 

StrawberryFlower

The Talking Fruit
Veteran
Joined
Nov 23, 2012
Messages
1,791
Reaction score
585
First Language
English
Primarily Uses
RMMV
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*
 

StrawberryFlower

The Talking Fruit
Veteran
Joined
Nov 23, 2012
Messages
1,791
Reaction score
585
First Language
English
Primarily Uses
RMMV
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).
 

Latest Threads

Latest Posts

Latest Profile Posts

Ugh... 4:53AM over here and I can't sleep so why not just game make.
I just love the MV feature that allows you to create your own animations!
I typically ask this on my normal social media channels, but figured there may be good replies here. Anyone got any good horror movie recommendations? I've seen a lot, but I always love getting suggestions! Bonus points if you know which service it is streaming on (in the US) - bring on the spOoooOky!
 After a few distractions (and my annual rough second week of October), I’m getting back on track with my OMGC project.
 Am I overcomplicating it? Yes. Am I going to tone it down? Almost certainly not.
 At least the dialogue stuff is almost done. I need to do the map itself, and then all that’s left is combat.
 Getting there!

Forum statistics

Threads
115,910
Messages
1,093,895
Members
151,159
Latest member
rlawlsrjs3387
Top