Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sound keeps looping
bagobonez Offline
Member

Posts: 66
Threads: 11
Joined: Jul 2011
Reputation: 0
#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
Linus Ågren Offline
Senior Member

Posts: 309
Threads: 58
Joined: Jan 2011
Reputation: 5
#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.

Creator of The Dark Treasure.
05-18-2012, 04:27 PM
Website Find
bagobonez Offline
Member

Posts: 66
Threads: 11
Joined: Jul 2011
Reputation: 0
#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
Xanthos Offline
Senior Member

Posts: 318
Threads: 9
Joined: Mar 2012
Reputation: 8
#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
bagobonez Offline
Member

Posts: 66
Threads: 11
Joined: Jul 2011
Reputation: 0
#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
Adny Offline
Posting Freak

Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation: 173
#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.

I rate it 3 memes.
05-19-2012, 05:26 AM
Find
Acies Offline
Posting Freak

Posts: 1,643
Threads: 60
Joined: Feb 2011
Reputation: 73
#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




Users browsing this thread: 2 Guest(s)