Frame update from a change of state on a Token?

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: 393
Joined: Sat Jan 05, 2008 10:02 pm
Location: Clearwater, FL

Frame update from a change of state on a Token?

Post by RedDog »

I am tinkering with a character sheet that displays the active states on the token.
Is there a way to update the frame that is triggered by a state being added or removed.

Obviously I can create a macro to adjust the states AND trigger a frame update, but what about if someone were to right-click the token and adjust the states there?

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

Re: Frame update from a change of state on a Token?

Post by RedDog »

I am guessing probably not then? :)

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

Re: Frame update from a change of state on a Token?

Post by aliasmask »

Nope. The best way to do that is use another event like onChangeToken (or something like that) and check current states to saved states.

User avatar
JoeDuncan
Giant
Posts: 118
Joined: Sun Nov 22, 2020 9:02 pm

Re: Frame update from a change of state on a Token?

Post by JoeDuncan »

RedDog wrote:
Tue Oct 19, 2021 1:09 pm
I am tinkering with a character sheet that displays the active states on the token.
Is there a way to update the frame that is triggered by a state being added or removed.

Obviously I can create a macro to adjust the states AND trigger a frame update, but what about if someone were to right-click the token and adjust the states there?
Yes. JUH can do this for you, in fact it has a built-in "onChangeState" event. You just need to define it on your lib:token and add the JUH libs to your campaign.

JUH Intro
https://www.youtube.com/watch?v=Hjv6eXpKZU8

Mouse Events
https://www.youtube.com/watch?v=k3BFrQzfN7M

Basic Events
https://www.youtube.com/watch?v=H9OOcbRL17c
"Joe's Ugly Hacks - Get 'em while their hot! Guaranteed ugliest hacks around or your money back!"

Post Reply

Return to “Macros”