Turning on a sound with a button

Is there a tutorial for this somewhere?

Because I have yet to actually find one, and I’ve been looking for a while now.

I want to be able to basically, walk up to a button or radio or something (wherever the trigger_once is, right?) And have it play a sound. Only not once.

If someone could walk me through, or link to a tutorial, that’d be great, so thanks ahead of time I guess…

Also, if this is in the wrong section, feel free to move it, I figured it’d go here considering all of this is done in Hammer anyway.

use trigger multiple instead of trigger once
and ambient generic that constantly plays may be better than a triggered one for a radio.

Why are we using triggers for… Create a block make it a func_button and for the output have it OnPressed -> (Ambient_generic Name).playSound
Don’t use fadeIn since it doesn’t work

First, create a trigger_multiple and create an ambient_generic. Size the trigger_multiple, which is made of the trigger texture, and make it to the size you want where you want on your radio.

  1. Name the ambient_generic whatever you like.
  2. Find a sound name for the ambient_generic that you choose.
  3. Set the flags of the ambient_generic as you like.
    For the trigger_multiple:
  4. Set the settings in the flags as you wish.
  5. Click the “Outputs” tab and click “Add…”.
  6. For “Targets entities named” find your ambient_generic.
  7. “My Output Named” should be set to “OnTrigger”.
  8. “Via this input” should be “PlaySound” which will play the sound over and over if you keep touching the trigger, or “ToggleSound” which will toggle it on and off everytime you touch the trigger.
  9. (Optional!) If you want it to play only a certain amount of times in a set time, use the “After a delay in seconds of” and specify a time.
    I hope that helped.

Hey, thanks a ton. A nice, detailed walkthrough, was just what I needed. Thanks. :smiley:

Sure. Glad I could be of help.

Button > Output startsound > Ambient generic


I’m sure I’m late but I just summed up your thread title.