Difference between revisions of "Script:Token Collisions"
From Roll20 Wiki
m (235259 moved page Script:tokenCollisions to Script:TokenCollisions) |
m (235259 moved page Script:TokenCollisions to Script:Token Collisions) |
Revision as of 06:50, 22 January 2015
API ScriptAuthor: Stephen L
Version: 1.0
Last Modified: 2015-01-21
Code: Token Collisions
Dependencies: Vector Math
Conflicts: none
Version: 1.0
Last Modified: 2015-01-21
Code: Token Collisions
Dependencies: Vector Math
Conflicts: none
This is a small library for detecting collisions among moving tokens, even accounting for waypoints during token movement.
Contents |
Syntax
var collidedBullet = TokenCollisions.getFirstCollision(marisaKirisame, danmakuArray);
var allHitEnemies = TokenCollisions.getCollisions(masterSparkSpell, enemiesArray);
Installation and Configuration
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.
Changelog
See GitHub commit log/wiki page history.