I then had my full set of daedric armor!
Here's the script I wrote:
Scriptname OreGlow extends ObjectReference
EffectShader property UBG13Bright2FXSCOPY0000 auto
FormList Property MinedRockList Auto
bool Function HasBeenMined()
return MinedRockList.HasForm(self)
endFunction
bool Function HasNotBeenMined()
return !MinedRockList.HasForm(self)
endFunction
Function StartGlow()
UBG13Bright2FXSCOPY0000.Play(self)
EndFunction
Function StopGlow()
UBG13Bright2FXSCOPY0000.Stop(self)
EndFunction
Event OnCellAttach()
if HasNotBeenMined()
StartGlow()
Endif
EndEvent
Event OnCellDetach()
StopGlow()
EndEvent
Event OnDestructionStageChanged(int aiOldStage, int aiCurrentStage)
StopGlow()
MinedRockList.AddForm(self)
EndEvent
Event OnReset()
StartGlow()
MinedRockList.RemoveAddedForm(self)
EndEvent
Once the rock has been mined the rock is moved to a list and each time an area is loaded a check is performed whether the rock is in the list and if it is not an effect is applied.
The mod can be downloaded here: http://steamcommunity.com/sharedfiles/filedetails/?id=74290396
Its quite popular with over 28,000 unique views and over 11,000 current subscribers :-)
No comments:
Post a Comment