Hey all, I have one general question...
Can you make a token property call on a Macro: campaign, lib, and/or token? If yes, how?
I know properties can call on proterties.
I know macros can call on macros.
I also know that macros can call on properties.
I just don't know, or understand how to, if a property could call on a macro.
Macro Calling...
Moderators: dorpond, trevor, Azhrei
Forum rules
PLEASE don't post images of your entire desktop, attach entire campaign files when only a single file is needed, or generally act in some other anti-social behavior.
PLEASE don't post images of your entire desktop, attach entire campaign files when only a single file is needed, or generally act in some other anti-social behavior.
Macro Calling...
Last edited by Klaive on Sat Jul 09, 2016 9:53 am, edited 1 time in total.
Re: Macro Calling...
Yes. But I recommend using user defined functions instead. See Wiki: defineFunction().
I believe referencing the prop on the token or using getProperty will run it. You can also have the results displayed using * before prop name.
Code: Select all
macroProp:[macro("macroName@lib:token"): arguments][r: macro.return]
UDFProp:[r: udf(args)]
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools
Re: Macro Calling...
Thanks aliasmask, but don't know how to use that nor does the wiki really explain it.aliasmask wrote:Yes. But I recommend using user defined functions instead. See Wiki: defineFunction().
I believe referencing the prop on the token or using getProperty will run it. You can also have the results displayed using * before prop name.Code: Select all
macroProp:[macro("macroName@lib:token"): arguments][r: macro.return] UDFProp:[r: udf(args)]
What I am wanting and/or eventually trying to do is write the proper code for a property so it can reference a macro/token, that way more marcos can be called on and to determine the final value of said property...
I appologize if I'm coming off as dense, it has been a while since I've typed code, specifically over 10 years since I typed up any macros/code for MapTool.IE -
Player 1 is a Fighter.
Fighters start with 10hp, and gain 6 every level.
Player 2 is a Mage.
Mages start with 8hp and gain 5 every level.
---Properties---
Class:{"insert code that can reference multiple choices of classes, Fighter, Mage, Rogue, Entertainer"}
Level:"insert actual number"
HP:{"insert code that determines hp based on class & level"}
Re: Macro Calling...
I really don't recommend doing it that way. You should have macros set your values. Putting macros in the properties only convolutes the logic and has no advantage.
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools