The script call for a map's size in X and Y

As the title says, I'm looking for the script call for a map's size.

eg: if a map is 17 x 13, I want the variable that would call the map's X value and the map's Y value.

It is important for a map transition system I'm working on.
Hi there!
You can try this:
Code:
$dataMap.width
$dataMap.height

These codes will return the value of the width and height of the current map.
As the title says, I'm looking for the script call for a map's size.]
Spoiler
Hi there!
You can try this:
Code:
$dataMap.width
$dataMap.height
These codes will return the value of the width and height of the current map.
Yup yup as @Eliaquim mentioned above you can use $dataMap.width and $dataMap.height to get current map width and height.

...just a guess but it seems like you probably want to get the width/height of any map...
...so therefore you would need a new function to read the json files of any map.

Soooooo anyways... enough said... I created a plugin for you.
Spoiler: Tada! *Poof*


Use it just like $dataMap basically...

How To Use:
$mapDataEx = readMapData(MapID);
var width = $mapDataEx.width;
var height = $mapDataEx.height;

Alternatively you can just use the function without setting the variable but this will increase load time.

var width = readMapData(MapID).width;
var height = readMapData(MapID).height;

Reference to Map Object: https://kinoar.github.io/rmmv-doc-web/modules/rpg.map.html

Happy Game Making!
Please let me know how it goes for ya, honestly haven't tested it yet as I really only extracted this snippet from my own region/transfer system. 😉

Original thread: https://forums.rpgmakerweb.com/threads/the-script-call-for-a-maps-size-in-x-and-y.115390/