Scriptname _00E_TreasureMarkerScript extends ObjectReference Event OnInit() BlockActivation() endEvent Auto State Waiting Event OnActivate (ObjectReference akActionRef) if akActionRef != Game.GetForm(0x14) return endif GotoState("PlayerDigging") EndEvent EndState State PlayerDigging Event OnBeginState() if _00E_PlayerFunctions.GetDigControl().Dig() BlockActivation(false) GoToState("DoNothing") Activate(Game.GetForm(0x14) as Actor) else GoToState("Waiting") endif EndEvent EndState State DoNothing ; Nothing to do here EndState