enderalse/source/scripts/torch01_dummyscript.psc

17 lines
516 B
Plaintext
Raw Normal View History

Scriptname Torch01_DummyScript extends ObjectReference
MiscObject Property Torch01Off_Dummy Auto
Light Property Torch01Off Auto
Event OnContainerChanged(ObjectReference akNewContainer, ObjectReference akOldContainer)
Actor pl = Game.GetPlayer()
If akNewContainer == pl
; Debug.Trace("Torch01_DummyScript: replacing Torch01Off_Dummy with Torch01Off")
Int n = pl.GetItemCount(Torch01Off_Dummy)
If n > 0
pl.RemoveItem(Torch01Off_Dummy, n, True)
pl.AddItem(Torch01Off, n, True)
EndIf
EndIf
EndEvent