Character Vault
Any Concept / Any System
Your System Come To Life
Roll20 for Android
Streamlined for your Tablet
Roll20 for iPad
Streamlined for your Tablet

Personal tools

Script:Token Collisions

From Roll20 Wiki

Revision as of 17:16, 29 March 2021 by Andreas J. (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
API ScriptAuthor: Stephen L.
Version: 1.6
Last Modified: 2020-03-30
Code: Token Collisions GitHubLogo.png
Dependencies: Vector Math GitHubLogo.png
Conflicts: none

This is a small library for detecting collisions among moving tokens, even accounting for waypoints during token movement.



var collidedBullet = TokenCollisions.getFirstCollision(marisaKirisame, danmakuArray);
var allHitEnemies = TokenCollisions.getCollisions(masterSparkSpell, enemiesArray);

Installation and Configuration

Install from the One-Click menu, or GitHubLogo.png.

Install manually: Copy the script's code, available from the menu on the right and stored at Roll20's API GitHub Repository. Paste the code into a new script in your campaign's API Script Editor. Save the new script and it will be available inside your campaign.

Script Use

The library's exposed functions are accessed through the TokenCollisions object, created when the script is loaded. See GitHubLogo.png for more details.


See GitHub commit log/wiki page history.