Scriptname _00E_FataMorganaTBScript extends ObjectReference  
{Place this triggerbox around one or multiple objects which you want to fade. They will gradually disappear, the closer the player gets. Very cool!
}

ObjectReference Property ObjectToFade Auto
Actor Property PlayerREF Auto
float Property AllowedDistance = 150.00 Auto ; Set this up to check when the object should fade out
float Distance

event onTriggerEnter(ObjectReference akActionRef)


if akActionRef == PlayerREF  && !(ObjectToFade.IsDisabled())
	Debug.Notification("Object disappearing")
	ObjectToFade.Disable(True)

else
	return
endif

EndEvent

Event OnTriggerLeave(ObjectReference akActionRef)

if akActionRef == PlayerREF	&& (ObjectToFade.IsDisabled())
	Debug.Notification("Player left trigger")
	ObjectToFade.Enable(True)
else
	return
endif

EndEvent