OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: Luke on 28 Jun 2009, 02:24:37

Title: internal sounds
Post by: Luke on 28 Jun 2009, 02:24:37
Is there a way to play sounds internal to the game (i.e. BI-created sounds)?

In particular "C:\Program Files\Atari\ArmA\AddOns\weapons\sound\"Explo_Medium_Vehicle4.wss"

Thanx, as always.

Luke
Title: Re: internal sounds
Post by: Trapper on 28 Jun 2009, 15:51:09
Pretty sure there is a way, and it's very good that you already know that .wss file name.

Hopefully someone else does remember this better than me. :)
If the file is nowhere configured as a sound class in the .pbos config.cpp you cannot just call it by object say "xxx".
Before you've got to define it as a sound class in the description.ext of your mission. Hardest part will be to find out the right path to Explo_Medium_Vehicle4.wss.
IIRC in OFP using \ or / or just not using them in the file path made a difference.
Title: Re: internal sounds
Post by: h- on 28 Jun 2009, 16:56:12
Quite sure that the filepath is
"\weapons\sound\Explo_Medium_Vehicle4.wss"

Not sure about in which sound type it should be put in, dunno if any other scripting command than say plays .wss.. :dunno:
Title: Re: internal sounds
Post by: kju on 28 Jun 2009, 17:17:31
http://community.bistudio.com/wiki/Description.ext#Sounds

Define the sound and use the var name in your scripts.
Title: Re: internal sounds
Post by: Wolfrug on 28 Jun 2009, 18:29:38
AFAIK, no - not in the mission description.ext (as kju there suggests).

I tried this in various situations, particularly when making the script version of DSAI. Wouldn't it've been so much easier if I could've just pathed directly to the sounds in the sounds.pbo foldier, thus reducing the actual size of the script to just the .sqf files :)

But no, that sadly only works in an addon config. Unless someone has figured out something clever I've missed (and, please, provide an example mission, not speculation), it's impossible to access BIS sounds using only the description.ext : you need to extract the sounds you want from the BIS .pbo file and put them in your mission just like any other sound. Now - if you're making an ADDON then you can happily path to sounds wherever, but but...

So: just extract the .wss file (I suggest pboView (http://www.ofpec.com/ed_depot/index.php?action=details&id=505&game=ArmA) which will let you extract just that file without having to open up the whole shebang) and put it in the mission folder and then use the description.ext information kju provided. :)

Good luck!

Wolfrug out.
Title: Re: internal sounds
Post by: Luke on 30 Jun 2009, 00:27:35
Can non-man classes use say? (do they make sound?)

Luke
Title: Re: internal sounds
Post by: Trapper on 30 Jun 2009, 00:45:55
Yes. Very good indeed.
The sound will be 3d positioned on the object and vanish over distance. Tinker with the dB value in the description for the distance. Remember to reload the mission every time in ArmA editor for a change to have effect.
The downside is that say in combination with a camera cutscene is bugged. No matter how far away the say commands are played on the island, they'll all be audible at 100% in camera view.