Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

[Sheet Workers] Change event, not triggered by API script

<a href="https://wiki.roll20.net/Sheet_Worker_Scripts#change:.3Cattribute_name.3E" rel="nofollow">https://wiki.roll20.net/Sheet_Worker_Scripts#change:.3Cattribute_name.3E</a> I'm using a version of the Ammo tracker script to change the values of a total ammo pool and the value in a magazine. I wrote a sheet worker that ran some actions depending on when the ammo values changed. However, macros and the API doesn't seem to trigger the change event. Wondering if there is a workaround otherwise, I'll probably just try to implement it within the API.
1516692014
Jakob
Sheet Author
API Scripter
API changes will only trigger sheet workers if you use the attribute.setWithWorker() method instead of attribute.set().