AmadanNaBriona
May 6th, 2020, 18:32
local actorToken = CombatManager.getTokenFromCT(actorNode);
Returns tokeninstance = { { container = image.id-00001.image, id = 28, scale = 2.58375, x,y = 125,209 } }
Okay, cool.
local ctrlImg = ImageManager.getImageControl(actorToken, false);
Returns nil, because the getImageControl() method in CoreRPG's ImageManager has this line:
local nodeImage = tokeninstance.ref.getContainerNode();
My tokeninstance does not have a ref. I think some tokens are references to their CT entry, and some to the actual token on the map? But I am not clear on how to get the one I want. I am starting with the CT combatant nodes (sources and targets), so how do I go from there to get the correct token instance?
Returns tokeninstance = { { container = image.id-00001.image, id = 28, scale = 2.58375, x,y = 125,209 } }
Okay, cool.
local ctrlImg = ImageManager.getImageControl(actorToken, false);
Returns nil, because the getImageControl() method in CoreRPG's ImageManager has this line:
local nodeImage = tokeninstance.ref.getContainerNode();
My tokeninstance does not have a ref. I think some tokens are references to their CT entry, and some to the actual token on the map? But I am not clear on how to get the one I want. I am starting with the CT combatant nodes (sources and targets), so how do I go from there to get the correct token instance?