Movable object does not react to another event

So I am trying to make a mini puzzle part where the player must push the boulder until it touches a specific event. When the boulder touches it, a control switches on where it erases some boundary events. For some reason, when it does, nothing happens?


Here's the event that it has to touch:


MNsLIjT.png



And the thing she has to move


gZAciFs.png
where do you define "shadowmapx" and "shadowmapy"? If those aren't defined, then nothing will happen.


Additionally, you appear to have mixed up X and Y, because your conditional branches and control variables are different in regard to XY
Fb769eX.png



Alright. I switched them around and renamed the variables. Still the same thing. Nothing happened. 
Variables 1 and 2 are set before the boulder is moved, so they contain the XY of the position before the move - is that correct? I suppose not...
Variables 1 and 2 are set before the boulder is moved, so they contain the XY of the position before the move - is that correct? I suppose not...



I think they are updated every time the events move.
Yes, but they're updated before the move. So the switch is triggered when the boulder is moved away from the correct spot, after it had been moved there in the previous push.


And since the boulder is moved two times, it can simply go through the correct spot. If the correct spot for example is on X=4 and the boulder is on X=3 it can never hit, because the boulder is always moved from 3 to 5 and back to 3, never stopping on 4.


(corrected typo with numbers)
Hmm, so that's why. The boulder's position has to update AFTER it's movement. I need a workaround to this.... Got any ideas?
You're going about it the long way.  Why have you used an event as the destination?  Is there another page that activates when the boulder is on it?  When you show screenshots, ALWAYS show the full window, not just the list of event commands.


Here is what I'd recommend ... based on the assumption that the destination event only has one page and is not where the door appears.


Delete the destination event altogether.  You don't need it.


Use the Region layer to paint the destination tile with a region ID.


On the boulder event, delete ALL of your event commands.  Also get rid of the custom autonomous movement - set it back to Fixed - otherwise it'll interfere with the movement route commands.


Add these event commands - Move Away from Player handles ALL of the checks and moves you've done up there - you don't need to know what direction the player's facing.  Get the event's location AFTER the move, and compare it with the region id to see if it's on the correct spot.

Code:
Set Movement Route : This Event (Wait)
                   : Move away from Player
                   : Move away from Player
Control Variables : #0003 x = Map X of This Event
Control Variables : #0004 y = Map Y of This Event
Get Location Info : Boulder Region (new var), Region ID, ({x},{y})
If : Boulder Region = 5
  Control Switches : #0006 Door Open = ON
End

Then, if you want to be able to keep pushing the boulder around, and the door will open/closed based on where it is, you can add an Else there with a Control Switches Door Open = OFF.  Otherwise if you don't want the boulder to be pushed anymore, just add a new page conditioned by the Door Open switch, with the boulder sprite, and no event commands.
Oh! The problem was in my face all along. Thanks, Shaq.

Original thread: https://forums.rpgmakerweb.com/threads/movable-object-does-not-react-to-another-event.58109/