-
January 19th, 2021, 19:04 #1
referencing local variables (or not) in CoreRPG
Hi Guys, I just want to make sure I have this right, before I look down a different path.
in CoreRPG EffectManager, there is the following function
Code:local fCustomOnEffectStartTurn = nil; function setCustomOnEffectStartTurn(f) fCustomOnEffectStartTurn = f; end
fCustomOnEffectStartTurn as mine will overwrite any previously set function?
Cheers, Steve.
-
January 19th, 2021, 19:19 #2
Correct. As fCustomOnEffectStartTurn is a variable local to the EffectsManager global script package, you can't access it from outside - so you can't make a copy of the previous script. The only vague option you may have is if you know where that override is set (i.e. it's in a ruleset layered on top of CoreRPG) and you can access that override function. But that won't help much if other extensions are changing it in different ways.
Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!
-
January 19th, 2021, 19:31 #3
That's what I thought
I was hoping I could reference any previous to aid in cross-extension campatibility, guess it's 'last on to use it wins'
I may well look down a different path to do what I want.
As ever, thanks for the input Trenloe.
Cheers, Steve.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks