Trying to make a taxi pick up the player on the map

I've been searching online for days trying to make this work. I feel like I have some pieces of the puzzle, but not all.

The setup is I have a region-based common event that allows a player to call a taxi while standing within two tiles of a road. Currently, the way I have the pick-up set up is super janky. I have an event that is triggered by a variable when the player calls. It becomes visible/tangible and proceeds FROM a very specific point on the map TO a very specific point on the map. It works perfectly, but the map is larger than I can realistically expect my move route to work as intended. I have been trying to find something that would relocate the event to a position relative to where the player is when they call the taxi.

(Full disclosure, I keep finding references to Yanfly/VisuStella plugins, but they aren't compatible with the ABS plugin I'm using. So that seems to send me out searching for roads less traveled.)

My assumption is this would all happen in the context of a common event. I found $gamePlayer.x and $gamePlayer.y to pull my player's location on the script call spreadsheet. From there I can do a set event location, but it would need to somehow know to calculate about 10 tiles right of the player and one or two tiles down, depending on where the player is standing on the region I set up, to materialize off-screen. That's the first part I can't figure out.

Once the event is in the right spot, I'd like to make it so the event itself follows a different region (to keep it in the correct lane) and stops directly in front of the player. I know how to make an event just move toward a player, but keeping it on a region ID has eluded me. I can do without that piece of the puzzle though, just getting it within a tile or two by setting a straight move route if I can get the event oriented correctly.

Thanks!
My assumption is this would all happen in the context of a common event.
I'm not sure why you'd use a common event, unless this process is something you do on multiple maps.

I found $gamePlayer.x and $gamePlayer.y to pull my player's location on the script call spreadsheet.
There's no reason to use script calls, you can do
Control Variables -> Game Data -> Character -> Player -> Map X/Y

From there I can do a set event location, but it would need to somehow know to calculate about 10 tiles right of the player and one or two tiles down
Once you've retrieved the X/Y, Control Variables again and add 10/2 respectively.

depending on where the player is standing on the region I set up
Use the Get Location Info event command to get the region ID and use that value in Conditional Branches.
I'm not sure why you'd use a common event, unless this process is something you do on multiple maps.


There's no reason to use script calls, you can do
Control Variables -> Game Data -> Character -> Player -> Map X/Y


Once you've retrieved the X/Y, Control Variables again and add 10/2 respectively.


Use the Get Location Info event command to get the region ID and use that value in Conditional Branches.
I appreciate the insight. Yes, this would be something that happens on more than one map, so that was why I was making the common event.

I have the control variables -> Character -> Player -> X/Y set up. I'm not clear on how to add the 10/2? Would that be part of the same common event?
I'm not clear on how to add the 10/2?
mathematics are the function of the control variable command.

there is a section in it where you can change the mathematical function from set to add or substract or multiply or divide or even the rarer modulo-operation for numbers.
Wildly enough there is a thread about this but it's for MV

Thread 'Pathfinding or not pathfinding' https://forums.rpgmakerweb.com/index.php?threads/pathfinding-or-not-pathfinding.139320/
mathematics are the function of the control variable command.

there is a section in it where you can change the mathematical function from set to add or substract or multiply or divide or even the rarer modulo-operation for numbers.
I understand that, I mean it's not clear to me how/where to create that variable command or relate it to the event once I've done so.
somehow know to calculate about 10 tiles right of the player and one or two tiles down,
control variable "target X" = player map x
control variable "target x" add 10
control variable "target Y" = player map y
control variable "target Y" add 2

please play this game to learn the basics:
control variable "target X" = player map x
control variable "target x" add 10
control variable "target Y" = player map y
control variable "target Y" add 2

please play this game to learn the basics:
I only have MV and MZ. But if there are any tutorials you'd recommend, I'm happy to watch/read them.
MV and MZ both come with tutorials, and there are also a number of series if you look on YouTube.

The basic math - Add, Subtract, Multiply, Divide - are all on the first page of the Control Variables command, which is exactly what I said in my prior post:
Control Variables again and add 10/2 respectively.

So I'm certainly not intending to pile onto you or anything, but the way you asked that makes it look like you're just saying you don't know and are asking without having tried to follow the steps I already outlined.
I only have MV and MZ.
that doesn't matter - mathematics and variables have been the same since the greek archimedes or so.

and that teaching game is playable for everyone, you don't need ANY maker to download and play it (although you might have to set windows to compatibility mode if it doesn't do that automatically)

EDIT: and if you really want to crosscheck the events, you can download the Ace trial. The event commands between Ace, MV and MZ are almost completely identical, just really minor options added.
MV and MZ both come with tutorials, and there are also a number of series if you look on YouTube.

The basic math - Add, Subtract, Multiply, Divide - are all on the first page of the Control Variables command, which is exactly what I said in my prior post:


So I'm certainly not intending to pile onto you or anything, but the way you asked that makes it look like you're just saying you don't know and are asking without having tried to follow the steps I already outlined.
I don't read being "piled onto" into any of this. I would like to point out I've had this program for about a month and otherwise don't have much of a background in any kind of programming or game development, which is how RPG Maker markets itself. I'm super grateful that you and others who have been using this system for as long as you have are available to help folks on this forum, but please bear in mind that I don't inherently know every nuance of this system.

I have reviewed what you've said. I know you can do a control variable within an event that pulls the player x and then again for the player y. I understand variables and have used them as a means of triggering different conversations, items, causes and effects on a map, etc. - which is what the vast majority of the tutorials online speak to.

The part I am still unclear on:

A.) Do I put these control variables for player x and y in the event I'm trying to relocate itself?
B.) Once I do command - variable - player x/y (wherever that is) how does it work to add or subtract the other spaces? I know how adding/subtracting/multiplying/setting/randomizing/dividing variables works typically, but I couldn't find how to relate it to a map location.
C.) How then do I take those 3(?) commands and ultimately make that tell my event to go to wherever it is it would need to be, to otherwise carry out the rest of the process?

I appreciate your insight, as always.
I don't read being "piled onto" into any of this. I would like to point out I've had this program for about a month and otherwise don't have much of a background in any kind of programming or game development, which is how RPG Maker markets itself. I'm super grateful that you and others who have been using this system for as long as you have are available to help folks on this forum, but please bear in mind that I don't inherently know every nuance of this system.

I have reviewed what you've said. I know you can do a control variable within an event that pulls the player x and then again for the player y. I understand variables and have used them as a means of triggering different conversations, items, causes and effects on a map, etc. - which is what the vast majority of the tutorials online speak to.

The part I am still unclear on:

A.) Do I put these control variables for player x and y in the event I'm trying to relocate itself?
B.) Once I do command - variable - player x/y (wherever that is) how does it work to add or subtract the other spaces? I know how adding/subtracting/multiplying/setting/randomizing/dividing variables works typically, but I couldn't find how to relate it to a map location.
C.) How then do I take those 3(?) commands and ultimately make that tell my event to go to wherever it is it would need to be, to otherwise carry out the rest of the process?

I appreciate your insight, as always.
okay
The part I am still unclear on:
Those three points are basic knowledge that have nothing to do with mathematics.
But they show that you never even bothered to look at the event commands.

You NEED to go through the build-in tutorials and perhaps additional eventing tutorial games.
Reading or watching a tutorial is you wasting your time.
You need to WORK the tutorials, by clicking on all event commands in your editor that you might need, in order to see what they have as options - that is almost never explained in any tutorial.

and if you had checked that then you would have seen that most event commands allow you to use variables to set details like the position an event should be set at and so forth.

But we cannot point you to every click you have to do in the editor, you need to test and experiment for yourself.
A. If the Taxi Event is just a Map Event given commands by the Comon Event, than the Code would need to go in the Common Event.

B.
I found this:
index.php

Found here: https://forums.rpgmakerweb.com/index.php?threads/x-y-coordinates-guide.137593/
Not sure if it is what you were looking for?

C. Do you have a Example Picture of your Road Map? And can a Taxi be called on so called Taxi Stops or everywhere on the Road? And how Far away should it Spawn when called? That was not very well explained.
Those three points are basic knowledge that have nothing to do with mathematics.
But they show that you never even bothered to look at the event commands.

You NEED to go through the build-in tutorials and perhaps additional eventing tutorial games.
Reading or watching a tutorial is you wasting your time.
You need to WORK the tutorials, by clicking on all event commands in your editor that you might need, in order to see what they have as options - that is almost never explained in any tutorial.

and if you had checked that then you would have seen that most event commands allow you to use variables to set details like the position an event should be set at and so forth.

But we cannot point you to every click you have to do in the editor, you need to test and experiment for yourself.
Look, if you feel mine or any other questions are beneath you just ignore them. You're just being snarky for otherwise no reason. It impacts your life nothing to just move on from the post. Have a nice day.
A. If the Taxi Event is just a Map Event given commands by the Comon Event, than the Code would need to go in the Common Event.

B.
I found this:
index.php

Found here: https://forums.rpgmakerweb.com/index.php?threads/x-y-coordinates-guide.137593/
Not sure if it is what you were looking for?

C. Do you have a Example Picture of your Road Map? And can a Taxi be called on so called Taxi Stops or everywhere on the Road? And how Far away should it Spawn when called? That was not very well explained.
I apologize if I didn't give all of the relevant details. I was originally planning to orchestrate this via a common event but was told that was unnecessary. I can certainly do a taxi stop location, which is otherwise extremely easy to even and is basically what I already have in place. I was just hoping to make it more immediately available.

I would like it to spawn about 10 squares away, which would be just off-screen for my current settings, then it could just run the move route I have already put on it. This is sort of a hodge-podge of how I originally had it set to work off of a fixed point, and then added the region IDs in hopes of making it more universal.
Look, if you feel mine or any other questions are beneath you just ignore them. You're just being snarky for otherwise no reason. It impacts your life nothing to just move on from the post. Have a nice day.
I didn't read that as snarky, and you yourself said you're relatively new to the engine (only a month) and are asking questions like what to do with the player's x and y coordinate which suggests you don't know some basics.

That said, you need to set a move route, or use a pathfinding script/plugin in the taxi's moveroute to tell it to go to the player's x and y coordinates as the destination. Depending on how complicated the path the taxi must take is (which you're adding one complication by restricting its path to a certain region), you may find it getting stuck on walls/impassable regions.

Forgot the spawn part: Are you using an event spawner, or is the taxi on the map from the beginning? If using a spawner, you need to put your $gamePlayer.x+10, $gamePlayer.y-2 or whatever in the spawn coordinates. If the taxi is already on the map, use Set Event Location command.

Original thread: https://forums.rpgmakerweb.com/threads/trying-to-make-a-taxi-pick-up-the-player-on-the-map.162680/