Hi im having trouble with setting my global variable in my ActiveMagicEffect Script.
debug.messageBox("FormID: " + ID)ConjureArmorLink01.SetValueInt(ID)debug.messageBox("VarID: " + ConjureArmorLink01.GetValueInt())
I get the following Ouput in game:
FormID: 738207588
VarID: 738207616
Im confused because all I do is saving the value and retrieve it, so there must be something wrong with the way i do that. =(
Also i get the same VarID for all Mannequins.
- I have created ConjureArmorLink01 in Miscellaneous->Global. Type is long, initial value is 0 and it is no constant.
- Added ConjureArmorLink01 to the Properties of my Script and Autofilled it.
- The variable is not used in any other Script.
Here is the complete script:
Scriptname RegisterMannequin extends ActiveMagicEffect import GameActorBase Property PlayerHouseMannequin Auto GlobalVariable Property ConjureArmorLink01 Auto EVENT OnEffectStart(Actor akTarget, Actor akCaster) ObjectReference closestMannequin = Game.FindClosestReferenceOfTypeFromRef(PlayerHouseMannequin, akCaster, 150) if (closestMannequin == None) Debug.Notification( "There is no mannequin near!" ) else int ID = closestMannequin.GetFormID() debug.messageBox("FormID: " + ID) ConjureArmorLink01.SetValueInt(ID) debug.messageBox("VarID: " + ConjureArmorLink01.GetValueInt()) endifendEVENT
What i tried this far:
- Using "value" and "getValue()/setValue()" instead
- Recreating Variable and Script
I hope someone can help me. q.q