I've basically got this:
[Script]
Float TempStore
GlobalVariable Property ZATestGlobal Auto
Function ZATestFunction(Actor Target)
If ( ZATestGlobal.GetValue() == 0 )
Float TempStore = 10
ZATestGlobal.SetValue(1)
Target.SetAV("WaterWalking", 1)
Target.SetAV("Health", TempStore)
ElseIf ( ZATestGlobal.GetValue() == 1 )
ZATestGlobal.SetValue(0)
Target.SetAV("WaterWalking", 0)
EndIf
EndFunction
[/Script]
what I am finding is that the WaterWalking and the Global are setting fine. When I run this, the Player (who is the target) is able to toggle between Water Walking and Swimming as expected; however, the Player's Health never changes. It seems that TempStore is not being set when the Function runs, but the Flobal SetValue is.
Is this normal behaviour, or have I done something wrong? It seems odd to me that one would set, and the other would not...
The PlayerVampireQuestScript shows that "VampireStatus = 1" works (see Line 200 of that Script), and my own script shows that the SetAV is working, but all floats seem to be unfilled...