Can't seem to get the macro() roll option to work

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

llyarden
Kobold
Posts: 10
Joined: Thu Nov 07, 2013 1:10 pm

Re: Can't seem to get the macro() roll option to work

Post by llyarden »

@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.)

User avatar
aliasmask
RPTools Team
Posts: 9029
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Can't seem to get the macro() roll option to work

Post by aliasmask »

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:

Code: Select all

[frame("Test"): {
   [R: currentToken()]
}]
If it pops up with a blank, then it doesn't know which token you're trying to setBar() with.

llyarden
Kobold
Posts: 10
Joined: Thu Nov 07, 2013 1:10 pm

Re: Can't seem to get the macro() roll option to work

Post by llyarden »

Yeah, it came up with a blank frame. So how do I go about fixing that? I tried changing the editHPBar macro to this:

Code: Select all

[h:switchToken(getSelected())]
[H,frame("Test"): {
   [R: currentToken()]
}]
[h:setBar("Health",macro.args)]
[h:setBarVisible("Health",1)]
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?

User avatar
aliasmask
RPTools Team
Posts: 9029
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Can't seem to get the macro() roll option to work

Post by aliasmask »

Sorry, posted just before I went to bed. Don't put the H before frame because it hides all output.

llyarden
Kobold
Posts: 10
Joined: Thu Nov 07, 2013 1:10 pm

Re: Can't seem to get the macro() roll option to work

Post by llyarden »

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.
Test macro

Code: Select all

[h:setBar("Health",0.5)]
[h:setBarVisible("Health",1)]
That's on the Library token as well, and even that doesn't work.

User avatar
aliasmask
RPTools Team
Posts: 9029
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Can't seem to get the macro() roll option to work

Post by aliasmask »

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:].

llyarden
Kobold
Posts: 10
Joined: Thu Nov 07, 2013 1:10 pm

Re: Can't seem to get the macro() roll option to work

Post by llyarden »

Aha, that worked. Thank you very much.

Post Reply

Return to “Macros”