22 lines
479 B
Plaintext
22 lines
479 B
Plaintext
|
Scriptname _00E_PlaySoundOnTriggerEnterScript extends ObjectReference
|
||
|
|
||
|
ObjectReference Property Source Auto
|
||
|
Sound Property SoundToPlay Auto
|
||
|
ObjectReference Property PlayerREF Auto
|
||
|
int doOnce
|
||
|
bool Property ApplyIMOD Auto
|
||
|
ImageSpaceModifier Property IMODToApply Auto
|
||
|
|
||
|
Event OnTriggerEnter(ObjectReference akActionRef)
|
||
|
|
||
|
if akActionRef == PlayerREF && doOnce == 0
|
||
|
if ApplyIMOD == true
|
||
|
IMODToApply.Apply()
|
||
|
endif
|
||
|
SoundToPlay.Play(Source)
|
||
|
doOnce = 1
|
||
|
else
|
||
|
return
|
||
|
endif
|
||
|
|
||
|
EndEvent
|