4
Fork 0
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

33 lines
827 B

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