GetAllSIghtTypes?

Discuss macro implementations, ask for macro help (to share your creations, see User Creations, probably either Campaign Frameworks or Drop-in Resources).

Moderators: dorpond, trevor, Azhrei, giliath, jay, Mr.Ice

Post Reply
xavram
Dragon
Posts: 891
Joined: Tue Apr 20, 2010 8:22 pm

GetAllSIghtTypes?

Post by xavram »

Is there no macro to return a list of all the avilable sight types?

User avatar
Full Bleed
Demigod
Posts: 4736
Joined: Sun Feb 25, 2007 11:53 am
Location: FL

Re: GetAllSIghtTypes?

Post by Full Bleed »

xavram wrote:Is there no macro to return a list of all the avilable sight types?
You can use Wiki: getInfo()

Something like:

Code: Select all

[h: campaignInfo = getInfo("campaign")]
[h: sightInfo = json.get(campaignInfo, "sight")]
[sightInfo]
And if you just want a list of the sight names:

Code: Select all

[h: campaignInfo = getInfo("campaign")]
[h: sightInfo = json.get(campaignInfo, "sight")]
[h: sightList = json.fields(sightInfo, "json")]
[sightList]
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."

xavram
Dragon
Posts: 891
Joined: Tue Apr 20, 2010 8:22 pm

Re: GetAllSIghtTypes?

Post by xavram »

Awesome, was not aware of this function...thanks!

Post Reply

Return to “Macros”