Scriptname ItemRemovalScript extends ObjectReference  

Event OnInit()

	RegisterForSingleUpdateGameTime(24.0)
	
endEvent

Event OnUpdate()
	if (self && !self.IsDeleted())
		DestroyItem()
	endif
EndEvent

Function DestroyItem()
	If !(Self.IsNearPlayer())
		Self.Delete()
	Else
		RegisterForSingleUpdateGameTime(24.0)
	EndIf
EndFunction