PDA

View Full Version : Get range to targeted tokens



ronnke
April 2nd, 2020, 13:40
Is there an easy way to iterate through the targeted tokens and get the range to those tokens? I want to apply range modifiers to attack rolls.

MadBeardMan
April 2nd, 2020, 14:19
Is there an easy way to iterate through the targeted tokens and get the range to those tokens? I want to apply range modifiers to attack rolls.

I'd love to know this, I did ask a good while ago and was told it wasn't possible.

ronnke
April 2nd, 2020, 14:30
Then hopefully with Unity some facility for that exists.

Trenloe
April 2nd, 2020, 15:11
It should be possible because the Savage Worlds ruleset, and I believe the 2E ruleset, and the 5E Combat Enhancer extension, all do it.

Have a look here: https://www.fantasygrounds.com/forums/showthread.php?47146-5e-Combat-Enhancer-(built-on-retired-GPL-Advanced-Kombat-extension)

The Helper Function extension (linked in the #2 bullet point) has a file scrips\ranged_attacks.lua with a getRangeModifier5e function that calls a getRangeBetweenTokens5e function. Don't be put off by the "5e" reference! ;)