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

Do Sheetworkers listen for rolls?

1512149103
SᵃᵛᵃǤᵉ
Sheet Author
API Scripter
I have a sheetworker that I want to listen for a hit location die roll. Is this possible?
1512149354
The Aaron
Pro
API Scripter
Not possible.  Sheet workers can only react to sheet events, such as changing an attribute. Only API scripts can listen to chat events.
1512149998
SᵃᵛᵃǤᵉ
Sheet Author
API Scripter
OK, so lets try this then. Will it read this if it changes <input type="hidden" name="attr_hitlocation_roll" value="[[3d6]]" disabled="disabled"/>
1512150052
SᵃᵛᵃǤᵉ
Sheet Author
API Scripter
After this button is pressed <button type="roll" name="attr_weaponroll" value="&{template:GURPS} {{roll= @{core_roll} }} @{vs} {{target= [[@{skill} + @{modifier}]] }} {{attack_type=@{name}}} {{rollname=ATTACK}} {{damagetype=@{type} }} {{woundmod=@{wound_modifier} }} {{damageroll=[[@{damage}]]}} {{crit_hit= [[ @{critical_hit_roll} ]] }} {{crit-head= [[@{critical_head_roll} ]] }} {{crit_miss= [[ @{critical_miss_roll} ]] }} {{charactername=@{character_name}}}" />
1512151997
The Aaron
Pro
API Scripter
It will only react to changes on attributes. Rolls can’t change attributes and so won’t cause the event. 
1512152336
SᵃᵛᵃǤᵉ
Sheet Author
API Scripter
OK, I am just trying to workaround my lack of scripting knowledge.
1512152918
The Aaron
Pro
API Scripter
No worries. =D