Home   Help Search Login Register  

Author Topic: Adding a Voice  (Read 1573 times)

0 Members and 1 Guest are viewing this topic.

Offline Ironman

  • Former Staff
  • ****
    • {GSF} Home Page
Adding a Voice
« on: 27 Mar 2008, 10:42:28 »
I know adding a sound looks like this

Code: [Select]
class CfgSound
{
sounds[]={Insertion};

class Insertion
{
name = "Insertion";
sound[] = {\sound\Insertion.ogg, db+40, 1.0};
};
}

I wonder if CfgVoice can be used to insert this Insertion.ogg snippet I have. Can someone let me know if it is even possible?
TS3 IP: tor.zebgames.com:9992

Offline Loyalguard

  • Former Staff
  • ****
Re: Adding a Voice
« Reply #1 on: 27 Mar 2008, 12:38:51 »
You can choose which voice you want for specific units using setIdentity to corresponding entries in CfgIdentities in the Description.ext but as far as I know changes to the actual "voice" or the "speaker" has to be made via an addon that mods CfgVoice and is not possible within a mission.

Offline Ironman

  • Former Staff
  • ****
    • {GSF} Home Page
Re: Adding a Voice
« Reply #2 on: 27 Mar 2008, 19:20:37 »
ok, thank you.

basically, I have this sound file and I want it to play over the intro music... is this possible?

Description:

Code: [Select]
class CfgMusic
{
tracks[]={intro};

class intro
{
name = "intro";
sound[] = {\music\intro.ogg, db+40, 1.0};
};
}

class CfgSound
{
sounds[]={Insertion};

class Insertion
{
name = "Insertion";
sound[] = {\sound\Insertion.ogg, db+40, 1.0};
};
}

So, the intro music displays in the trigger effect mode. If I try to play two musics the first one will end when the second starts.... So, I want two sounds to be playing at once, I believe this is possible.
« Last Edit: 27 Mar 2008, 21:37:58 by Ironman »
TS3 IP: tor.zebgames.com:9992

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re: Adding a Voice
« Reply #3 on: 27 Mar 2008, 23:06:44 »
Indeed it is. You can't play two music files at the same time because, as you've noted, once you start playing the second the first one stops. The same sort of applies for playSound, if I remember correctly, and definitely for all kinds of radio communications - however, say can be used as many times as necessary on top of each other - as long as you use different entities to say things. Also, due to a strange bug/feature of ArmA, any Says played while in cutscene-mode is apparently broadcasted globally, meaning they work the same as playSound in essence. But if you only need one piece of music + one sound to play, use playMusic & playSound in your script!

So work with these commands and see what you can do. :)

Wolfrug out.
"When 900 years YOU reach, look as good you will not!"

Offline Ironman

  • Former Staff
  • ****
    • {GSF} Home Page
Re: Adding a Voice
« Reply #4 on: 27 Mar 2008, 23:17:16 »
thanks

So, I tested it out, and it doesn't recognize the sound.

Description:
Code: [Select]
class CfgMusic
{
tracks[]={intro};

class intro
{
name = "intro";
sound[] = {\music\intro.ogg, db+40, 1.0};
};
}

class CfgSound
{
sounds[] = {Insertion};
class Insertion
{
name = "Insertion";
sound[] = {"\sound\Insertion.ogg", db+20, 1.0};
titles[] = {0, $STRM_Insertion};
};
}

Trigger Act:
Code: [Select]
s1 say "Insertion"
s1 is soldier..

I get an error message saying Insertion can not be found
------------
OK...so I have done more testing. It says sound can't be found when I use a trigger. If I just put it on a unit, I get no error and no sound still.... lol

I feel like someone knows how to do this, go ahead, smack me around if I am doing something crazy stupid...
« Last Edit: 28 Mar 2008, 02:03:38 by Ironman »
TS3 IP: tor.zebgames.com:9992

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re: Adding a Voice
« Reply #5 on: 28 Mar 2008, 10:00:07 »
Well, I'm stumped. The only thing I can see that might be "wrong" in that description.ext is that you've got quotes around your path - that I don't think is necessary, although if you're using the default sound folder, all you'd really need to do is write the name of the .ogg file inside quotes, as so:

Code: [Select]
class Insertion
{
name = "Insertion";
sound[] = {"Insertion.ogg", db+20, 1.0};
titles[] = {0, $STRM_Insertion};
};

But it should also work if you just remove the quotes around the path initially. Anyway...also make sure you actually have the file in the appropriate folder. :dunno:

Another thing that's a rather remote but nonetheless real possibility is that you've screwed up the encoding of your file somehow - you're not using i.e. Word or somesuch to edit your scripts, are you? If nothing else works, take another (proven-to-work) description.ext, edit out all the other stuff, leaving only cfgsounds, and then edit the paths there (with Notepad, for instance - or an editing programs like ArmA Edit) to your sound(s) and save it in your mission.

Sounds can be fickle beasts, I had a ton of problems just like yours when trying the first time to get them to work. But eventually the correct mix of quotes and no quotes and file formats and whatnot gave me a fully working solution. Once you've done it once, it usually keeps working no problem :D

Good luck!

Wolfrug out.
"When 900 years YOU reach, look as good you will not!"

Offline Ironman

  • Former Staff
  • ****
    • {GSF} Home Page
Re: Adding a Voice
« Reply #6 on: 28 Mar 2008, 10:10:00 »
thanks, I'll try it out tomorrow. Bed time now.
TS3 IP: tor.zebgames.com:9992