Joined
Oct 15, 2012
Messages
58
Reaction score
133
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~
 

Seriel

Veteran
Veteran
Joined
Aug 16, 2014
Messages
3,013
Reaction score
504
First Language
English
Primarily Uses
Other
screenshot_101.png
 
Joined
Oct 15, 2012
Messages
58
Reaction score
133
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
58
Reaction score
133
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:

Latest Threads

Latest Posts

Latest Profile Posts

Guys, I made a trailer! And, I also launched the Steam page! If you would like to support the game, please Wishlist it :ahappy: ->
working on some tilesets _ノ乙(、ン、)_

CIBl8xT.png


Oq8WKHX.png
aww man, color hex code #C4C4C4 doesn't work for the tint value in this scene I need something darker, which stinks just because I liked that one it was my favorite plastic explosive three times...#696969 (nice) should work better (WHY IS MY BRAIN LIKE THIS)
Tell it to me straight, doc. If I've been trying to piece together a "shorter" game to learn stuff outside of game jams... am I just running away from my WIP? :v

Forum statistics

Threads
117,284
Messages
1,106,123
Members
153,467
Latest member
Kip_
Top