Unlocking a door

Hey guys need your help. On my map i have puzzle where I push a rock on a button switch which then unlocks a door. Can't figure it. Help is appreciated. Thanks
depending on the rock, there are a few tutorials.

variable 1 track down the X of the map
variable 2 track down the Y of the map (this need to be the rock XY)

on the switch, and event touch, you check those 2 variables if its on XY
as the switch position, if it is, unlock the door.

there are like 4 different approach, even for event.pos(X,Y) position
inside the conditional branch, "event" need a MZ equal as I'm not sure
if its the same for MZ. (as event is not the correct way for MV either).

but I hope you need what to do as google is your friend to find 4 or more
ways how to get this done 🙂
Which part are you having trouble with? The rock pushing? The switch? The door unlocking? It's a little hard to offer advice with the limited amount of information, so please follow the guidelines written here.

Original thread: https://forums.rpgmakerweb.com/threads/unlocking-a-door.175552/