MV Issue with moving two events simultaneously

Hey guys, I wanted to make some overworld puzzles using moving logs. The logs are two separate events, so that they can occupy two tiles instead of one. I'm using SumRdmDude's Collision Checker for this and on each log-event there's a check to see if the front of it is clear, AND to see if the front of the other log piece is clear. So basically "[is front clear] and [is event(x) front clear]".
However, it won't work. It just seems to ignore the check for the other piece of log, so when the log stops due to a single rock, one piece of log can keep on going. Is there a way to fix it?

Or, otherwise, are there alternative solution to make a puzzle like this one instead of checking the coordinates for every obstacle? I'll provide pictures if needed. Thank you!
Surely it's doable, but please post the screens of event command pages for both log parts, so we can find the issue.
Surely it's doable, but please post the screens of event command pages for both log parts, so we can find the issue.
1752056771176.png
1752056802080.png

1752056972362.png

1752056864612.png

The game's in italian. The page says "if player is facing right" then checks the east. Same thing for the left.
The problem is, when the log actually reaches the rock, if I push the upper part it still goes forward.
Hmm, looks fine if you ask me. Did you tried with "is event(x) right clear" instead of "is event (x) east clear"? Same for left/west. Maybe this will work?
Hmm, looks fine if you ask me. Did you tried with "is event(x) right clear" instead of "is event (x) east clear"? Same for left/west. Maybe this will work?
Yeah I tried it. In that case, the logs don't move at all, since right and left depend on the direction the event is facing. The plugin says that east and west are fixed and only checks the right tile and left tile on the map as we see it.
Maybe it overrides event ids? Since the code takes 2 ids for two separate events? I honestly don't know
I see. Hmm.
I also have a theory that this collision checking only works for tilesets, not events. Instead of an event with rock, could you place an impassable piece of tileset there and check it?

If that's the issue, I can only suggest checking the empty field in front without using scripts, by comparing the X and Y positions of the log pieces.
I see. Hmm.
I also have a theory that this collision checking only works for tilesets, not events. Instead of an event with rock, could you place an impassable piece of tileset there and check it?
I tried that too, and it does the same thing. I tried just now with a region (using Yanfly's Region Restrictions) and it has the same problem. I don't think there's a distintion between tile, event and region
So it looks like a bug for me (in plugin code). Or...maybe some plugins conflict with each other? Did you tried that with only the " SumRdmDude's Collision Checker" turned on? All other plugins should be turned off.
So it looks like a bug for me (in plugin code). Or...maybe some plugins conflict with each other? Did you tried that with only the " SumRdmDude's Collision Checker" turned on? All other plugins should be turned off.
Tried that too, still no results.

However, I was checking che code of the plugin with a friend and we ended up modifying a few lines (since my friend is way more competent in coding than me).

He explained that the code at line 307:
_.getTarget = function(target, id) {
if(!target) return $gameMap.event(id);
else if(target.match(/player/i)) return $gamePlayer;
else if(target.match(/event(\d+)/i)) return $gameMap.event(parseInt(RegExp.$1));
return null;
};
Isn't exactly correct since "RegExp.$1 should be done right after the match". So we changed it in:
_.getTarget = function(target, id) {
if (!target) return $gameMap.event(id);
if (/player/i.test(target)) return $gamePlayer;
const match = target.match(/event\s*\(?\s*(\d+)\s*\)?/i);
if (match) return $gameMap.event(parseInt(match[1]));
return null;
};
And it seems to work fine. At least for now
That's good for you! Happy that he could help you. I can relate with you, I'm also not good at coding ^^'
That's good for you! Happy that he could help you. I can relate with you, I'm also not good at coding ^^'
I have a little bit of experience but sometimes it's not enough. Still, thank you for your help, too! I appreciate you following my cause
you could check by event ID and a variable + 1 or -1, if you can push
2x, and variable is 2, you cannot push again.

so you can set the logic on this.

another way without variable is to check if log = moving, if it is,
move the log together, if it doesn't, it wont.

I had a pillar trick on doing this idea as well, so it will work with this log
too, but this require a plugin as well for "move event" if its moveable.

so you can pretty much restrict the logic into it.
Why not just use yanfly's event hitbox plugin and just make the log a single event?

Original thread: https://forums.rpgmakerweb.com/threads/issue-with-moving-two-events-simultaneously.178815/