5E Product Walkthrough Playlist
  1. #1

    Getting a "global" variable in a global script

    I am attempting to not have to "replace" the entire CoreRPG script "manager_tokens.lua" ... with just the function I need to alter (updateHealthHelper).

    I can override the function with my own but I can't seem to figure out how to access the global variable fGetHealthInfo within TokenManagers script manager_tokens.lua. I've tried a few methods I thought might work but nothing seems to work properly.

    I've even attempted to also override the addDefaultHealthFeatures function where it's set and have a "global" on my own "ManagerTokenDI" script and that didn't work either.

    Thoughts?
    ---
    Fantasy Grounds AD&D Reference Bundle, AD&D Adventure Bundle 1, AD&D Adventure Bundle 2
    Documentation for AD&D 2E ruleset.
    Custom Maps (I2, S4, T1-4, Barrowmaze,Lost City of Barakus)
    Note: Please do not message me directly on this site, post in the forums or ping me in FG's discord.

  2. #2

    Join Date
    Jun 2013
    Location
    Isanti, MN
    Posts
    2,922
    TokenManager.fGetHealthInfo doesn't work for you?

  3. #3
    Quote Originally Posted by Andraax View Post
    TokenManager.fGetHealthInfo doesn't work for you?
    Nope.
    ---
    Fantasy Grounds AD&D Reference Bundle, AD&D Adventure Bundle 1, AD&D Adventure Bundle 2
    Documentation for AD&D 2E ruleset.
    Custom Maps (I2, S4, T1-4, Barrowmaze,Lost City of Barakus)
    Note: Please do not message me directly on this site, post in the forums or ping me in FG's discord.

  4. #4
    TokenManager.fGetHealthInfo is a "local" variable, which means that it can't be accessed outside the scope of the script.

    Regards,
    JPG

  5. #5
    Quote Originally Posted by Moon Wizard View Post
    TokenManager.fGetHealthInfo is a "local" variable, which means that it can't be accessed outside the scope of the script.

    Regards,
    JPG
    Bugger, that's what I thought. Was hoping I could just swap out the one function but for now big hammer it works.
    ---
    Fantasy Grounds AD&D Reference Bundle, AD&D Adventure Bundle 1, AD&D Adventure Bundle 2
    Documentation for AD&D 2E ruleset.
    Custom Maps (I2, S4, T1-4, Barrowmaze,Lost City of Barakus)
    Note: Please do not message me directly on this site, post in the forums or ping me in FG's discord.

  6. #6

    Join Date
    Apr 2008
    Location
    Virginia Beach
    Posts
    3,096
    Sounds like a good candidate for 3.3.6 to make this accessible perhaps.

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
  •  
STAR TREK 2d20

Log in

Log in