Home   Help Search Login Register  

Author Topic: How to make ambient noise play repeatedly?  (Read 2333 times)

0 Members and 1 Guest are viewing this topic.

Offline mcnorth

  • Members
  • *
How to make ambient noise play repeatedly?
« 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)
« Last Edit: 03 Apr 2007, 18:22:27 by mcnorth »

Offline satexas69

  • Members
  • *
Re: How to make ambient noise play repeatedly?
« Reply #1 on: 04 Apr 2007, 01:24:03 »
So what was the solution?

Offline D_P_

  • Members
  • *
  • YAY! I'm a lama again! ...oh wait.
    • ArmaAddons
Re: How to make ambient noise play repeatedly?
« Reply #2 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... ;)
just setpos & forgetpos!

Offline Duke

  • Members
  • *
    • Lifesupporters.com
Re: How to make ambient noise play repeatedly?
« Reply #3 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?

Offline Cheetah

  • Former Staff
  • ****
Re: How to make ambient noise play repeatedly?
« Reply #4 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?
Like missions? Help with Beta Testing! or take a look at the OFPEC Missions Depot for reviewed missions!

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: How to make ambient noise play repeatedly?
« Reply #5 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

Offline Duke

  • Members
  • *
    • Lifesupporters.com
Re: How to make ambient noise play repeatedly?
« Reply #6 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.

Offline johnnyboy

  • OFPEC Patron
  • ****
  • Matan los Pantalones!!!
Re: How to make ambient noise play repeatedly?
« Reply #7 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?

El Cojon: "Do you like to Tango?"
You: "Only in Bagango."
Download Last Tango in Bagango and discover how El Cojon earned his name...

Offline Cheetah

  • Former Staff
  • ****
Re: How to make ambient noise play repeatedly?
« Reply #8 on: 04 Apr 2007, 22:41:14 »
Yep, I've started making a spreadsheet of the sound texts.
Like missions? Help with Beta Testing! or take a look at the OFPEC Missions Depot for reviewed missions!

Offline D_P_

  • Members
  • *
  • YAY! I'm a lama again! ...oh wait.
    • ArmaAddons
Re: How to make ambient noise play repeatedly?
« Reply #9 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:

just setpos & forgetpos!

Offline johnnyboy

  • OFPEC Patron
  • ****
  • Matan los Pantalones!!!
Re: How to make ambient noise play repeatedly?
« Reply #10 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).
El Cojon: "Do you like to Tango?"
You: "Only in Bagango."
Download Last Tango in Bagango and discover how El Cojon earned his name...

Offline nettrucker

  • Members
  • *
  • Too young to die-OFP Campaign by TOY & nettrucker
Re: How to make ambient noise play repeatedly?
« Reply #11 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 :)

Offline Cheetah

  • Former Staff
  • ****
Re: How to make ambient noise play repeatedly?
« Reply #12 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
Like missions? Help with Beta Testing! or take a look at the OFPEC Missions Depot for reviewed missions!

Offline nettrucker

  • Members
  • *
  • Too young to die-OFP Campaign by TOY & nettrucker
Re: How to make ambient noise play repeatedly?
« Reply #13 on: 03 Jun 2007, 15:10:57 »
Thank you Cheetah.
i'll try this right away.
regards nettrucker