#onInitiativeEnter / onInitiativeExit?

1 messages · Page 1 of 1 (latest)

olive hedge
#

Hello. Is there a possibility to react to a token leaving the initiative list? Im currently handling several mechanics during initiative and would like to clear some data and visual elements when a token leaves combat. The exit event would be more important for me.

rain rapids
#

No direct event, but you can define pretty much any event with onChangeToken or onChangeSelection because they happen so often.

olive hedge
#

So you suggest to listen to onChangeToken and check if its in initiative. I can try this but im not sure if its a good idea because they are called pretty often...

olive hedge
#

Is there a way to check if onChangeToken is called due to a token leaving initiative?

cyan palm
#

OnChangeToken should generally be avoided. I doubt if it reacts to initiative anyway.
Why not use the before initiative change event to compare before and after lists to trigger your action?

olive hedge
#

Is this also called when clearing the initiative list?

rain rapids
#

Personally, I would have a "End Turn" macro. Then you can do initiative clean up there.

olive hedge
#

i think ill have it that way. But i would also like my ruleset to work with someone who clears the initiative in the initiative window without having to explain everyone to use my own buttons...

olive hedge
#

I created a feature request on github where i describe more context: