-
April 19th, 2018, 01:04 #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.
-
April 19th, 2018, 04:29 #2
- Join Date
- Jun 2013
- Location
- Isanti, MN
- Posts
- 2,922
TokenManager.fGetHealthInfo doesn't work for you?
-
April 19th, 2018, 04:56 #3---
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.
-
April 19th, 2018, 23:50 #4
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 20,541
TokenManager.fGetHealthInfo is a "local" variable, which means that it can't be accessed outside the scope of the script.
Regards,
JPG
-
April 20th, 2018, 04:09 #5---
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.
-
April 22nd, 2018, 14:56 #6
Archangel
- 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