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

on('change:graphic', ...)

Is it possible to replace (not add to) the original behavior?  I'd like to make a very small script that does not allow an image to move once it has been "locked" but it appears while I can add an event handler that will fire AFTER the original fires, I cannot keep the default handler from firing.  Any ideas?
February 29 (8 years ago)
The Aaron
Pro
API Scripter
You can't prevent the movement, that has already happened and triggered the change event.  The best you can hope for is moving it back.. see: MapLock which does just that.
February 29 (8 years ago)

Edited February 29 (8 years ago)
I've used the script and wanted to figure out how to modify.  Any idea why they don't allow it?

EDIT:  As it really only affects the GM/DM experience, reduces set up time, and is on the script runner to debug, I hope something could be worked out (on the Roll20 side).
February 29 (8 years ago)
Lithl
Pro
Sheet Author
API Scripter

Benevolent Tyrant said:

I've used the script and wanted to figure out how to modify.  Any idea why they don't allow it?
Because the API simply isn't set up that way. It doesn't wrap around everything that happens with the VTT with prehooks and posthooks, it simply responds to events.