How to set the sound-name for Ambient_Generic?
Quote from Never Sleeper on November 14, 2013, 3:28 amHello everyone,
this is my first post and I couldn't find a good tutorial for my problem.
I want to build a func_instance with a logic chain for my dynamic music function. The chain itself works really fine but I want to capsule the whole thing and just want to set some parameters through the func_proxy instance.
The main thing is that I want to SET the sound-name for an ambient_generic later in my map. How can I accomplish that? Because I can't find a way to use a soundscript or a "maps/<mapname>_level_sounds.txt" to play this sound instead of a directly wave-file.
Thanks in advance. =)
Hello everyone,
this is my first post and I couldn't find a good tutorial for my problem.
I want to build a func_instance with a logic chain for my dynamic music function. The chain itself works really fine but I want to capsule the whole thing and just want to set some parameters through the func_proxy instance.
The main thing is that I want to SET the sound-name for an ambient_generic later in my map. How can I accomplish that? Because I can't find a way to use a soundscript or a "maps/<mapname>_level_sounds.txt" to play this sound instead of a directly wave-file.
Thanks in advance. =)

Quote from TeamSpen210 on November 14, 2013, 4:41 amI'm assuming this ambient_generic is inside this instance. Do you want to change the name during runtime or just at compile time? You may be able to use the AddOutput input with a parameter of "message SoundNameHere" to change the sound played during the game, I don't think this is likely to work though.
If you want to just configure what the sound name is per-instance use then you could use a func_instance_params. Put one in your instance, set the sound name in the ambient_generic to a name beginning with a dollar sign (like "$soundName") and that will appear in the func_instance menu to allow you to change the sound name.
I'm assuming this ambient_generic is inside this instance. Do you want to change the name during runtime or just at compile time? You may be able to use the AddOutput input with a parameter of "message SoundNameHere" to change the sound played during the game, I don't think this is likely to work though.
If you want to just configure what the sound name is per-instance use then you could use a func_instance_params. Put one in your instance, set the sound name in the ambient_generic to a name beginning with a dollar sign (like "$soundName") and that will appear in the func_instance menu to allow you to change the sound name.
[spoiler]- BEE2 Addons | (BEE2)
- Hammer Addons
Maps:
- Crushed Gel
- Gel is Not Always Helpful[/spoiler]
Quote from Never Sleeper on November 14, 2013, 5:55 amThat's exactly what I was looking for. Now I've got the problem that I can't hear the ambient_generic out of the func_instance. I've made a simple func_instance to test this case, where there is only 1 ambient_generic with the $ name, one func_param, 1 func_io_proxy and at least one branch to toggle to play the sound. Now I've got my map with just one button to play the ambient_generic out of the func_instance but I can't hear anything. The flag is set to "Play everywhere" and all volumes up to 10. =/
Any advice?
EDIT: Okay I solved the problem. I followed this tutorial: http://www.youtube.com/watch?v=iK12GRu5EFU
Now it works if I use "logic_relays" to trigger the needed cases. Now I'am able to set dynamic music changes with just a few parameters in my func_instance. Thank you very much @TeamSpen210!
; )
That's exactly what I was looking for. Now I've got the problem that I can't hear the ambient_generic out of the func_instance. I've made a simple func_instance to test this case, where there is only 1 ambient_generic with the $ name, one func_param, 1 func_io_proxy and at least one branch to toggle to play the sound. Now I've got my map with just one button to play the ambient_generic out of the func_instance but I can't hear anything. The flag is set to "Play everywhere" and all volumes up to 10. =/
Any advice?
EDIT: Okay I solved the problem. I followed this tutorial: http://www.youtube.com/watch?v=iK12GRu5EFU
Now it works if I use "logic_relays" to trigger the needed cases. Now I'am able to set dynamic music changes with just a few parameters in my func_instance. Thank you very much @TeamSpen210!
; )