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.
 
 
 

36 lines
1.0 KiB

Scriptname _00E_FS_NQR05_PlayRandomSoundSC extends ObjectReference
{Plays a designated sound in random intervals.}
;=====================================================================================
; EVENTS
;=====================================================================================
Event OnUpdate()
if PlayerREF.GetParentCell() == Self.GetParentCell()
soundToPlay.Play(PlayerREF)
RegisterForSingleUpdate(Utility.RandomInt(7, 15))
Else
UnregisterForUpdate()
EndIf
EndEvent
Event OnTriggerEnter(ObjectReference akActionRef)
RegisterForSingleUpdate(Utility.RandomInt(4, 11))
EndEvent
Event OnTriggerLeave(ObjectReference akActionRef)
UnregisterForUpdate()
EndEvent
;=====================================================================================
; PROPERTIES
;=====================================================================================
Actor Property PlayerREF Auto
Sound Property soundToPlay Auto