Results 1 to 2 of 2

Thread: Scripting: Getting object global variable values ... I'm stumped

  1. #1

    Scripting: Getting object global variable values ... I'm stumped

    I'm approaching this incrementally, experimenting with new stuff at each stage. I'm at the point where I have a 'global' script and several 'object' scripts. The global script is just trying to move various tokens on the table to positions in front of each player. I can move and rotate each primary token (character) to the correct position & orientation based on getting its object reference from its GUID.

    Each primary token has a named script that at the moment just contains non-local variables containing the GUIDs of various secondary tokens (gear). Each primary token script has the same variable names in the same order. I am trying to bring the secondary tokens to the side of the primary ones on the board.

    For the life of me I cannot get access to the secondary token GUID variables. The attempt I was sure would work is summarized in part below.

    objCharacter = getObjectFromGUID(charguidarray[i]) <-- objCharacter is used to move/rotate the character token and works

    local armorguid = objCharacter.getVar('armorGUID') <-- armorGUID is the character token script variable containing the armor token guid
    print(armorguid)

    Print outputs 'nil' to the chat area. Otherwise trying to use the armorguid unsurprisingly results in various access errors.

    Help!!
    Last edited by dizneyguy; 03-02-2016 at 10:13 AM.

  2. #2
    no idea why - but the format above starting working. I'm guessing there was a typo that got corrected while I was pulling my hair out.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •