Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Shelf | Store

Privacy Policy


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sound keeps looping
Author Message
bagobonez Offline
Member

Posts: 64
Joined: Jul 2011
Reputation: 0
Post: #1
Sound keeps looping
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?
05-18-2012 04:25 PM
Find all posts by this user Quote this message in a reply
junkfood2121 Offline
Senior Member

Posts: 268
Joined: Jan 2011
Reputation: 3
Post: #2
RE: Sound keeps looping
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.

May I present to you.. the Grunt Cannon:
http://www.youtube.com/watch?v=v9KjvvVzNNg
05-18-2012 04:27 PM
Visit this user's website Find all posts by this user Quote this message in a reply
bagobonez Offline
Member

Posts: 64
Joined: Jul 2011
Reputation: 0
Post: #3
RE: Sound keeps looping
(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)
05-18-2012 11:53 PM
Find all posts by this user Quote this message in a reply
Xanthos Offline
Senior Member

Posts: 322
Joined: Mar 2012
Reputation: 8
Post: #4
RE: Sound keeps looping
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
Find all posts by this user Quote this message in a reply
bagobonez Offline
Member

Posts: 64
Joined: Jul 2011
Reputation: 0
Post: #5
RE: Sound keeps looping
(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...
05-19-2012 04:26 AM
Find all posts by this user Quote this message in a reply
Adny Offline
Posting Freak

Posts: 1,756
Joined: Mar 2012
Reputation: 169
Post: #6
RE: Sound keeps looping
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.

Timorem and Friends are Hungry™
05-19-2012 05:26 AM
Find all posts by this user Quote this message in a reply
Acies Offline
Posting Freak

Posts: 1,283
Joined: Feb 2011
Reputation: 54
Post: #7
RE: Sound keeps looping
(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.

[Image: mZiYnxe.png]


05-20-2012 02:24 AM
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)