target_speaker (Q3)

Discussion for Level editing, modeling, programming, or any of the other technical aspects of Quake
Post Reply
Ouija
Posts: 55
Joined: Tue Aug 16, 2011 9:11 pm

target_speaker (Q3)

Post by Ouija »

The global spawnflag seems to be broken on that entity (id maps make use of it somehow though), or I'm really too dumb to get how this thing works. I guess I'll just ask directly:
How do I set up a random sound out of three available to play globally every 10 to 15 seconds, and one sound to infinitely loop in specific spots?
deqer
Posts: 298
Joined: Mon Dec 28, 2009 6:30 pm

Re: target_speaker (Q3)

Post by deqer »

I thought I could help, but after reading your post, it's not so easy for me to provide an answer. I would say the subject title is a little misleading.

The only thought/assumption that comes to my mind is that it can't be done and that it could probably be done using the EntityPlus mod.
obsidian
Posts: 10970
Joined: Mon Feb 04, 2002 8:00 am

Re: target_speaker (Q3)

Post by obsidian »

You probably won't get it to play randomly, but you could try setting up 3 or more speakers with different wait and random values, perhaps with prime values. It should sound random enough. Otherwise you can do some Q3 electronics.
[size=85][url=http://gtkradiant.com]GtkRadiant[/url] | [url=http://q3map2.robotrenegade.com]Q3Map2[/url] | [url=http://q3map2.robotrenegade.com/docs/shader_manual/]Shader Manual[/url][/size]
Ouija
Posts: 55
Joined: Tue Aug 16, 2011 9:11 pm

Re: target_speaker (Q3)

Post by Ouija »

Would the global range work though?
User avatar
Eraser
Posts: 19177
Joined: Fri Dec 01, 2000 8:00 am

Re: target_speaker (Q3)

Post by Eraser »

You can do the randomly thing in vQ3.
Put a func_timer in your map. Give it a wait key of 12.5 and a random key of 2.5 and set the START_ON spawnflag. The timer entity will now trigger it's target once in every 10 to 15 seconds. Make it target a target_relay entity and set the RANDOM spawnflag. This spawnflag will make sure that the target_relay will trigger one randomly selected target instead of all its targets. Make the target_relay target all three of your target_speakers and set the GLOBAL spawnflag. Don't set its random or wait keys. That should do the trick.
User avatar
Eraser
Posts: 19177
Joined: Fri Dec 01, 2000 8:00 am

Re: target_speaker (Q3)

Post by Eraser »

Ouija wrote:and one sound to infinitely loop in specific spots?
That's a matter of putting a target_speaker in each position where you want the sound to originate from and set the LOOPED_ON spawnflag.
deqer
Posts: 298
Joined: Mon Dec 28, 2009 6:30 pm

Re: target_speaker (Q3)

Post by deqer »

Ouija is right. The GLOBAL spawnflag is broken. Whether it's on or off, the sound is still not global.

I did some research and found someone else at splashdamage forums mentioned the same problem with wolfenstein:et(uses q3 engine), here http://www.splashdamage.com/forums/show ... tor-Errors

quote: "This spawnflag option does not work correctly."

---

This is a shame...
User avatar
Eraser
Posts: 19177
Joined: Fri Dec 01, 2000 8:00 am

Re: target_speaker (Q3)

Post by Eraser »

I'm pretty sure the GLOBAL spawnflag works perfectly. I'm using it all throughout the map I'm currently working on.

Maybe it doesn't work in combination with LOOPED_ON or LOOPED_OFF, I haven't tested that. But as a one-shot playable sound, GLOBAL works well for me :shrug:
Post Reply