What am I missing in this Macro?

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
User avatar
RedDog
Dragon
Posts: 390
Joined: Sat Jan 05, 2008 10:02 pm
Location: Clearwater, FL

What am I missing in this Macro?

Post by RedDog »

I am trying to set up a Game Settings Macro to hold some configurable options for the game (D&D vs Pathfinder, vs Homebrew). It starts with using a macro button on the Campaign tab that calls a macro on a library token that pulls and updates properties on that library token...and I cannot understand why it is not working as expected.

Currently, when I click the Campaign macro button, MapTools shows an Input Value dialogue asking for the value of SettingsTest. SettingsTest is already defined on the library token as "Hello World". I cannot see why the library macro is not polling the SettingsTest property.

Anyone have an idea what I may be missing? Thanks.


Campaign Macro

Code: Select all

/self 
[MACRO("[email protected]:DD35"):""]
[H:abort(0)]
libGameSettingsTmp

Code: Select all

<!-- SettingsTest: "Hello World" -->

[R:tTest=SettingsTest]

[dialog("Title"): {
  [tTest]
}]

[H:abort(0)]

taustinoc
Dragon
Posts: 461
Joined: Mon Aug 03, 2015 6:30 pm

Re: What am I missing in this Macro?

Post by taustinoc »

Sounds like you need to use getLibProperty() rather than relying on an implicit definition. Library token properties do not always act the same as regular token properties.

User avatar
RedDog
Dragon
Posts: 390
Joined: Sat Jan 05, 2008 10:02 pm
Location: Clearwater, FL

Re: What am I missing in this Macro?

Post by RedDog »

That was it. Thanks for the help.

Post Reply

Return to “Macros”