Frictional Games Forum (read-only)

Full Version: Sound keeps looping
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
So I'm trying to get a sound to play after using a saw on the wooden_boards_block_broken_1 entity, and I got it to work but then it keeps playing the sound over and over for the remainder of the map. what do I need to do?
Well, either make a timer in your script where you put a StopSound script in, or make a custom .snt file and disable the loop.
(05-18-2012, 04:27 PM)junkfood2121 Wrote: [ -> ]Well, either make a timer in your script where you put a StopSound script in, or make a custom .snt file and disable the loop.
Derp, I don't know why I didn't think about editing the .snt file. I'm not too good with timers and variables (noob modder here)
It's obviously something you did with the script.
Show the script here, there's an option that allows loop.
(05-19-2012, 12:12 AM)Xanthos Wrote: [ -> ]It's obviously something you did with the script.
Show the script here, there's an option that allows loop.
Editing the .snt fixed it. I do have another question though... I have a piano playing a piano sound, but it begins playing when the map loads and I'd prefer the player only be abel to hear it when he gets within a certain proximity, instead of being able to hear it anywhere on the map...
Make sure play sound isn't on the "OnStart()", but make it a function. Add an entity collide callback with parent being the Player, and the child being the collide script area. Make sure you have the collision area set so it will not delete on collide so it will repeat whenever the player enters the area (assuming you want that effect). Also, are you tying the piano sound to the actual piano, or to the player?

If you're still having trouble, check out the Old Archives map in the original game so you can see how they did it, and then apply that information to your own.
(05-19-2012, 04:26 AM)bagobonez Wrote: [ -> ]
(05-19-2012, 12:12 AM)Xanthos Wrote: [ -> ]It's obviously something you did with the script.

Show the script here, there's an option that allows loop.

Editing the .snt fixed it. I do have another question though... I have a piano playing a piano sound, but it begins playing when the map loads and I'd prefer the player only be abel to hear it when he gets within a certain proximity, instead of being able to hear it anywhere on the map...
Make an .snt file. In the .snt you can edit the distance at which a sound is heard. You can also set "blocking" to True if you want the sound to be blocked by walls/objects etc. You may also change the amount a sound is blocked. Play around a little and see what you can at.

To make a new .snt, simply copy an existing one and rename it. Also rename the sound it points to in the .snt.