I'm trying to have a ActiveMagicEffect class read a float value from a global variable in order to decide whether or not to execute conditional code. The way I have it set up is that another script (which extends the Quest class) initially sets the value, then the ActiveMagicEffect later reads it, as shown in the below code:
myQuestScript
GlobalVariable Property BreakSuccessChance auto[...];static value of 45 for testing purposesfloat successChance = 45.0000BreakSuccessChance.SetValue( successChance )
myActiveMagicEffect
GlobalVariable Property BreakSuccessChance auto[...]float successChance = BreakSuccessChance.GetValue()Debug.Notification("received value is " + successChance )
The problem is that the Debug.Notification always returns 0.0000. Both of the scripts have Global properties targetting the same variable ID, I double-checked. I also used the "show
Does a script need to extend the Quest class in order to be able to access global variables? If so, how do I get my scrip that extends ActiveMagicEffect to fetch the variable I need?