Map Skill: Remotely Move any out of reach objects in front of you MV/MZ

dragoonwys

Freelance Illustrator
In this tutorial, we will be setting up a Remote Move map skill that will move 1 object in a range of up to 2 tiles in front of the player, example a hole in front of the player followed by the item you want to move.

We will be using some basic scripting along with 1 Common Event, 1 Variable and 1 Switch.

Feel free to give me feedback or suggestions if you see anything that can be improved upon!

Do you have a moveable boulder sitting right on the ledge that you want to jump to?
Wouldn't it be great if you could move that boulder away with some magic or a skill right at that moment?
Have you ever wanted to replicate the Move field map skill from Golden Sun?

You came to the right place, here I will show you my method of achieving something similar.
There are other ways to do it but this is what I'm using.

First off, lets set up our Common Event. This will be where we check if there is a Event within 2 tiles in the direction our player is facing. We will be using Variable 1 to store our information.

We'll start by adding a Conditional Branch checking if there is an event in front of the player when they are facing Down.

Script Breakdown:
We set Variable 1 with the script call: \$gameVariables.setValue(1, A)​
"A" is the number that will be stored in Variable 1.​

We want A to be the ID of the Event in reach, so we will be using the script call: \$gameMap.eventIdXy(x,y)​
(x,y) is the coordinates to check for an Event, since we want to check if there is an Event in the coordinates directly in front of the player who is facing Down (player's y+1), we will fill in x and y with \$gamePlayer.x and \$gamePlayer.y+1​

Now we have our first set of Data for Variable 1

But wait, we want to have a range of up to 2 tiles in front, this only checks for 1 tile in front.
That's right, so here we will add in a If statement to extend the range.

If there is nothing in the 1st tile in front, Variable 1 will be 0 (because nothing is there). So now, if Variable 1 = 0, it will check if there is something in the 2nd tile. Inside the If statement, we will repeat what we done for the first tile but with +2 instead of +1 for the y coordinate

JavaScript:
``````\$gameVariables.setValue(1, \$gameMap.eventIdXy(\$gamePlayer.x, \$gamePlayer.y+1));
if (\$gameVariables.value(1)==0) {\$gameVariables.setValue
(1, \$gameMap.eventIdXy(\$gamePlayer.x, \$gamePlayer.y+2));
};``````

Now we have finished the calculation for one direction. Repeat the steps with the proper edits to \$gamePlayer.x and .y for the Else parts of our Conditional branch, keep going until you have all 4 directions done.

Once you are done, add a Switch turned ON at the end of the page, this will be for our Autorun Move event on the map when the player uses the skill.

Add this Common Event as an Effect to a Skill. We will name it Remote Move for this purpose.

Now that we are done with setting up. We will be making the Autorun event that moves the objects around on the map.
Make sure that your Event only will run when your Switch is ON, otherwise it will run forever!

We will start by making a Conditional branch that tells us there is nothing in range to move. When Variable 1 = 0, it will show a text or a sound up to you!
Remember to add a Turn OFF Switch at the end of the page as well to stop the Autorun event.

With that all out of the way, lets go into the part where our skill did find 1 Event in range.
In this part, we want to make sure only SOME of the events are moveable.
We don't want everything to be moved. In this case, we only want Events with ID 4, 5 and 6 to be movable with this skill.

So now, we will make a list that has the numbers we want. We will use this in a Script for a Conditional branch:
[4, 5, 6].includes(\$gameVariables.value(1))

The numbers inside [] are the Event IDs of events that we can move.
By using .include, we are checking if this set includes a number that equals the number in our Variable 1

So what about the Events that we don't want to move? This is where we include a Else branch for anything else not listed in our set.
In our case events 1, 2, 3 and any others will give us a text that tells us 'we can't move this!'

We are reaching the final step here. It is now time to add in our Move routes.
Before we start moving anything, we want to make sure the player has a signal and time to press a direction button so we will add some animation and wait frames here

Next, we will create a Conditional branch that checks if a direction button is pressed.
In our example we will use Button Down is now pressed, here we will use a script call for our Move route because we want the the specific Event in front of us to be moved by one tile:
\$gameMap.event(x).moveStraight(y);

In our case we want our x / Event ID to be the same as the ID in our Variable 1, so we will use \$gameVariables.value(1)
We also want the object to move down because the down button is pressed, so we will replace y with 2. The numbers for directions are as follows:
Up = 8, Down = 2, Left = 4, Right = 6

You'll get a script call like this at the end.
\$gameMap.event(\$gameVariables.value(1)).moveStraight(2);

Add a Wait at the end for the player, so they won't suddenly run in the direction of their button push after the object moves. Repeat this step for all the directional buttons.

You have finally reached the end! Make sure to add the Common Event you worked on to a skill and test it out on your map. There are many ways to make this look smoother, with animations and screen shakes or better timing but this is the basic skeleton for it. Now your player can move far away objects around with their brains! More ways to puzzle solve!

Last edited:

desertbriar

Villager
Sweet, the Golden Sun field skills are fun to use! This would be great for puzzles

Last edited:

Quexp

Realist
I wonder if the scriptcalls works for MV too, but nicely done =)

dragoonwys

Freelance Illustrator
@ShadowDragon They work in MV too, I actually made this system in MV before deciding to move to MZ!

IvanForever

Xir Xir
I'm a huge Golden Sun fan and this is big for me. Thanks @dragoonwys!

Realist
I love golden sun too, specially the elemental bacons and the puzzles inside.
and the adventure in it, I beat all 3 games, you can make alot of nice ways
using this alone and I have a few things in mind to combine them nicely

dragoonwys

Freelance Illustrator
I can relate to that! I was introduced to the 1st and 2nd golden sun games only some years ago by a friend and it had one of the best puzzle systems I played in a game! It's been one of my favorites ever since. Even as I played it, I realized it was something that can be done in RPGMaker without modifying the base too much and after tinkering around here was the end result.

Latest Profile Posts

Spent all day writing code, only for it to result in an endless loop...sigh.
So um what is the deal with rpgmakerofficial.com ,why are there two rpg maker websites now? Is it any different from the current one rpgmakerweb.com??

When the Panic gauge is full, Mike will turn into Omar in a state of actual panic. his move list changes and until the meter depletes completely, he'll be able make use of this alter ego.
So unbelievably excited for IGMC this year! First public game was for the original one and I'm just so pumped!!
Sometimes I am amazed at how relentless spam bots are. I would clear the que and then see 800~5k more depending on their mood.