Push Object Reset

After playing some games, I thought I should give puzzles a go. Then I got puzzled myself.

I tried to replicate a "Push object onto platform to proceed" puzzle that I've seen alot but I ran into a problem.

My object is an event with a crate graphic, event touch, same as characters where if the player touches the event it has a move command away from player. The platform is a parallel process that sets both the player and the object coordinates to a X and Y variable, unique to each. If they are the same as the platform's coordinates, self switch -> page 2 door opens and the platform checks if the coordinates are still the same. 

But enough of that, to the problem. What if the object gets stuck? For a single object or a brutal difficulty puzzle I could just have a switch on the wall that resets the puzzle. But I have multiple objects and want it to be forgiving on the player. Since the object is already an event touch, move away from player, it will not be able to function as an action button, text box "would you like to reset", reset to start position. 

Do I have to use the exhausting method of checking for ALL coordinates where the object could be stuck and if so turn on a switch for the object to become an action button? Is there a simpler way to do this?
There is a command for moving events/jumping to specific coordinates within the same map.
There is a command for moving events/jumping to specific coordinates within the same map.
Yes I know that, sorry for not being clear. I know how to transfer an event to a specific point. The trouble I'm having is making this occur.

Object gets stuck by being pushed into a corner.

Since its an event touch, it doesn't function as an action button.
Why not just make a reset point or something? And then move all the boxes back to their starting positions using that event command. You don't need to know their coordinates to move the event back to where they started; only the initial starting co-ordinates which is easy enough to find.
Do you want to reset everything, or do you want to be able to pull the crate out of the corner?
Do you want to reset everything, or do you want to be able to pull the crate out of the corner?
Actually pulling it out would be a good idea too. But either is fine, the simpler the better.

EDIT: Sorry I mean't reset the specific crate that got stuck
Why not just make a reset point or something? And then move all the boxes back to their starting positions using that event command. You don't need to know their coordinates to move the event back to where they started; only the initial starting co-ordinates which is easy enough to find.
Do you read my original post at all?

"For a single object or a brutal difficulty puzzle I could just have a switch on the wall that resets the puzzle. But I have multiple objects and want it to be forgiving on the player. Since the object is already an event touch, move away from player, it will not be able to function as an action button, text box "would you like to reset", reset to start position."
You aren't making sense, you just told ksjp17 that a reset everything would be fine which is what I suggested you do. You can make a reset point like a switch or a glowing circle and execute an event to move the individual box events back to their starting co-ordinates. You could even give the player a choice about which specific box to reset.

You don't need the event commands to move the boxes in the same event as the boxes.
You aren't making sense, you just told ksjp17 that a reset everything would be fine which is what I suggested you do. You can make a reset point like a switch or a glowing circle and execute an event to move the individual box events back to their starting co-ordinates. You could even give the player a choice about which specific box to reset.
Confusion is abound, let me try again. Sorry.

Yes I would like to reset the crate that got stuck. What inspired this is because I saw this done in a game, you can push a boulder around but if it gets into a corner you can interact with it and a choice menu opens with reset? and it will reset to the starting position.

I know how to transfer events. I know how to set a complete reset for the puzzle. But for ease for the player only the object that got stuck should be reset.

I want to know how to interact with a "event touch" event when its stuck.
To be able to pull a crate as well as push it.

First you need a conditional to check if the boulder can move away from the player and for that you need a script call.  That script call is:

e = $game_map.events[@event_id]; e.passable?(e.x, e.y, $game_player.direction)So the full event command looks like this:  (Note, as the event command is put onto the crate, there is no need to amend the [@event_id].  Type this exactly as it is.)

Conditional Branch: Script: e = $game_map.events[@event_id]; e.passable?(e.x, e.y, $game_player.direction) Set Move Route: This event : Move away from PlayerElse Set Move Route: Player : Script: $game_player.followers.reverse_each {|actor| actor.move_backward } : One step Backward Set Move Route: This event : Move toward PlayerCopy/paste that onto your crates (or boulders, or statues or whatever), maybe using an appropriate SE as well to give the sound of something being moved.
2fruit, please avoid double posting, as it is against the forum rules. You can review our forum rules here. Thank you.


If you want to quote several people in a single reply, use the multiquote button.


I think there is a tutorial around somewhere showing you how to set up something like this as a push/pull event. It probably has screenshots, in case the answer above isn't enough for you.
To be able to pull a crate as well as push it.

First you need a conditional to check if the boulder can move away from the player and for that you need a script call.  That script call is:

e = $game_map.events[@event_id]; e.passable?(e.x, e.y, $game_player.direction)So the full event command looks like this:  (Note, as the event command is put onto the crate, there is no need to amend the [@event_id].  Type this exactly as it is.)

Conditional Branch: Script: e = $game_map.events[@event_id]; e.passable?(e.x, e.y, $game_player.direction) Set Move Route: This event : Move away from PlayerElse Set Move Route: Player : Script: $game_player.followers.reverse_each {|actor| actor.move_backward } : One step Backward Set Move Route: This event : Move toward PlayerCopy/paste that onto your crates (or boulders, or statues or whatever), maybe using an appropriate SE as well to give the sound of something being moved.
My deepest thanks. This is just perfect as well as the script call to move the followers back as well! Thank you again.
ksjp, brilliant script calling!!

Original thread: https://forums.rpgmakerweb.com/threads/push-object-reset.49377/