entropiachrome Posted April 19, 2012 Share Posted April 19, 2012 (edited) Yeah, so... I would like a sound .wav file to activate ONCE (and only once, never to be repeated) when a player enters the trigger area. Looking through the activators section, I found the defaultPlaySoundAtLink trigger. It says it only plays the sound once, so I figured it would work. Of course it does not, so I'm probably using the wrong trigger or script. Suggestions, please? While we're on the topic, I'd also like to do the opposite... have a sound file play every single time the player enters a specific cell. Suggestions for that would be appreciated as well (I apologize if these seem like super easy things to figure out, I am just feeling overwhelmed with trying to comprehend these scripts.) Edited April 19, 2012 by entropiachrome Link to comment Share on other sites More sharing options...
kryptopyr Posted April 19, 2012 Share Posted April 19, 2012 (edited) I'm fairly new to scripting, so no guarantees, but I think what you're looking for is something like this... Scriptname PlaySoundOnceScript extends ObjectReference int Property pAlreadyPlayed Auto Conditional ObjectReference Property pMySound Auto Event onTriggerEnter (ObjectReference akActionRef) if pAlreadyPlayed == 0 if akActionRef == Game.GetPlayer() pMySound.Enable() pAlreadyPlayed = 1 endif endif endEvent As far as having a sound play every time, I think you could just remove the "AlreadyPlayed" condition and set the script on a trigger box just inside the door to the cell. However, I think this would cause the sound to play both when you enter and when you leave the cell, so there's probably a better way to do it. Edited April 19, 2012 by kryptopyr Link to comment Share on other sites More sharing options...
entropiachrome Posted April 19, 2012 Author Share Posted April 19, 2012 I'm fairly new to scripting, so no guarantees, but I think what you're looking for is something like this... Scriptname PlaySoundOnceScript extends ObjectReference int Property pAlreadyPlayed Auto Conditional ObjectReference Property pMySound Auto Event onTriggerEnter (ObjectReference akActionRef) if pAlreadyPlayed == 0 if akActionRef == Game.GetPlayer() pMySound.Enable() pAlreadyPlayed = 1 endif endif endEvent As far as having a sound play every time, I think you could just remove the "AlreadyPlayed" condition and set the script on a trigger box just inside the door to the cell. However, I think this would cause the sound to play both when you enter and when you leave the cell, so there's probably a better way to do it. OK, I'll give that a try and see what I came work out... thanks :) Link to comment Share on other sites More sharing options...
Recommended Posts