I hope I can get a simple solution to my very simple macro that I'm using in my framework. I'm sure I've borrowed most of this from elsewhere and as it's ages since I've done any macro writing (which always was very limited) I am hoping someone can easily set me straight on this and save me some frustration.
I have a simple next initiative macro that shows the GM a token handout in a frame for the next initiative token (a picture of the monster statblock). I'm trying to alter the macro to only update the frame for NPCs and not PC tokens, see the end of the code:
Code: Select all
[h:ID = getInitiativeToken()]
[h:switchToken(ID)]
[h:state.Current = 0]
[h:nextInitiative()]
[h:ID = getInitiativeToken()]
[h:switchToken(ID)]
[h,if (getLayer() == "TOKEN") : state.Current = 1]
[h:state.Delay = 0]
[h:state.Ready = 0]
[Frame("Statblock"): {
<img src="[r:getTokenHandout()]"></>
}]
Code: Select all
[h,if (isNPC()), code :
{
[Frame("Statblock"):{<img src="[r:getTokenHandout()]"></>]
}]
Cheers,
AidyBaby