Setting Up Crusher Sound Loop

Avatar
BlackBird Studios
104 Posts
Posted Feb 26, 2012
Subject is self explained, I need help setting up a looped sound for a crusher, I read another post talking about sounds and looping them but I am still having troubles. I made an ambient_generic and added the file "World.MpCoopTbeamMazeCrusherImpac" to it. What I want done is :if a player were to activate trigger, the curshers would activate along with the sound crusher. I am having troubles with the crusher sound looping though. I did uncheck the box saying "Is NOT Looped" and I have played everywhere checked off. I don't understand what I am doing wrong and it is probably something simple. Please help.

Thank you

Advertisement
Registered users don’t see ads! Register now!
Avatar
Brainstatic
219 Posts
Posted Feb 26, 2012
Replied 18 minutes later
First, try rechecking that "Is NOT Looped" flag. That flag is not for whether you want the sound to loop or not, it's for whether or not the sound itself is programmed to loop. Most music, along with most sound files with "loop" or "lp" somewhere in the name, are looped.

After that, probably the best way to loop the crusher sound would be to have the sound play when triggered by a logic_timer's OnTimer output. So if you wanted the crushers to crush every 10 seconds, you could have the player trigger play the sound and enable the timer. The timer would then fire its OnTimer output to the ambient_generic every 10 seconds to play the sound.

Avatar
BlackBird Studios
104 Posts
Posted Feb 28, 2012
Replied 2 days later
Alright, I feel like I am missing something. It is working but I guess you could say it is not "callobrated" to the right time. The crusher goes up and down but doesn't meet with the sound hitting the floor.

They way I have it set up is:

OnTimer: "CrusherSound": PlaySound: OnlyOnce(No)

OnTimer: "Crusher": SetAnimation: smash_fast: OnlyOnce(Yes) "But the crusher keeps going, for some reason, which I am not complaining about"

I am guessing I need to set a delay for the crusher? But I do not know. Please help.
BTW: I have it so that when a player passes through trigger, it activates the logic_timer and so those "OnTimers" is from the logic_timer.

Avatar
Brainstatic
219 Posts
Posted Feb 28, 2012
Replied 33 minutes later
Instead of having the timer set the crusher animation, have the player trigger set it with the same setup you have now with the timer.

OnTrigger: "Crusher": SetAnimation: smash_fast: OnlyOnce(Yes)

Time the delay between the crusher impact and the sound using a stopwatch. If the crusher impacts the surface before the sound plays, you need to set the delay in the trigger output to the crusher to what you timed that difference to be. If the crusher impacts the surface after the sound plays, you should set the appropriate delay in the trigger output that starts the sound timer.

Avatar
MasterLagger
1,695 Posts
Posted Feb 28, 2012
Replied 13 minutes later
I think on the map I sent you (BlackBird Studios) had the crusher sounds in it also. I recall using the crusher sound on EndAnimation I think. From what I hope I'm remember correctly, not only did I use a sound being played on OnEndAnimation, but I also think I made another OnEndAnimation to make the crusher go into it's "un-smash" animation. I'm not completely sure about that though, I'll check my old map out and see what I did.

Edit: I checked my old map and this is what I did. For the crusher I made these adjustments:
I used smash_fast as the crush animation.
For output I used "OnAnimationDone" the set the "crusher" to have "SetAnimation" for to "smash_fast."
I also made another "OnAnimationDone" then set the "crusher_sound" to "PlaySound"
I also used a trigger to begin the smash_fast animation for the first time, but you can probably use a Logic_auto to take care of that.
Oh, and make sure the "crusher sound" has a SourceEntityName named after your crusher's name.
After your done making the necessary adjustments, test it out to see if it's good.

Avatar
BlackBird Studios
104 Posts
Posted Feb 29, 2012
Replied 12 hours later

MasterLagger wrote:
After your done making the necessary adjustments, test it out to see if it's good.

It works perfectly MasterLagger. I knew that there had to be an eaiser way then actaully timing it, I didn't think Valve sat behind a stopwatch wating for the perfect second to add into the delay bar. Thank you very much though for offering the idea BOB74j, I really appreciate that you answered to my post in the time that you did. :smile:

Now that I see that having 3 crushers going at the same time doesn't look so good, kind of makes me think that I should probably add a delay to the two of them so they don't all go at the same time. I think this should work and if not, you will probably see me (be totally lazy again) and ask for help :razz:

Thanks again.

EDIT: Alright, I tried adding a delay and of course that was to simple to work, and I tried to do the logic_timer thing again, but I don't know how that would be set up to begin with. Any ideas.. (Once again I am trying to do a OnMapSpawn where three crushers would go off at seperate times but in a pattern)

Avatar
MasterLagger
1,695 Posts
Posted Feb 29, 2012
Replied 3 hours later
Well, I think if you go into your logic_auto's output, there's a small "delay seconds" box that you can type what number of seconds you want until the crusher activates. I would try adding 3 to your 2nd crusher and 6 to your third crusher. This would give your crushers a nice 3 second smash pattern. No logic_timer required.
Avatar
Skotty
671 Posts
Posted Feb 29, 2012
Replied 2 hours later
Maybe it helps to use one of my instances.

Crusher Instances (many custom options)
It's configured to be prepared for every situation.
If this isn't what you are looking for, you could take a look in it and maybe find something you maybe missed.

&

Avatar
BlackBird Studios
104 Posts
Posted Jun 28, 2012
Replied 3 months later

MasterLagger wrote:

