DICE PACKS BUNDLE
  1. #1

    Help understanding tokeninstance vs. tokeninstance.ref

    Code:
    local actorToken = CombatManager.getTokenFromCT(actorNode);
    Returns tokeninstance = { { container = image.id-00001.image, id = 28, scale = 2.58375, x,y = 125,209 } }

    Okay, cool.

    Code:
    local ctrlImg = ImageManager.getImageControl(actorToken, false);
    Returns nil, because the getImageControl() method in CoreRPG's ImageManager has this line:

    Code:
    	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?

  2. #2
    I just looked at the ImageManager script for CoreRPG; and I do not see any line like this ("local nodeImage = tokeninstance.ref.getContainerNode();")

    In fact, at line 207, I see exactly what I would expect ("local nodeImage = tokeninstance.getContainerNode();")

    Try removing your old copy of CoreRPG files; and unpack the most recent version directly from the .pak file in the FG data directory.

    Regards,
    JPG

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
5E Product Walkthrough Playlist

Log in

Log in