Randomizing sounds?

Coolz

L2: Junior Member
Sep 19, 2013
72
26
Okay, so I had a voice actor record some lines depending on whats happening on the map, the problem is I can only play a specific one. Earlier this week I used a bunch of logic_cases to try to randomize it up, but it didn't seem to work-- in fact when the map told it to pick a random case nothing happened, despite the fact I set it up to play a different line depending on what case it landed on.
How exactly do I use logic_cases to randomize that?
 

Coolz

L2: Junior Member
Sep 19, 2013
72
26
Yes aly, but the sounds I want to edit are things such as "The bomb is nearing a checkpoint" triggered by a trigger. That'd probably call for a randomized logic_case, or would it actually trigger the soundscript by playing that?
Other than that it calls for things not in the default soundscript at all, and I seriously doubt you can easily add it to the soundscript. It'd probably be easier to do a logic_case for the moment.
 
Last edited:

Freyja

aa
Jul 31, 2009
2,994
5,813
The trigger just tells an ambient_generic to play. The ambient_generic can reference a soundscript entry (one in game already, or a custom one you put in your level_sounds) or a raw wave file. Instead of referencing a raw wave file like it probably does, you just put a soundscript name in and have the soundscript entry under that name set up using rndwave to randomly select a wave file to play.
 

worMatty

Repacking Evangelist
aa
Jul 22, 2014
1,257
999
You would be better off using the PlayVO, PlayVORed and PlayVOBlue inputs of tf_gamerules. You won't need to use ambient_generics then. You can force only one team to hear the announcement, too.