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

Screen Shake effect in a Macro

Is there anyway to cause a screenshake effect in Roll20 and apply it to a character macro?
Not without API. Sorry amigo.
Guh... $10.00/month members have all the fun... *dusts out wallet....*
1511296520
Ada L.
Marketplace Creator
Sheet Author
API Scripter
It's not actually possible with the API either. You can ping a certain point on the map and move the screen to there, but if you were to do it in quick succession it would just debounce and use the last move.
@Stephen L. I don't believe you, your strand of titles/occupations isn't long enough....jk What about an API script that shakes the homes of other players? heh~
1511302300
Pat S.
Forum Champion
Sheet Author
Why couldn't an api script be created that causes the map and tokens to wobble back and forth in snyc to simulation a screen shake?
1511305800

Edited 1511483254
Bast L.
API Scripter
Try this one out: <a href="https://gist.github.com/Bastlifa/50439188f09fff6a8" rel="nofollow">https://gist.github.com/Bastlifa/50439188f09fff6a8</a>... Made it quick, little testing done. Also, pretty sure the tokens shake happens and then the path shake happens, so kinda pointless to shake the path. Read the comment at the top of the script for how to use it. Edit: as you can probably tell from my inconsistently careful for loop variable names, I have no idea how javascript scope works. I know var and let are different, and I think let is more local, and var is scoped to the closest.. function? Maybe not, since it seems to work here. I should probably read about it at some point. edit 2: just updated, it was only pushing down and left, 0-70 pixels. Now goes omni-directional 35 pixels. Easy to adjust in script for larger shakes, but this seems drastic enough. edit 3: forgot to add macro body to comment at top of script. Added now. Currently working on function to add variable time to shake, and maybe magnitude. Will update again shortly. edit 4: new macro allows for time input, or no time input. edit 5: Ok, on further testing, in tight quarters, the path adjustment just makes it look awful. I commented it out in my game, and suggest you do the same (all the path stuff). Also, while the macro is correct on the gist, once you save it in your api scripts (and reload the page), it will replace that code with a question mark, which will make the macro not work. Copy the macro from the gist directly, and paste it into your macro body, and it should work. However, if you ever open the macro to check it out again, and then save it, it will fail. I guess it's replacing the code with the question mark, and that's an issue.&nbsp;
1511371771

Edited 1511371784
If I was a pro member, I'd definitly try that lol.