OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: mcnorth on 03 Apr 2007, 10:19:13

Title: How to make ambient noise play repeatedly?
Post by: mcnorth on 03 Apr 2007, 10:19:13
From OFP days I thought there was a way to make an ambient noise play repeatedly with a trigger.

I got as far as formatting the .ogg file, describing it in description.ext (class CfgSounds) and creating a trigger that plays the sound. I set the trigger to Repeatedly and varied the Min, Max and Mid times but it still only plays once.

I even tried a little script that sets a variable to true, waits a bit and then sets it to false, waits some more then sets it back to true. (with the variable name in the condition field of the trigger. Still it only plays the sound once.

Any ideas?

Thanks!


Problem solved. (in a crude sort of way)
Title: Re: How to make ambient noise play repeatedly?
Post by: satexas69 on 04 Apr 2007, 01:24:03
So what was the solution?
Title: Re: How to make ambient noise play repeatedly?
Post by: D_P_ on 04 Apr 2007, 05:56:35
Did he loop it with a script?

Code: [Select]
#start
playsound "intro"
~5
goto "start"
And adjust the delay to the length of the soundfile?

That's my guess... ;)
Title: Re: How to make ambient noise play repeatedly?
Post by: Duke on 04 Apr 2007, 13:02:29
Just out of curiousity, does anyone know where I can find a list of sounds I can use as a soundsource?
Title: Re: How to make ambient noise play repeatedly?
Post by: Cheetah on 04 Apr 2007, 17:22:48
What kind of list are you looking for? A list with the sounds already in the game / campaign?
Title: Re: How to make ambient noise play repeatedly?
Post by: Mandoble on 04 Apr 2007, 17:30:00
If not limited to the game sounds, here you'll find a lot of free samples you may convert to ogg to use as enviromental and whatever else.

Sound Dogs (http://www.sounddogs.com/)
Title: Re: How to make ambient noise play repeatedly?
Post by: Duke on 04 Apr 2007, 20:31:20
What kind of list are you looking for? A list with the sounds already in the game / campaign?

I'm trying to add a sound file to a static object but I must be an idiot because I have no idea where to find where the ingame sounds are found. The sound file must be able to be heard online in an MP Environment via the following command (or similar I guess if you guys think I'm using improper code):

soundSource = createSoundSource ["soundname", position _obj, [], 0]

Thanks.
Title: Re: How to make ambient noise play repeatedly?
Post by: johnnyboy on 04 Apr 2007, 22:20:01
If you un-pbo the sounds.pbo, you can find all the in-game music, sound fx, and voice files.  The music and sound fx files have logical names, and are easy to browse to find the one you want (i.e., birdsing_01, crickets_01, etc.). 

Unfortunately, the voice file names give no clue to their contents:  Examples:

UNIV_r30  <-- "Cover us!"  (little denotes radio voice)
UNIV_v01 <-- "Get out of here!" (little v denotes a non-radio voice)

Under the Missions directory within the unpacked Sounds PBO directory, there are nine folders, with same sound files repeated but by different voice actors (BRIAN, DAN, DUSAN, HOWARD, JEFF, MATTHEW, RPOERTPOLO, RUSSEL, RYAN).  This is cool, because we now know that the dialogue "Cover us!"  is the same file name "UNIV_r30" under each voice actor.  This will reduce the effort necessary to catalog these canned voice files.

There are also mission specific dialog voice files that would all have to be cataloged separately.  Examples:

M01r01.ogg  <-- "Echo this is crossroad.  The convoy is approaching.  Eliminate as many infantry as you can and disappear." M01 is for Mission 1, little r is radio, 01 is first radio voice file in first mission.

TRr02.ogg  <-- "Return to your task, or you will be charged!".  TR is Training mission, little r is radio, 02 is second voice file used in mission.

If I get time, maybe I will work on cataloging some of this, but no promises. 

Has anybody started this already somewhere else?

Title: Re: How to make ambient noise play repeatedly?
Post by: Cheetah on 04 Apr 2007, 22:41:14
Yep, I've started making a spreadsheet of the sound texts.
Title: Re: How to make ambient noise play repeatedly?
Post by: D_P_ on 05 Apr 2007, 00:37:17
...would it be too lazy to place a trigger in the mission with the sound you want and name it LAZY.
Save and open the mission.sqs file, Ctrl+F to find your trigger named LAZY and the sound's classname? :whistle:

Title: Re: How to make ambient noise play repeatedly?
Post by: johnnyboy on 05 Apr 2007, 19:11:04
@Cheetah:

Quote
Yep, I've started making a spreadsheet of the sound texts.

That is very cool.  Let me know if you want help cataloging some subset of this. 

Note that I do not know how to play the .WSS files though (they are not working very well in GoldWave).
Title: Re: How to make ambient noise play repeatedly?
Post by: nettrucker on 03 Jun 2007, 03:13:44
Hi everybody
Sorry for digging up this thread. I used this loop script but i need it to stop after a certain time. what lines must be added to exit the script after 20 seconds fo e.g.
Sorry i'm a complete noob when it comes to scripting.
thanks in advance for your reply.
regards nettrucker :)
Title: Re: How to make ambient noise play repeatedly?
Post by: Cheetah on 03 Jun 2007, 14:59:59
Code: [Select]
_counter = 0;
#start
playsound "intro"
~5
_counter = _counter + 1;
?(_counter >= 4): goto "end"
goto "start"
#end
;blablabla

or in SQF.

Code: [Select]
for [{_i=0},{_i <= 4},{_i = _i + 1}] do
{
     playsound "intro";
     sleep 5;
};
//blablabla
Title: Re: How to make ambient noise play repeatedly?
Post by: nettrucker on 03 Jun 2007, 15:10:57
Thank you Cheetah.
i'll try this right away.
regards nettrucker