Jump to content
Sign in to follow this  
DarkRise

"playSound3D" and customs files - HELP

Recommended Posts

Hi everyone,

I'm new to the arma 3 editing and I just wanted to do a simple thing :

I placed a "Hunter GMG" and I use this command to play a music :

playSound3D ["C:\user\"user"\documents\arma 3 - other profiles\"myprofile"\WIP_Altis.Altis\Sounds\Music\Signal.ogg", Hunter, true, getPos Hunter, 9, 1.1, 50];

And it works.

But when I export my mission to the mission folder, if I remove the file from the above path, because a person who download my mission will not have that file, the music don't play anymore.

So here's my question, can I, with this function, use the "description.ext" file ?

I already tried :

class CfgSounds

{

// List of sounds (.ogg files without the .ogg extension)

sounds[] = {Signal};

// Definition for each sound

class Signal

{

name = "Signal"; // Name for mission editor

sound[] = {\Sounds\Music\Signal.ogg, 1, 1.0};

titles[] = { };

};

};

It works with playSound, say3D, say,... but not with playSound3D :mad: !

Did you know how can i do please ?

Thank you for your help.

PS: English is not my mother tongue, I hope I don't do many errors :o !

Share this post


Link to post
Share on other sites
class CfgMusic

{

tracks[]={yourmusicfilename};

class music1

{

name = ""; sound[] = {\music\yourmusicfilename.ogg, db+5, 1.0};

};

};

and then put this in a trigger:

on activation : 1 fademusic 1; playmusic "music1";

on dea: 1 fademusic 0;

Share this post


Link to post
Share on other sites

Thank you for your answer but it's not that I wanted. I just want to use the playSound3D function because I want to play a music only in a small area near the vehicle,as if the radio of the car was on, i don't know if my idea is clear, sorry.

Thanx for your answers.

Share this post


Link to post
Share on other sites

i didn't found a way to the relative path too. To play sounds in 3d, I place a civ-ai and use the say command with that ai.

Share this post


Link to post
Share on other sites
Thank you for your answer but it's not that I wanted. I just want to use the playSound3D function because I want to play a music only in a small area near the vehicle,as if the radio of the car was on, i don't know if my idea is clear, sorry.

Thanx for your answers.

no, you're perfectly clear. I just wasn't aware you could even do that. Thank you - Pretty nifty. I'll have to look into this.

edit: have you tried taking a look at this guide? I'm in the process of trying to make sense of it. But he does address your problem. http://killzonekid.com/arma-scripting-tutorials-mission-root/

Edited by {HoD}Ferocious

Share this post


Link to post
Share on other sites
no, you're perfectly clear. I just wasn't aware you could even do that. Thank you - Pretty nifty. I'll have to look into this.

edit: have you tried taking a look at this guide? I'm in the process of trying to make sense of it. But he does address your problem. http://killzonekid.com/arma-scripting-tutorials-mission-root/

I was actually looking at it, but I think I will try it tommorow because it's 11:30 pm in France, I am on the editor from 4 hours, I can't do 1 hour more x), thank you for your help, I keep you informed ;).

EDIT :

Hi, finally it works !! I've just placed this code in a trigger or in an initialization field and the playSound3D use the .ogg file from the pbo mission :

MISSION_ROOT = call { private "_arr"; _arr = toArray str missionConfigFile; _arr resize (count _arr - 15); toString _arr }; playSound3D [MISSION_ROOT + "Sounds\Music\Signal.ogg", Hunter, true, getPos Hunter, 9, 1.1, 50];

MISSION_ROOT = call { private "_arr"; _arr = toArray str missionConfigFile; _arr resize (count _arr - 15); toString _arr }; is to define the mission root : when I export the mission to single missions, it will take the "Sounds\Music\Signal.ogg" from the pbo file.

playSound3D [MISSION_ROOT + "Sounds\Music\Signal.ogg", Hunter, true, getPos Hunter, 9, 1.1, 50]; is the function itself : it take the file from the "MISSION_ROOT\Sounds\Music\" folder, play it from the Hunter (named Hunter in the editor), in Interior (I don't notice any difference...), place the music on the Hunter, I choose 9 for the volume, increase the frequency to 1.1 (because the music I choose was to slow, but you can leave it at 1) and finally 50 for the audible range. I placed some repair specialists with some repair animations, and it looks great !

Thank you for your help, hope it will be useful for others ^^ !

Edited by DarkRise

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×