[SOLVED] Panel animation sound problem
My problem is that for some reason, no matter how long I wait after the mapspawn retracting animation is done, a loud "ker-chunk" sound happens when I enter my trigger_look box. Obviously, this is the final part of the panel's retraction animation sound, but for some reason it doesn't play unless I either noclip into the small chamber where the arms are located, or when I simply touch my trigger_look.
I've tried disabling the arms on map spawn so that the panel retracts without sound, but then the sound plays as soon as the arms become re-enabled.
Is there any way I can fix this?
There's probably a func_door or similar brush entity with the sounds for moving, starting and stoping. Take a look at them and change them upon your wish.
Maybe I'll just use a func_door or a func_tracktrain on a piston model set, but I've never liked working with those. The tiniest placement mistake can screw the whole thing up, y'know?
-
you are using a func_brush as a panel; due to you want the panel brush to hav good lighting on its sides, you must spawn it deployed
-
that sound you don't want to hear is coming from the arm64x64 model
If this is correct and you don't really want the arms to emit any sound, just focus in the panel, don't make the arm to perform any animation. All you need to to have it in place and parented to the arm model when the player arrives there. I used sort of a convoluted trick to achieve something similar for the same reasons than you in my contribution map to the Winter Testing Initiative:
I used a func_brush (panel), parented to a func_door_rotating (because of the movement I wanted for this panel when told to open); and parented the func_door_rotating to a func_tracktrain (that nodraw cube you see in the screenshot embedded in the upper part of the panel) to lead my panel to its final place, and after the tracktrain arrived to the 2nd path_track (the inner one you see in that screenshot), I fired this output from the path_track:
- OnPass > [func_door_rotating] > ClearParent
This way, what remains is only the panel parented to the func_door_rotating. In your case, it should be the panel parented to the arm64x64 model.
I hope this example is clear, and that I understood you in the first place 
All my panel was was a simple 128x128 segment of wall, pushed out 64 units using the "64_out_straight" animation in the arm64x64_interior model.
It was completely for show and meant to make the room feel less stagnant upon entering and looking around.
You understood correctly in the point that I had the panel out originally, and used a logic_auto to retract it onmapspawn so that the func_brush would have proper lighting.
My problem was that for some reason, the last sound in the arms' animation sequences was delayed and only played once the player walked into anything related to the arms (the models, the trigger, etc.)
In the end, I just settled with using a func_tracktrain to push out a set of straight_piston models, similar to the countless func_door pistons in Portal 1.
The effect isn't as fancy in the visual nor audible aspects, but it still serves its purpose.
RustyDios wrote:
In the prop_dynamic settings for the panel arm there is a parameter near the bottom to "supress anim sounds" ... (I'm not at my own PC right now to check the exact name). This will turn off the embeded animation sounds. I'm not sure if you can trigger this on later (like from the trigger_look so it sounds correct when opening) or if you might need to set up an ambient_generic to play the arm animation sound... ... might be worth trying out...
Yeah, that is a good idea as well. The property on the prop_dynamic is "Supress Anim Sounds" ("SuppressAnimSounds" if you disable the SmartEdit). And I guess you could try to re-activate the animation sounds later on by firing the following output:
- OnTrigger > [prop_dynamic_name] > AddOutput > SuppressAnimSounds 0
(the param's value is a boolean one, 0 and 1... 0 disables suppresion)
Can that same trick be used for other entity parameters that don't show up in I/O options?
Crawfish wrote:
Interesting, I'll give that a try sometime.
Can that same trick be used for other entity parameters that don't show up in I/O options?
Hehe... trick... Sure! I use it a lot
The AddOutput output is really powerful, just disable the SmartEdit to know the 'internal' or real name for each property of a given entity to modify its value in mid-game 
So if I'm getting this right, the AddOutput output can be used to alter entity settings when there's not a specific I/O connection for that setting?
If so, it should be very useful for me. I get the feeling I'm never gonna stop learning new things about Hammer.
And with Source 2 on its way, I bet the secrets of its map editor will be even more powerful!
An alternate way to get the panel to stay out on spawn:
- Set the prop_dynamic to have a default animation of 64_out_straight_idle (so it starts out without moving).
- Set Hold Animation to true (when the animation reaches the last frame it pauses).
- OnMapSpawn SetParentAttachmentMaintainOffset @ 0.00s, then SetAnimation to "bindpose" after 0.1s (this teleports it into the standard starting position, moving the brush with it).
- Send SetAnimation inputs like normal to get it to move.
TeamSpen210 wrote:
That's the second purpose of the AddOutput command. Note that depending on how the entity is coded it might not necessarily have any effect, or you might need to turn entity on and off to have the change apply or something like that. My favorite keyvalues to use is RenderMode = 10 and RenderColor. Rendermode 10 makes an entity not render at all, hiding the model but still keeping effects. This lets you make funnels with invisible emitter models, and things like that. RenderColor "tints" a model, so you can make things look different colors.An alternate way to get the panel to stay out on spawn:
- Set the prop_dynamic to have a default animation of 64_out_straight_idle (so it starts out without moving).
- Set Hold Animation to true (when the animation reaches the last frame it pauses).
- OnMapSpawn SetParentAttachmentMaintainOffset @ 0.00s, then SetAnimation to "bindpose" after 0.1s (this teleports it into the standard starting position, moving the brush with it).
- Send SetAnimation inputs like normal to get it to move.
I see, I'll keep that in mind.
Also, that's the exact same method I've been using. It's just that for some reason, the last sound of the 64_in_straight animation (the panel making a loud ker-chunk sound) doesn't play until I walk into the arm's model or into the trigger itself, this being especially weird because it's a trigger_look and shouldn't have any effect from just being touched.
Here's my theory for how this might happen:
- Some model animations have sounds set to play on specific keyframes.- During each game cycle, the game checks the current frame of the animation. If it's on or past the sound keyframe, the sound plays.- The game also does not animate anything that is not in view. (In another area, visleaf etcetera.)- As soon as the model comes into view, it snaps to the correct frame, thereby triggering all sounds that were queued up for it when the animation started.
You can probably solve it by disabling sounds while the animation plays, as described above, or using an animation that does not play any sounds, like BindPose suggested by TeamSpen210.
I haven't tried either of those yet; I sort of like it when things clunk around a bit when the player enters, sort of like a pinball machine when you start a new game 
HMW wrote:
Those delayed sounds seem to have something to do with the sound script system, or the animation system. I hear it a lot too in my maps, especially for ramps / stairs. As far as I can tell, it has nothing to do with outputs being delayed, or anything like that.Here's my theory for how this might happen:
- Some model animations have sounds set to play on specific keyframes.- During each game cycle, the game checks the current frame of the animation. If it's on or past the sound keyframe, the sound plays.- The game also does not animate anything that is not in view. (In another area, visleaf etcetera.)- As soon as the model comes into view, it snaps to the correct frame, thereby triggering all sounds that were queued up for it when the animation started.
You can probably solve it by disabling sounds while the animation plays, as described above, or using an animation that does not play any sounds, like BindPose suggested by TeamSpen210.I haven't tried either of those yet; I sort of like it when things clunk around a bit when the player enters, sort of like a pinball machine when you start a new game
Ah, that makes a lot of sense! Thank you. I'll try all of these methods next time I'm working with arm animations.
But for now I've kinda fallen in love with straight_pistons as methods of moving wall and floor sections with awkward dimensions. Only problem is I can never get a good set of sounds for them.
