Map Variables

int curmap.w;
int curmap.h;
int curmap.startx;
int curmap.starty;
int curmap.tileset;
string curmap.savevsp;
string curmap.name;
string curmap.rstring;
string curmap.music;
string curmap.path;

curmap.w, curmap.h: The width and height of the current map, in tiles.

curmap.startx, curmap.starty: The starting tile coordinate, specified in Maped3. EntitySpawn(curmap.startx, curmap.starty, "mygamehero.chr"); for the win!

curmap.tileset: An image handle to the current map VSP, that you CAN draw to (the image will be 16 pixels wide and 16*numtiles tall). You could duplicate this image a bit, to have the original untouched tileset, and ColorFilter()'d duplicates, that's blit over curmap.tileset to cause things like day-night effects. Neat!

curmap.savevsp: The filename of the map's VSP. Does not include the path (for that, reference curmap.path below.)

curmap.name: The name of the current map, specified in Maped3. Not to be confused with its filename, curmap.path.

curmap.rstring: Sets the renderstring for the current map. This is in the format "1,2,3,E,4,5,R" - but you can have whatever you want basically. Putting multiple R characters in is useful, that way you can draw between several different layers: use HookRetrace() at the end of each function to specify the next one, or handle in one function with conditionals.

curmap.music: The song that is played upon starting the map. Useful if you temporarily switch the song for a cutscene and then want to switch back the map's default.

curmap.path: The path and filename of the current map, relative to the Verge directory.

Talkback

There are no talkbacks on this documentation page yet. Post the first?

Post a new comment?

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.