enderalse/source/scripts/defaultaddmusicscript.psc

20 lines
436 B
Plaintext

scriptName defaultAddMusicSCRIPT extends ObjectReference
{plays music when player enters trigger}
MusicType property myMusic auto
{Music to play when player enters trigger}
Auto STATE Listening
EVENT onTriggerEnter (objectReference triggerRef)
Actor actorRef = triggerRef as Actor
if (actorRef == (Game.GetForm(0x14) as Actor))
gotoState ("done")
myMusic.Add()
endif
endEVENT
endState
STATE done
; do nothing
endSTATE