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 Profile Posts

People3_5 and People3_8 added!

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.

Forum statistics

Threads
105,868
Messages
1,017,081
Members
137,582
Latest member
Spartacraft
Top