random ambient_generic Created 18 years ago2006-03-08 00:19:05 UTC by mustang67 mustang67

Created 18 years ago2006-03-08 00:19:05 UTC by mustang67 mustang67

Posted 18 years ago2006-03-08 00:19:05 UTC Post #166924
in my map i want the "rocket_groan.wav" to play randomly throught the map or every 1-2min whats the best way to do this?
Posted 18 years ago2006-03-08 02:15:28 UTC Post #166926
Check this out CLICKY

And then mess with the objects properties?
Posted 18 years ago2006-03-08 03:04:31 UTC Post #166931
i don't know about the randomness of it, but you can play it everywhere. This is how I see it.

Use a multi manager to target your sound in order. But type in a random number anywhere between 60 and 120 (1 or 2 min) at the end, have it target another multisource similar to this one, then at the end of that one, have it target the first one. (old MW trick) that's as random as i can get it for sounds at least.

The complicated way is to use sentence sets. Also, you can use this to play music (throught the HEV Voice system, kinda like an HEV audio player :D) alot better than the double ambient_generic way. look up sentences if your interested in that.
Rimrook RimrookSince 2003
Posted 18 years ago2006-03-08 06:03:38 UTC Post #166944
The complicated way is to use sentence sets. Also, you can use this to play music (throught the HEV Voice system, kinda like an HEV audio player grin - :D) alot better than the double ambient_generic way. look up sentences if your interested in that.
Sounds pretty logic to me. I think you'll get the best results with this technique. But you need to write some extra lines in the sentences.txt file.
Posted 18 years ago2006-03-08 06:57:42 UTC Post #166954
The only HL-entity with a random function is the env_beam.
If there are two or more entities with the endingtarget name (I didn't try this with the startingtarget, yet.), the beam will randomly select one of them at each strike.
To trigger random events, you let the beam do some damage and cover the endingpoints with hurt-able buttons.

How to do what you want to achieve:
  • create and env_beam and an info_target for the startingpoint.
  • set the 'life' time to some low value, like '0.1' and set the 'damage' value to '100' or so.
  • do NOT activate the 'toggle' flag and activate the 'random strike' flag.
  • set up several func_buttons, make them trigger immediately and not move at all - set their health value to '1'.
  • name all buttons the same and also put that name into the 'ending entity' field of the beam (every button must have an origin brush at its center, otherwise the beam will aim at [0|0|0])
Now you have a number of buttons that each trigger a different event.
If you just want varying delays between the sound playing, let each button trigger an individual trigger_relay . Let each relay have a different delay time (between 60 and 120 for 1-2 minutes) and let each of them trigger the same multi_manager.
Let the multi_manager trigger the sound and the laser, without a delay, to create an infinite loop.

Start the whole thing with any trigger you like.

Done!

Of course this would be much cooler, if you used different variations of the sounds, to not only have varying delays, but also varying noises.
Posted 18 years ago2006-03-08 07:19:04 UTC Post #166955
Dude!

That sounds so freakin logic that is MUST work! Im going to try that today. :)
Posted 18 years ago2006-03-08 08:00:32 UTC Post #166958
Posted 18 years ago2006-03-08 17:25:49 UTC Post #167034
@ Ant: I just tried your adea, but i can't seem to get it to work. The beams are not causing damage to those func_buttons, so nothing happends. :/
Posted 18 years ago2006-03-08 18:14:32 UTC Post #167055
Do you mean "@haz!"? I think so.
Seventh-Monkey Seventh-MonkeyPretty nifty
Posted 18 years ago2006-03-08 21:06:55 UTC Post #167078
well it doesnt need to be random but i needs to play in a certin area periodically
Posted 18 years ago2006-03-10 08:43:47 UTC Post #167379
Oops, yes i mean @haz. ^^
Posted 18 years ago2006-03-10 09:07:28 UTC Post #167381
It does work! Check the example map!
You must be logged in to post a response.