How To Work The Variable Location Event?

Hello, a pleasure to meet you all! I'm running into a bit of a trouble that internet spelunking doesn't seem to be resolving. I will try to be as concise and clear as possible.

But first, a little background.

I'm currently trying to figure out how to have the "Move to Variable Location" event work. Reason being, that I wanted to be able to learn how exactly the many events work and that I'm trying to get learn several caterpillar systems to work off of an in doing so I learnt a bit from in this specific tutorial, Kentona's Cooler Caterpillar System by kentona, and it's straight forward and perfect for me but it doesn't seem to be working in the engine I'm using when it theoretically should.

While this tutorial was made for RPG Maker 2003, almost all of it works perfectly for 2000. By that, I mean the events and associated variables present in the template RTP presented by the tutorial to learn off can be easily written into RM2k's event editor. In RM2k it all works except for having the follower start location actually auto-start where the player location is, which works in the RM3K's Caterpillar template project.

So I'm comparing the event editors/variables of the caterpillar system in the RM3k template given to how I practiced converting it to RM2k's event editors/variables. This process was extremely difficult, tedious and annoying but oddly fun so I can't complain too badly. I just want to figure out how to either fix the auto start issue in RPG Maker 2000 so that my party member will automatically start off were the player is OR fix this "Move to Variable Location, Invalid Map was specified" error so that I can make a feasible work around in my conversion of the caterpillar relying on the Move to Variable Location event so that I can have the party members auto teleport to the hero. Because, as of now the party member is not automatically teleporting to the player and instead starting off far away from the map, which I'm trying to fix by creating a hopefully workable work around by starting the contents of the event editor with a "Move to Variable Location" set to my player's square when they enter any map.

Now, for the actual problems and difficulties.

I want to know how exactly to I get the "Move to Variable Location" event to work, not only for the caterpillar system work around but for general game development such as switching areas and maps through things like magic doors, portals, or dungeon entrances. You get the deal. I just can't seem to get it to work. I keep getting a Invalid Map was specified error any time I actually try to use it. For example. I created a completely new project. I created another map so I have MAP0001 and MAP0002 . With that on both MAP0001 and MAP0002 I created a dungeon entrance graphic with an event attached. As for the event attached to the dungeon entrance I created a "Move to Variable Location" (I also created one for MAP0002's dungeon entrance but for simplicity sake and to not get confusing, we're going to focus on MAP0001) and when I proceeded to edit it up so that the Dungeon Entrance on MAP0001 would transfer the player to the Dungeon Entrance on MAP0002 I was a bit lost as to the "From Variables, Map ID" selection. I tried several things. I first tried making sure the Map ID dropdown variable was set to "0001", then I tried setting it to 0001: Map ID 0001, then 0001:0001 and so on. I even tried copying exactly from the "Help" button's example to see if that would do anything. No dice. I still keep getting an Invalid Map was specified error. So now I'm at a lost. I was theorizing that I maybe have to create an event on each map that contain control variables for the Map ID, X Coordinate, Y Coordinate, for the Move to Variable Location even to connect to and work? Would that do anything? Similar goes for creating the X and Y Coordinates. I have a slight idea on how the control variables work from studying various tutorials but I'm a slight bit lost on them to be honest. I did read the tutorial and it listed the Location Information as variables to be used but I guess I don't get where or how to input them. The handbook is a little...sparse.

To simplify:
  1. How do you get the Move to Variable Location to work?
  2. How exactly do I get a create a Map ID and coordinates that will be specified within the "Move to Variable Location"?
  3. How do I avoid an "Invalid Invalid Map was specified" error?


