pidgebc Posted May 27, 2013 Share Posted May 27, 2013 I'm wanting to make a sound file play when the player walks into an area. I've already got the sound file imported and in place in Sound Marker and Sound Descriptor categories. What I need is how you make a trigger to play the sound when the player walks into it, and how to set that up. Thanks Link to comment Share on other sites More sharing options...
morrowind1979 Posted May 27, 2013 Share Posted May 27, 2013 (edited) you have to create a trigger box in the CK with a script attached to it(the button that has a box with a T in the middle) For your script: Script Extends Objectreference Int Prop RunOnce Sound Prop Event OnTriggerEnter(ObjectReference akActionRef) If(akActionRef == Game.GetPlayer()) EndIf If RunOnce == 0 Sound.Play (Self) RunOnce = 1 EndIf EndEventIf you want the sound to play every time: Script Extends ObjectReference Sound Prop Event OnTriggerEnter(ObjectReference akActionRef) If(akActionRef == Game.GetPlayer()) Sound.Play (Self) EndIf EndEvent Edited May 27, 2013 by morrowind1979 Link to comment Share on other sites More sharing options...
pidgebc Posted May 27, 2013 Author Share Posted May 27, 2013 thank you so much! Link to comment Share on other sites More sharing options...
Recommended Posts