![]() |
Playing Sounds Randomly through a whole map. - Printable Version +- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum) +-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html) +--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html) +---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html) +---- Thread: Playing Sounds Randomly through a whole map. (/thread-20574.html) |
Playing Sounds Randomly through a whole map. - tonitoni1998 - 03-01-2013 hello, i want to play sounds randomly through a whole map. i wanted to work with a loop, that adds a timer al over again and it always has a different time. and i tried to work with RandFloat to set a random time. i tried it like this at first. Code: float p = RandFloat(1.0f, 50.0f); so i guess there are a lot of mistakes in it and it will never work as i want it. so im asking for somehelp from you guys, how i could do it. what exactly do i want to do: when the player enters the map, some sounds i´ve chosen before are randomly played. the time between the sounds should also vary. RE: Playing Sounds Randomly through a whole map. - Adny - 03-01-2013 To set up a basic repeating timer (with random times), it will look something like this: Spoiler below!
Getting the different sounds to play is a bit trickier though. Can't think of a solution off the top of my head atm, I'll post back later if I think of something. Good luck with the rest ![]() RE: Playing Sounds Randomly through a whole map. - Rapture - 03-01-2013 Here is a simple example if you wanted a infinite loop and plays different random sounds at the players location. Spoiler below!
|