PDA

View Full Version : Is there any way, with code, to find which way a token is pointing?



alloowishus
December 25th, 2024, 01:49
Is this possible? Would like to know if an actor is being attacked from behind or the side.

LordEntrails
December 25th, 2024, 16:10
Probably. See setOrientation tokeninstance - Fantasy Grounds Customer Portal - Fantasy Grounds (https://fantasygroundsunity.atlassian.net/wiki/spaces/FGCP/pages/996644788/tokeninstance#setOrientation) and https://fantasygroundsunity.atlassian.net/wiki/spaces/FGCP/pages/996645070/imagecontrol#setTokenOrientationCount

alloowishus
December 26th, 2024, 03:49
Thanks! This is how I used it

local tokenCT = CombatManager.getTokenFromCT(nodeCT);
nOrientation = tokenCT.getOrientation();
(returns 0-7)