I want to change the weather when the player equips a piece of armor but I am getting a compiling error. I am very to new to scripting so I am sure that I am using ".SetActive" wrong so if somebody could explain why I am getting this error I would appreciate it very much.
Script:
Scriptname mmmStormLordScript extends ObjectReference
Spell property LightningCloak auto
Actor property playerRef auto
ObjectReference property SkyrimStormRain auto
Event OnEquipped(Actor akActor)
if akActor == playerRef
Debug.MessageBox("Storm Lord's Cuirass equipped by the player.")
LightningCloak.cast(self, playerRef)
Debug.MessageBox("Lightning Cloak was cast on the player.")
SkyrimStormRain.SetActive(true, true)
Debug.MessageBox("Weather is looking stormy.")
endif
EndEvent
Event OnUnequipped(Actor akActor)
if akActor == playerRef
Debug.MessageBox("Player has unequipped Storm Lord's Cuirass.")
playerRef.DispelSpell(LightningCloak)
Debug.MessageBox("Lightning Cloak has been removed.")
endif
EndEvent
Compiler Error:
mmmStormLordScript.psc(11,24): SetActive is not a function or does not exist