Pushing objetcs for puzzles?

hi, everyone!

I'm looking for some help... I want to do a puzzle pushing an object. Let me explain with a example...
Imagine a box, in the middle of a room with two doors; one open, where u come from, and the second closed. I want that when it moves to an especific spot, sounds a "click" and the door's open.

I already know how to "push" that box, but my dilema is with the event that I want to happend. Any help, please...?


Sorry my bad english, btw~​
On the box event, after it's pushed, check the X and Y coordinates (control variables to put the X and Y into two variables, then do a nested conditional branch to see if the X is correct and the Y is correct), and if the match the spot where it's meant to go, make the sound and turn on a switch, and give the door event a second page conditioned by that switch.

It's very difficult to read centered text. You're better off just leaving it as the default and not trying to make it fancy. We don't care if your post is pretty - just that it's readable.
ok, i'll try it ^^ Thank u!

And i'll fix this too, jeje 😀Uu Thanks for that!
Btw... I can't understand really much what I have to do. Sorry, I'm learning 'about the conditions and variables yet, that's why.
Try doing it like this:
upload_2019-5-18_0-49-2.png

Where the "== 5" is the coordinates of the place you want the object to be above.
You can check de coordinates of the map by clicking in the place you want the object to be and look at the bottom-right corner:
upload_2019-5-18_0-50-53.png


To get the the event's coordinates go to "Control Variables..." command in page 1, then in "Game Data" and them select Character > This Event > Map X/Y
Like this:
Spoiler
upload_2019-5-18_0-52-27.png

Remember to set a separate variables each for the X coordinate and the Y coordinate.
Wah! It's works! Thank u so much! ^^
But, I have another cuestion now... How could I make the object stay in its place, even if I left the room? Is there a way, or not?
Shaz made a script for remember event position.
https://forums.rpgmakerweb.com/index.php?threads/remember-event-position.1853/
Oh holy crabs(?) Okno, but, sheet, scripts.... Jeje, I don't know how to use them ^^Uu I think that I'll manage with others options, I don't wanna bother anyone. Anyways, thanks for all help <3

And sorry my bad english uwu
When the object is at it's designed place, make a parallel event with a page condition being the switch that is activated once the puzzle is complete. Then make this event retrieve the same variables coordinates you used and use "Set Event Location..." to teleport the object into the coordinates from the variables.
If you do that way, remember to use a third variable to store the Map's ID.

If it's a only one room puzzle I recommend doing it the way I said; if not, try using Shaz's script that roninator2 linked.
Though it can be complicated, since usually puzzle objects can get stuck if you're only able to push them... Though I don't know if Shaz script can make certain exceptions.
I'm on mobile atm, but if you want I can print the instructions tomorrow 😅
My script will allow you to 'forget' an event location as well, if you want to put it back to its original spot. Or you could just do a Set Event Location command to move it where you want, and call the script to remember the location again.

@Sora-to-Mikki you'll probably have to use scripts at some point, but good on you for trying to do as much as you can without them first. If you only use a few, it's pretty easy. Hit F11 to open the script editor, then scroll down to the bottom to see the Main section. There'll be a section just above that with (insert here). Click on that then hit the Insert button. Add a name to the name box so you can easily see what scripts you have and where they are, then copy the script text from the link provided and paste it into the large script window.

After the move route, add a Script event command (bottom of tab 3), and just paste this:
$game_map.events[@event_id].save_pos()
My script will allow you to 'forget' an event location as well, if you want to put it back to its original spot. Or you could just do a Set Event Location command to move it where you want, and call the script to remember the location again.

@Sora-to-Mikki you'll probably have to use scripts at some point, but good on you for trying to do as much as you can without them first. If you only use a few, it's pretty easy. Hit F11 to open the script editor, then scroll down to the bottom to see the Main section. There'll be a section just above that with (insert here). Click on that then hit the Insert button. Add a name to the name box so you can easily see what scripts you have and where they are, then copy the script text from the link provided and paste it into the large script window.

After the move route, add a Script event command (bottom of tab 3), and just paste this:
$game_map.events[@event_id].save_pos()

WAAAAH!!! It works!! 😀 Thank u so much! I didn't know that I have to "declarate" the script before use it... Well, I know it now ^^

So, if I want to use another script, I'll have to create another page for that scrip, or I can put two in the same page?
When the object is at it's designed place, make a parallel event with a page condition being the switch that is activated once the puzzle is complete. Then make this event retrieve the same variables coordinates you used and use "Set Event Location..." to teleport the object into the coordinates from the variables.
If you do that way, remember to use a third variable to store the Map's ID.

If it's a only one room puzzle I recommend doing it the way I said; if not, try using Shaz's script that roninator2 linked.
Though it can be complicated, since usually puzzle objects can get stuck if you're only able to push them... Though I don't know if Shaz script can make certain exceptions.
I'm on mobile atm, but if you want I can print the instructions tomorrow 😅

Thanks! And don't worry, i've solved the problem with the script ^^ Thank u sooo much for all your help <3
So, if I want to use another script, I'll have to create another page for that scrip, or I can put two in the same page?

ALWAYS keep your scripts separate, and name the slots so you know what script is where. This will make it easy to troubleshoot if you start getting any script errors. And that's not "declaring" a script - it's just the way you add it to your project. MV does it differently, but all the other engines that have scripts (XP, VX, VX Ace) all do it this wayl.

Original thread: https://forums.rpgmakerweb.com/threads/pushing-objetcs-for-puzzles.109112/