Page 1 of 1

FEATURE: Map Name & Visibility Functions

Posted: Wed Apr 27, 2016 7:06 pm
by Jagged
The following changes and functions have recently been submitted.

Bugfix
It is possible and acceptable to move players to a hidden map through the use of script functions. However when you do so, the players see the message "Map not visible to players". This message will now only display to the GM.

Bugfix
When you edit the current map and change the map name or use the rename ui to change the map name, the change does not get updated on the Maptool window frame unless you change maps. This will now update immediately the name is changed.

getMapVisible() function
Returns true (1) or false(0) indicating whether the specified map is visible to players. If no map is specified the current map is selected.
Usage:

Code: Select all

getMapVisible()
getMapVisible(mapName)
Examples:

Code: Select all

[r:getMapVisible()]
[r:getMapVisible("Grasslands")]
setMapVisible() function
Sets a maps visibility to players to true (1) or false(0). If no map is specified the current map is selected. May only be used by a trusted macro.
Usage:

Code: Select all

setMapVisible(visible)
setMapVisible(mapName)
Examples:

Code: Select all

[r:setMapVisible(1)]
[r:setMapVisible(1, "Grasslands")]
setMapName() function
Changes the name of a specified map. May only be used by a trusted macro.
Usage:

Code: Select all

setMapName(oldMapName, newMapName)
oldMapName is the current name of the map you wish to rename.
newMapName is the name to which you want it changed.

Examples:

Code: Select all

[r:setMapName("Grasslands","Map1")]

Re: FEATURE: Map Name & Visibility Functions

Posted: Thu Apr 28, 2016 1:41 pm
by Jagged
copyMap() function
Function creates a copy of an specified map, with the new map name. Returns the name of the new map. May only be used by a trusted macro.
Usage:

Code: Select all

copyMap(originalMapName, newMapName)
Examples:

Code: Select all

[h:copyMap("BaseMap","Tower")]
[h:setMapVisible(1,"Tower")]

Re: FEATURE: Map Name & Visibility Functions

Posted: Thu Apr 28, 2016 3:07 pm
by wolph42
awesomesauce!!

Re: FEATURE: Map Name & Visibility Functions

Posted: Fri Apr 29, 2016 1:40 pm
by Jagged
I will add this to the wiki next week :mrgreen:

Re: FEATURE: Map Name & Visibility Functions

Posted: Sat Apr 30, 2016 10:48 am
by RPTroll
Great stuff!

Re: FEATURE: Map Name & Visibility Functions

Posted: Tue May 03, 2016 7:46 am
by Jagged
Wiki should now be up to date

Re: FEATURE: Map Name & Visibility Functions

Posted: Tue May 03, 2016 9:57 am
by RPTroll
Sweet. Again, thanks for all the effort.

Re: FEATURE: Map Name & Visibility Functions

Posted: Tue May 03, 2016 12:15 pm
by Full Bleed
Jagged wrote:Wiki should now be up to date
Thanks.

You might want to wfunc your nice syntax posts so they link to it.