Gamer-3ac24a5e7f4beb96 4 Posted August 13, 2022 I have my sounds set up in the Sounds folder inside the mission folder. I have my sounds configured in my description.ext file. How do I call one sound from the list at random when a trigger is activated? Share this post Link to post Share on other sites
Joe98 92 Posted August 13, 2022 If you have for example 6 sounds, then write 6 scripts. Each script plays one of the sounds Your scripts might be named: sound0 sound1 sound2 sound3 sound4 sound5 Then you write a 7th script that selects a script at random. (I have been meaning to ask over here how to do that. I saw a script years ago but did not keep a record). . Share this post Link to post Share on other sites
Ibragim A 163 Posted August 13, 2022 In trigger activation: [] spawn "Your_sound_script.sqf"; Then make Your_sound_script.sqf in your mission folder & put in it: _sound = selectRandom [ "sound_1", // As defined by you in Description.ext "sound_2", "sound_3" ]; playSound _sound; 2 Share this post Link to post Share on other sites
Gamer-3ac24a5e7f4beb96 4 Posted August 13, 2022 Thanks Sergeant! When I put [] spawn "Your_sound_script.sqf"; with my sqf name into a trigger i get the error "On activation spawn type string expected code". I have the sqf file in the mission folder. Any ideas? Share this post Link to post Share on other sites
Ibragim A 163 Posted August 13, 2022 Oh, sorry. Of course: [] execVM "Your_sound_script.sqf"; Share this post Link to post Share on other sites
Gamer-3ac24a5e7f4beb96 4 Posted August 13, 2022 works perfectly thank you very much! Share this post Link to post Share on other sites