Anyways, sorry for the length of this! Hope it's not a bother, cheers!
Hope this is alright to do, it's been more than 72 hours and I'm still a little lost on this so I figured it would be okay to bump it. Could someone help me out with this question please?
Sounds like you are attempting to teleport to an invalid map ID (perhaps zero). You'd need to a bit of debugging on your side, such as outputting the variable values before the teleport or at the points you are setting them. You could also join the RM2k3 Discord (I'm sure you are welcome as RM2k user too) here: https://discord.gg/pZyUsJCNJM
Sounds like you are attempting to teleport to an invalid map ID (perhaps zero). You'd need to a bit of debugging on your side, such as outputting the variable values before the teleport or at the points you are setting them. You could also join the RM2k3 Discord (I'm sure you are welcome as RM2k user too) here: https://discord.gg/pZyUsJCNJM
Thank you so much for the reply Cherry!
Sorry for the late response, I've been busy and haven't had the time to sit down and get back to playing around and experimenting with RM2k. I kind of figured that might've been the case. Specifically the Map ID being valid causing me error. I suppose what I'm having trouble with is making a valid ID for the map so there's an auto teleport at the very start of the event editor of my party member's caterpillar system. By debugging and outputting variable values, do you mean setting up a sort of value to act as the Map ID and placing it onto the map to act as a sort of "anchor"? If so, how would I go about that? At the current moment, I'm not too hard pressed over setting specific points. I'm just starting small and trying to get the auto-teleport work-around to work correctly as soon as the game starts rather than setting it up so that the party members caterpillar systems auto-teleport to the player in each map, room, dungeon, etc.
By debugging and outputting I meant doing like "@>Show Message: Map ID variable is \v[1234]" to show a message box that tells you what the variable 1234 currently contains. So you can understand what exactly is happening.

I'm not sure I understand what you mean by "I'm having trouble with is making a valid ID for the map" though. Do you want to teleport the player to a specific map? Then you need to set the variable to the ID of that map, which you can see in the status bar when the map is open or in the title bar of the map properties window. Do you want to teleport the player to some location on the current map regardless of what that map is? Then you can load the current map ID into the variable using the "Change Variables" command and selecting event "Player" with property "Map ID".
By debugging and outputting I meant doing like "@>Show Message: Map ID variable is \v[1234]" to show a message box that tells you what the variable 1234 currently contains. So you can understand what exactly is happening.

I'm not sure I understand what you mean by "I'm having trouble with is making a valid ID for the map" though. Do you want to teleport the player to a specific map? Then you need to set the variable to the ID of that map, which you can see in the status bar when the map is open or in the title bar of the map properties window. Do you want to teleport the player to some location on the current map regardless of what that map is? Then you can load the current map ID into the variable using the "Change Variables" command and selecting event "Player" with property "Map ID".
Hello Cherry, thank you again for your reply! This actually helped clear up a lot of things for me, so thank you.

As for what I meant, I mean I want to be both be able to teleport a player to a specific map and tile but also have a NPC start out at a specific map and tile. As such, I wanted to use the 'Move to Variable Location' to see if that specifically would be able to give me the result I desired. However, as I said before I couldn't figure out what the Map ID for the map is which led to errors.

As for the NPC thing. I just want to figure out how to get it so that the NPC will always "start" where my player is so I tried to use the "Move to Variable Location" thing as a way so that it will always teleport to the player before the caterpillar action starts.

1691342087521.png



But, again, when I try to run the game with this Move to Variable Location work around it gives me an invalid Map ID even though I have the Map ID set to 0001

1691342060924.png


which is the corresponding ID digit and coordinates set to the corresponding tile to the actual map.

1691341852787.png


So, this is mainly what I've been confused about the most, why I'm getting this Invalid Map ID error constantly. Even when it's not for the NPC Caterpillar thing but for something as simple as setting up a dungeon entrance "tunnel" that will transfer the player from MAP0001 to MAP0002 and vice versa. I still get that Invalid Map ID error even if I've set it so that the numbers correspond, so that's why I was curious as to how I get the elusive Map ID or how I'm supposed to set it up.
I might be misunderstanding this, but isn't "0001" just the designation/id of the variable? You have to actually set that variable (variable #0001) to 1 via a separate command.

Same goes for X and Y. You have to set those variables (#4 and #2) to the actual coordinates you want.

If you don't set any of those variables beforehand, they will all default to 0.

1691398355004.png
Also, if the map and X and Y are fixed then there isn't even a reason to use "Move to Variable Location" in the first place, you can simply use the "Teleport" event command which allows you to graphically select the location you need.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-work-the-variable-location-event.158659/