Edit: I checked my old map and this is what I did. For the crusher I made these adjustments:
I used smash_fast as the crush animation.
For output I used "OnAnimationDone" the set the "crusher" to have "SetAnimation" for to "smash_fast."
I also made another "OnAnimationDone" then set the "crusher_sound" to "PlaySound"
I also used a trigger to begin the smash_fast animation for the first time, but you can probably use a Logic_auto to take care of that.
Oh, and make sure the "crusher sound" has a SourceEntityName named after your crusher's name.
After your done making the necessary adjustments, test it out to see if it's good.

Ok so it has been a long time since I have been on on the forums, but I am nearing the Chapter(s), there has just been to much stuff to do in the summer here. But I've ran in to a problem with the three crushers I have. I was forced to change the crusher from crush_fast to crush_big because the crusher would just go off to fast... I know I am missing something here, but even though I have the "OnAnimationDone" on, the "crusher_sound" is now delayed because of this crusher impact change. Honestly, I am getting tired of trying to make little changes that don't work to help improve this "fault of mine" because compiling the map is taking just too long.

Unless there is a way, and I'm sure there is, to make the smash_fast go slower, I'm out of ideas.

Avatar
Brainstone
401 Posts
Posted Jun 28, 2012
Replied 53 minutes later
give your crusher the input "setplaybackRate" with a parameter from 0 to 1 (0% to 100%)
Avatar
BlackBird Studios
104 Posts
Posted Jun 30, 2012
Replied 1 day later
I added the input "setplaybackrate" to my logic_auto, and did this| ONMAPSPAWN: Crusher: SetPlayBackRate: Parameter 1| and I did that for all three crushers... but still does the same thing..
Avatar
Skotty
671 Posts
Posted Jun 30, 2012
Replied 7 hours later

BlackBird Studios wrote:
ONMAPSPAWN: Crusher: SetPlayBackRate: Parameter 1

To make them slower, you need to use smaller values than 1, for example 0.6.

Avatar
MasterLagger
1,695 Posts
Posted Jun 30, 2012
Replied 3 hours later

Skotty wrote:
BlackBird Studios wrote:

ONMAPSPAWN: Crusher: SetPlayBackRate: Parameter 1

To make them slower, you need to use smaller values than 1, for example 0.6.

To make things more specific, like Brainstone said, setting the "SetPlayBackRate" to 0 puts the animation speed at 0%, while setting the "SetPlayBackRate" to 1 puts the animation speed at 100% (the original animation speed). So putting the "SetPlayBackRate" to 0.5, for example, would reduce the animation speed by half (50%).

Avatar
BlackBird Studios
104 Posts
Posted Jul 01, 2012
Replied 1 day later
Thanks very much Brainstorm, Skotty, and MasterLagger. This should hopefully indeed help the crushers. Now I just gotta wait 1 hour and 19 minutes just for the compiling alone for one portion of the map to see the result of this change lol

(A little help if anyone wouldn't mind, is there a way to find the spot in your map in which it is leaking, it is causing my map to not load in Chapter 2. Idk why, but it has to be just the smallest crack imaginable... Nothing to obvious. If not, I guess I will just have to fly around until I literally find it... (and now I am getting an error message from something else now... which closes portal down before I can even start it up) I am getting confused by the second, if a trigger leaks does that cause an error at all? Even if it is from the smallest smallest crack?

EDIT: Alright so I found what is wrong with my map and why it wont compile, I deleted the last edit so it didn't look so big here on the forums, but it is my arm panels. When I deleted them the map spawned fine, put them back up, Portal 2 would get to 2 blue circles on the loading screen and then it would crash. I can't find the problem with these arms though. I've used the before perfeclty fine but now idk. If anybody can help me with this second problem also that would be great.

Avatar
FelixGriffin
2,680 Posts
Posted Jul 01, 2012
Replied 49 minutes later
Map > Load Pointfile, then look for a red line escaping your map.
Avatar
MasterLagger
1,695 Posts
Posted Jul 01, 2012
Replied 1 hour later
Yeah, but the problem isn't a leak (but still nice to know anyway), it's the arm panels. Is the arm panel the one that rotate to open walls, floors, etc and has the blue glass on it?
Avatar
BlackBird Studios
104 Posts
Posted Jul 02, 2012
Replied 1 day later
Ok I did what you said Griffen, but the red line is the weirdest line I've ever seen. It comes out of a wall that (I know definitly has no holes in it and the line extends outwards from the box and then shoots up at an angle and comes back down...

And to answer your question MasterLagger, no they are the arm54x64_interior.mdl, the ones that look black and have 2 verticle lines coming down in the middle and the whole thing is connected to an arm.

In response to you BEARD!, I did what you said, but still no dice. I checked the map and there are no fun_detail that are left open. Anything that I thought would cause a problem like that, I just covered it ontop with a wall. I really can't find out what's going on. It has to be somthing in the map because I created a bigger box around my map to see if that would get rid of the problem, but soon when I expand the map, I don't want that box there so I would like to try to find the problem.

If anybody has anymore ideas on what to do that would be greatly appreciated.

Avatar
BEARD!
169 Posts
Posted Jul 02, 2012
Replied 2 minutes later
Brushes that are func_detail won't seal the map against leaks; perhaps this is (part of) your problem. A good way to check would be to use visgroups. In the Auto Visgroups section to the right-hand-side of hammer, try turning off everything except for "World Geometry". This should help clarify where the leak is occuring.
Advertisement
Registered users don’t see ads! Register now!
Avatar
HMW
806 Posts
Posted Jul 03, 2012
Replied 19 hours later

BlackBird Studios wrote:
[...] the red line is the weirdest line I've ever seen. It comes out of a wall that (I know definitly has no holes in it and the line extends outwards from the box and then shoots up at an angle and comes back down...

If you are sure that this wall is not a func_detail or something like that, then it could be that the brush is just invalid. This has happened to me a few times as well. Just delete and recreate the wall and try again.