enderalse/scripts/source/_00e_playbardmusictrigscript.psc

24 lines
576 B
Plaintext

ScriptName _00E_PlayBardMusicTrigScript extends ObjectReference
Function OnTriggerEnter(ObjectReference akActionRef)
if akActionRef == BardActor as ObjectReference
utility.Wait(3 as Float)
MusicPiece01 = MusicPiece.Play(BardActor as ObjectReference)
sound.SetInstanceVolume(MusicPiece01, 0.800000)
Playing = 1
endIf
EndFunction
Function OnTriggerLeave(ObjectReference akActionRef)
sound.StopInstance(MusicPiece01)
Playing = 0
EndFunction
actor property BardActor auto
Int property Playing auto
sound property MusicPiece auto
Int property MusicPiece01 auto