Advertisement Create a free account

[Script] BounceTokens -- GM activated bounce animation for tokens.

1473900904

Edited 1473901085
The Aaron
Forum Champion
API Scripter
This script is the result of discussion in this thread:&nbsp; <a href="https://app.roll20.net/forum/permalink/3971234/" rel="nofollow">https://app.roll20.net/forum/permalink/3971234/</a> BounceTokens v0.1.0 Commands: !bounce-start [number] -- Causes the selected token(s) to start bouncing. &nbsp;Bouncing only happens on a page where a player is (ribbon, or split party page). &nbsp;The optional number determines how many seconds it takes for one bounce to occur. &nbsp;Bounce height is 1/4 the height of the token. &nbsp;If no tokens are selected, this will display the help. !bounce-stop -- Causes the selected token(s) to stop bouncing. Examples: Bounce selected tokens at a rate of one bounce every 3 seconds. !bounce-start 3 Bounce selected tokens at a rate of one bounce every 20 seconds. !bounce-start Stop the selected tokens from bouncing: !bounce-stop Git:&nbsp; <a href="https://github.com/shdwjk/Roll20API/blob/master/Bo" rel="nofollow">https://github.com/shdwjk/Roll20API/blob/master/Bo</a>... Support my work on If you use my scripts, want to contribute, and have the spare bucks to do so , go right ahead. However, please don't feel like you must contribute just to use them! I'd much rather have happy Roll20 users armed with my scripts than people not using them out of some sense of shame. Use them and be happy, completely guilt-free! Disclaimer: This Patreon campaign is not affiliated with Roll20; as such, contributions are voluntary and Roll20 cannot provide support or refunds for contributions.
1473904390
Gold
Forum Champion
Macro lyrics for this based on a familiar children's song... Little bunny foo foo !bounce-start through the forest scooping up the field mice and !bounce-start them on the head. Down came the good fairy /me said, "Little bunny foo foo !bounce-stop " Thanks for the API scriptomancery!
1473907964
The Aaron
Forum Champion
API Scripter
Hahahahaha
1473908891
Franky H.
Forum Champion
How could I implement this into The Aaron's Turn marker script to make the active player bounce?
1473909145
The Aaron
Forum Champion
API Scripter
That would be pretty difficult. You can't do it without some serious JS hacking. &nbsp;Probably would be easier to put the bounce functionality in TurnMarker, but there's the issue of moving the token while it's bouncing that isn't grand. &nbsp;If I really wanted to make that work, I'd put the bouncing token on the top of the map layer while it bounced, then put an invisible token (clear gif like Bump uses) in it's place, linked up to the character like Bump does it. &nbsp;Moving the invisible token would cause the visible one on the map layer to move, then when the turn is over, I'd put it all back on the right layer. &nbsp;It would be complicated and prone to issues with the token ending up on the wrong layer if the script crashed, etc. &nbsp; But that's how you'd probably want to do it...
1473947146
Stephen L.
Pro
Marketplace Creator
Sheet Author
API Scripter
Pretty neat effect there! This would be great to use with flying characters by bounce-starting them any time their fluffy-wing status is set on.
1473947466
The Aaron
Forum Champion
API Scripter
Oooh, nifty idea! At a minimum, I should add a !bounce-toggle so that it could be paired up with TokenMod to do that.
1473950010
Stephen L.
Pro
Marketplace Creator
Sheet Author
API Scripter
The only downside right now is that tokens can't be moved very well while they are floating. If it could be modified to allow floating tokens to be moved and maybe expose functions for programmatically starting and stopping bounce for tokens, that'd be a great way to allow other scripts to interact with this.
1473950552
The Aaron
Forum Champion
API Scripter
I have some thoughts on inter-script communication, which I've mostly implemented and will be publishing by end of year, along with a complete revamping of all my scripts and 1-click install support... and my unicorn script. :)
1473953102

Edited 1473953149
Scott C.
Forum Champion
Sheet Author
API Scripter
The Aaron said: I have some thoughts on inter-script communication, which I've mostly implemented and will be publishing by end of year, along with a complete revamping of all my scripts and 1-click install support... and my unicorn script. :) Emphasis mine, but do you mean you are finishing Charmod‽
1473953365
The Aaron
Forum Champion
API Scripter
Yes. =D
1473956431
Scott C.
Forum Champion
Sheet Author
API Scripter
Hooboy, That's gonna be interesting.