Quote: --- Original message by: XlzQwerty1Quote:
(script startup "Name Of Script"
(begin
(sleep_until (volume_test_objects "Name of Trigger Volume" (players)) 15)
(sound_looping_start "Name of .sound_looping" none 1)
)
)
Let's do a literal play by play of your script.
(script startup "Name Of Script"
(begin
(sleep_until (volume_test_objects "Name of Trigger Volume" (players)) 15)
(sound_looping_start "Name of .sound_looping" none 1)
)
)
First line. This is a startup script, meaning your script will only execute once.
Second line. The begin is unnecessary, and can and will cause problems in the future.
Third line. You're sleeping until a player enters the trigger volume before executing the fourth line. Not sure if this is what you want. Read
Fourth line. You start playing the sound looping. This doesn't include ending it when you leave the trigger volume.
To suit your needs, I'm assuming that you want the script to play the sound looping every time you enter the trigger volume, and cut it once you leave.
(script continuous playshiz
(if
(volume_test_objects tvol (players))
(begin
(sound_looping_start soundloop none 1)
(sleep_until (not (volume_test_objects (players))) 15)
(sound_looping_stop soundloop)
)
)
)
Else, just use a startup, in your format, with an extra sleep until after you begin playing the sound looping, to end the sound looping.