@Aliasmask: The calling macro is a Campaign macro, and both of them have Apply to Selected Tokens selected (along with all the other checkboxes in that screen, except for the one that makes them player-editable.)
@Wolph: I've read that; I just didn't realise that to stack roll options on top of each other you needed to use commas instead of colons. (I know that it demonstrates such in the example, but it isn't spelled out beyond that.)
Can't seem to get the macro() roll option to work
Moderators: dorpond, trevor, Azhrei, giliath, jay, Mr.Ice
Re: Can't seem to get the macro() roll option to work
According to the DEBUG line you don't have an impersonated token for setBar("Health",macro.args). So as a test, just before that line you should put something like this:
If it pops up with a blank, then it doesn't know which token you're trying to setBar() with.
Code: Select all
[frame("Test"): {
[R: currentToken()]
}]
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools
Re: Can't seem to get the macro() roll option to work
Yeah, it came up with a blank frame. So how do I go about fixing that? I tried changing the editHPBar macro to this:
And while that means that there's no longer an error message, the test frame still comes up blank (but a different kind of blank; it's a white background instead of a grey one), and the bar still won't change (although it now becomes visible). So...I assume there's some other way of doing it?
Code: Select all
[h:switchToken(getSelected())]
[H,frame("Test"): {
[R: currentToken()]
}]
[h:setBar("Health",macro.args)]
[h:setBarVisible("Health",1)]
Re: Can't seem to get the macro() roll option to work
Sorry, posted just before I went to bed. Don't put the H before frame because it hides all output.
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools
Re: Can't seem to get the macro() roll option to work
Aha.
I'm still unsure as to why the health bar is not being changed like it should, though. Even if I remove the macro.args section and just type in a number (like 0.5), it doesn't change.
That's on the Library token as well, and even that doesn't work.
I'm still unsure as to why the health bar is not being changed like it should, though. Even if I remove the macro.args section and just type in a number (like 0.5), it doesn't change.
Test macro
Code: Select all
[h:setBar("Health",0.5)]
[h:setBarVisible("Health",1)]
Re: Can't seem to get the macro() roll option to work
Try changing the order of the setBarVisible to before. BTW, you don't need that. It's automatically set to visible if the bar is set. Since your macro really doesn't do anything other than setBar, you may just want to not use [macro:].
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools
Re: Can't seem to get the macro() roll option to work
Aha, that worked. Thank you very much.