Setting variables to Event coordinates

Joined
Oct 15, 2012
Messages
57
Reaction score
128
First Language
English
Primarily Uses
RMMV
Greetings! I was just wonder what the syntax would be in a script call to set a variable to an events X-coordinate or Y-coordinate. I had the similar code for RMVX used a few times, but I am not good with scripting and am not sure how to do this in MV. Thanks for any help~
 
Joined
Oct 15, 2012
Messages
57
Reaction score
128
First Language
English
Primarily Uses
RMMV
Very nice. Thanks for the clear quick reply. Am I just crazy, or is this new to MV? I feel like that used to require a script call..
 

Seriel

Veteran
Veteran
Joined
Aug 16, 2014
Messages
3,013
Reaction score
504
First Language
English
Primarily Uses
Other
Very nice. Thanks for the clear quick reply. Am I just crazy, or is this new to MV? I feel like that used to require a script call..
I know you could do this in VX Ace, but i've never used VX so I wouldn't know.
 
Joined
Oct 15, 2012
Messages
57
Reaction score
128
First Language
English
Primarily Uses
RMMV
I know you could do this in VX Ace, but i've never used VX so I wouldn't know.
Ah, alrighty. In any case, thanks a ton. But just in case anyone else is wondering, I just checked out the topic of script calls (totally forgot it was there!) and figured out how to do it with a script call (which is a bit simpler I guess.)

that would be to go into "Control Variables" and then choosing "Script" and entering: $gameMap.events[n].x ->To store the event's X value in the variable, or $gameMap.events[n].y ->To store the event's Y value in the variable. With [n] being replaced with the Event's ID (For example: $gameMap.events[001].x)

EDIT: Also, keep in mind that this would only apply to the current map. Since every map has its own Event 001, for example, you can't just put in an ID of an event on a different map from the player/the event pointing to the variable, and expect it to work.

If anyone knows a way to get the ID of an event from a specific map, though, I'm all ears.

DOUBLE EDIT: It appears I may be wrong on this >.> The coordinates seem to always be off by 1 or 2 when I use this method. I'll stick to Kirikaz's method for now haha.
 
Last edited by a moderator:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

People1.png & SF_People1.png added!!!!

Adventurer:
"Why your body looks like a bird?"

Stranger:
"Because I'm harpy"

Adventurer:
"Clap along if you feel like a room without a roof"

*Both dancing to Pharrell Williams song*
Stream will be live shortly with a make-up session of the Interactive Text Adventure! Feel free to drop by!
Pootscooter wrote on Pharonix's profile.
Hey @Pharonix, just wondering what you're up to lately and if you've had an opportunity to check out the LTBS thread in the past few days...(a couple of us could really use your expertise). Hope you are well and Happy Thanksgiving!

Forum statistics

Threads
105,506
Messages
1,014,263
Members
137,173
Latest member
zoetsoi
Top