The RPG Maker Resource Kit

RMRK RPG Maker Creation => RPG Maker General => General Scripting => Topic started by: ei8htb1t on January 29, 2011, 05:31:52 AM

Title: Script call to identify current map ID?
Post by: ei8htb1t on January 29, 2011, 05:31:52 AM
Does anyone know the script syntax for identifying the current map the player is on?
I have studied the core scripts and my best guess was something along the lines of:
if $scene == Scene_Map(map_id)
but obviously this is incorrect.

My goal is to create a common event that displays a zoomed out graphical rendition of the current map depending on which map the player is actually on, even if it's as rudimentary as:
if [current map] == "World 1" show picture [World 1 Map Graphic] etc.

Many thanks for any insights or advice you could provide this n00b scripter (or even suggest existing scripts that provide something similar)..
Title: Re: Script call to identify current map ID?
Post by: TDS on January 29, 2011, 06:34:58 AM
On VX you can get the id of the map with this.


$game_map.map_id

Title: Re: Script call to identify current map ID?
Post by: pacdiggity on January 29, 2011, 08:19:08 AM
Script isn't really necessary. Unless you have some specific requirement that only script can do, get to control variables and select to make your selected variable "MapID". Then in a conditional branch or whatever, say if you want that a specific procedure can only be executed in a specified map, make it so that the variable must equal the map ID you want, then etc etc on the commands of the event.
Title: Re: Script call to identify current map ID?
Post by: ei8htb1t on January 29, 2011, 05:36:34 PM
Thanks TDS and AngryPacman these are both very helpful solutions.

@ PacMan - more often than not, the answer is right under my nose when it comes to eventing this program, thanks for the help and making it simple for me;)