Random ambient sounds? Created 2 months ago2024-07-08 02:01:43 UTC by jamie jamie

Created 2 months ago2024-07-08 02:01:43 UTC by jamie jamie

Posted 2 months ago2024-07-08 02:01:43 UTC Post #348960
I would like to create a map with random ambience sounds, but i'm not able to create a system that is able to complete such task correctly. I was trying with a looped multimanager, that triggered certain sounds in a specific time, (sound1 every 20 secs, sound2 every 10 secs, etc.), but it's not exactly random.
Posted 1 month ago2024-07-08 09:33:01 UTC Post #348961
You could take a look at the speaker entity. It plays a sentence from sentences.txt at a random interval between 3 and 10 minutes. Using a sentence group (sentences with the same name but different number suffix) will make it choose a random sentence from the group.

It's used a lot in the original Half-Life campaign where it adds random background noises. In these cases multiple speaker entities are used together to make the sounds play more often. An example would be c2a5c, where four speaker entities set to play the FAR_WAR sentence group to add an ambiance of distant combat.

If you're mapping for HL, you can take a look at predefined sentence groups in sentences.txt and see if any fits your need. If you're making a mod, you could create a new custom sentence group that fits exactly your need.
Posted 1 month ago2024-07-09 00:41:58 UTC Post #348969
It worked, after a couple of attempts. Thanks.
You must be logged in to post a response.