============================================================================== Distance Calculator for Altimit Movement
Player + followers = -2
Calculate Distance between 2 characters:
- Script call: Dahlys.distCalc.distance(char1, char2)
Dahlys.distCalc.distance(-1, 1) calculates distance in pixels between the
Player and Event 1.
Dahlys.distCalc.distance(2, -2) calculates the distances in pixels between
Event 2 and the Player + Followers and returns an array
containing all the distances.
Calculate Angle between 2 characters:
- Script call: Dahlys.distCalc.angleBtwChars(char1, char2)
Dahlys.distCalc.angleBtwChars(-1, 1) calculates the angle of Event 1
relative to the Player's line of sight.
Can Char1 see Char2:
- Script call: Dahlys.distCalc.canSee(char1, char2, dist, aov)
- dist and aov are optional and the plugin parameters Default View Distance
and Angle of View will be used if they are left blank.
- Char1 will not be able to see Char2 if blocked by: 1) tiles with Blocked
Terrain Tags, 2) tiles with Blocked Region Ids, 3) other characters
- Player can see through followers but event vision can be blocked by
followers. Using char2 = -2 to check if Event char1 can see either the
Player or any Follower.
Dahlys.distCalc.canSee(-1, 1) is true if the Player can see Event 1 at
the default distance and angle of view.
Dahlys.distCalc.canSee(1, -2) is true if Event 1 can see the Player or any
of the Followers at the default distance and angle of view.
Dahlys.distCalc.canSee(-1, 1, 100, 360) is true if the Player can see Event
1 at a radius of 100 pixels (360 degrees).
Angle of View
Character angle of view in degrees
Default View Distance
Character default view distance in pixels
Blocked Terrain Tags
Terrain tags that character cannot see through. Separate tags with a space.
Blocked Region Ids
Region Ids that character cannot see through. Separate tags with a space.