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 .
×

Script not working in Jumpgate - lag on moving objects?

1769890484
Quinn
Pro
Sheet Author
Here's a script I wrote a few years back: <a href="https://pastebin.com/aRS2LytX" rel="nofollow">https://pastebin.com/aRS2LytX</a> It's a script that listens for bar changes on graphics, then makes final fantasy style damage numbers pop up over them. Worked lovely at the time, but now it's extremely sluggish and barely works. Most of the time, the number spawns, stays where it is, then disappears. Sometimes it'll move once, at a fixed rate, to a random height. It seems like the new functionality is that changing the top/left properties of an object causes it to slowly slide to the new position, and it really doesn't like doing multiple slides in a row. I tried this as a fix:&nbsp; let number = createObj('text', { top: token.get('top') - token.get('height') / 2 + Math.floor(Math.random() * 20), // blah blah blah }); number.set('top', number.get('top') - 50); setTimeout(function() { number.remove(); }, 1000); Unfortunately, this doesn't work much better. The number appears, stays where it was for about half a second, reluctantly shuffles northwards, then disappears before it arrives. Is there any way to get around this change and make things snap to a position immediately? If not, is this script just dead?
1769954857
The Aaron
Roll20 Production Team
API Scripter
Hi Quinn, Are you using the default or experimental API? &nbsp;Also which character sheet? (Shouldn't make a difference, but just to be apples to apples) Have you confirmed if the behavior is still correct on a Legacy game?
1769964459
Quinn
Pro
Sheet Author
I don't know how to tell which API it's using, it's whatever it defaulted to. I'm not using any character sheet, just bars on tokens. Confirmed just now that it still works in a legacy game.
1770239654
The Aaron
Roll20 Production Team
API Scripter
If you haven't changed it, it will be the default API Server.&nbsp; I'll see if I can duplicate the behavior.