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

[question] Using character ability results within API script

Example: D&D 4e has a calculation for initiative = 1d20 + dex mod + half level.    I already have an ability (called Initiative) on each character sheet for a player to roll that makes that calculation for them.  I would like to use the value from each players' Initiative ability in order to calculate and set turn order programmatically. I know I can search for that ability object on the character object.  Can I execute or call the ability once I have the object?
1375635012
Alex L.
Pro
Sheet Author
Aaron W. said: Example: D&amp;D 4e has a calculation for initiative = 1d20 + dex mod + half level. &nbsp; &nbsp;I already have an ability (called Initiative) on each character sheet for a player to roll that makes that calculation for them. &nbsp;I would like to use the value from each players' Initiative ability in order to calculate and set turn order programmatically. I know I can search for that ability object on the character object. &nbsp;Can I execute or call the ability once I have the object? There is already a script for that <a href="https://app.roll20.net/forum/post/207066/script-auto-initiative#post-266411" rel="nofollow">https://app.roll20.net/forum/post/207066/script-auto-initiative#post-266411</a>