Jump to content

Trouble with target_speaker entity


Go to solution Solved by NAB622,

Recommended Posts

I have two issues I'm running into with target_speaker entities in GtkRadiant.

1) I can't seem to set a sound to loop AND have a delay between each loop. I set my "noise" key to the audio file I want, and checked the "looped-on" box, then added a "wait" key. The "wait" key doesn't do anything, it'll just loop immediately without any delay, making sounds very repetitive.

2) For some entities, I want to use the "soundGroup" key so that it randomly picks from a group of sound files, but I can't seem to get it to work. The documentation in Radiant is unclear exactly how it's supposed to work:
 

Quote

"sounds" va() min max, so if your sound string is borgtalk%d.wav, and you set a "sounds" value of 4, it will randomly play borgtalk1.wav - borgtalk4.wav when triggered

to use this, you must store the wav name in "soundGroup", NOT "noise"

I'm unclear on what needs to be written in the "noise" and "soundGroup" keys. Using this example, I understand "sounds" should be set to 4 if I have 4 audio files numbered properly, but no matter what combination of things I try in the other two keys I can't get it working. I'm using the stock Yavin bird sounds for my testing, so there's no issues with improper export settings or file names.

Link to comment

Target_speaker is buggy as hell. Several of the parameters don't work. I don't think the wait key does anything on them, either.

You might be better off using target_delay or a script to fire it every few seconds or whatever. In fact, if you're looking for random sounds, that wouldn't be a bad idea, in my opinion.

 

I've never heard of SoundGroup before....is that even a thing in Jedi Outcast/Academy?? It looks like your Radiant is set up for Voyager: Elite Force, judging by the Borg reference. Try changing it to Jedi Academy and see what happens.

Link to comment
8 minutes ago, NAB622 said:

Target_speaker is buggy as hell. Several of the parameters don't work. I don't think the wait key does anything on them, either.

You might be better off using target_delay or a script to fire it every few seconds or whatever. In fact, if you're looking for random sounds, that wouldn't be a bad idea, in my opinion.

 

I've never heard of SoundGroup before....is that even a thing in Jedi Outcast/Academy?? It looks like your Radiant is set up for Voyager: Elite Force, judging by the Borg reference. Try changing it to Jedi Academy and see what happens.

How would I need to set up target_delay to get the intended effect?

I may be stuck scripting it but if I can do it in Radiant that would be preferable.

I'm using netradiant so that's likely why. Probably doesn't exist in JA.

 

Link to comment
  • Solution

Assuming SoundGroup is not a thing.....a simple script and a series of target_speaker entities is 100% the cleanest way to go.

 

If you want to set up an entity system to play random sounds without a script, use some kind of a trigger (I'll use trigger_once here), target_delay, target_random and target_relay.

trigger_once
      |
      |
      v
target_delay <--------|
      |               |
      |-------> target_relay
                      |
                      |
                      v
                target_random
                      |
      -------------------------------
      |               |             |
      v               v             v
target_speaker  target_speaker   target_speaker

 

Target_delay has a random key, use that to create your randomization.

 

Edit: A side effect of this setup is that the trigger_once will also trigger the target_random, since they'll end up with the same targetname. All it will do is trigger a sound immediately before the delay takes place, so it's not a problem, just something to be aware of.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...