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

Can a script read from a character's turn order value?

Hm?
1398575163
Gid
Roll20 Team
Moving to the API forum.
1398575580
Lithl
Pro
Sheet Author
API Scripter
Yes, see wiki . In short, use JSON.parse(Campaign().get('turnorder')); to get the current data from the turn order (note: make sure you check whether the turn order is an empty string first), and use Campaign().set('turnorder', JSON.stringify(myTurorderData)); to set the data. The linked wiki page has an example of inserting a "Turn Counter" item to the order set to a value of 15.
My apologies, I actually meant in a macro, not a script. Duh.
Macros? No.
1398636015
Lithl
Pro
Sheet Author
API Scripter
No, but you could create a script which could then be called from a macro.
Ah, interesting.