Log in

View Full Version : Get node from path possible?



celestian
July 22nd, 2017, 22:45
I am trying to get a character sheet from a CT entry. I can get the path:



local rActor = ActorManager.getActorFromCT(node);


Looks like this:


s'rActor' | { s'sType' = s'pc', s'sCreatureNode' = s'charsheet.id-00001', s'sCTNode' = s'combattracker.list.id-00001', s'sName' = s'bob' }


The path is rActor.sCreatureNode (after checking that .sType is "pc") but I can't figure out how to get the node from the path listed as ".sCreatureNode".

Anyone have a hint?

Moon Wizard
July 22nd, 2017, 22:59
local node = DB.findNode(<path>);

Cheers,
JPG

celestian
July 22nd, 2017, 23:05
local node = DB.findNode(<path>);

Cheers,
JPG

Hah, I knew there had to be something. I kept searching for "getFrom" and other permutations of from and get.

Thanks!