Jump to content
Sign in to follow this  
muni

NPC's talking

Recommended Posts

First I want to thank all that help with my other question :) you guys rule!

Now I want to ask something else...

How can I make a bot "talk"

Like opening his mouth for 10 seconds then and then stop. Then start again etc?

Can I make a bot following a way-point at the same time while he'll talk or driver etc

To explain what with details what I want, I have a scenario.

You are a soldier and and officer tells you to get in car with him and another soldier and drive. While all these happen I want then to talk about something.

THANK YOU FOR YOUR TIME! (AGAIN) :yay:

Share this post


Link to post
Share on other sites
use say command, read info in link for moving lip info.

http://community.bistudio.com/wiki/say

he can do this while moving or driving yes.

Thank you for your time, but what do I have to do I don't need an .ogg file? (just adding subtitles via direct chat for instance)

Share this post


Link to post
Share on other sites

There are a few steps to creating speech in the game.

First of all, download the free program Audacity.

Next record the lines that you want.

You now need to set up the files in audacity (you can just hit 'record' within the program).

If you have a stereo file, you need to split it (the little down arrow on the left, then "split stereo track").

Now set it as mono, again, the little down arrow, then "Mono".

Lastly you need to set it to 16 bit sample format - Down arrow, set sample format, 16 bit.

Now go to file, export, choose .ogg as the format.

Ok you have the file you need for sound now. Now you need to create a .lip file telling the character when to move their lips.

Find a copy of BI Tools, not sure where you download this exactly, and in Sound Tools, you have a program called WaveToLip. Drag your .ogg file onto this, and it will create a .lip file in the same location as the .ogg file.

Second last thing to do is declare your sounds in you Description.ext file.

If you dont have one, create a file with Notepad, save it as Description.ext in your mission folder, make sure you select "All Files" when saving.

In the file, put something like this:

class CfgSounds

{

sounds[] =

{

speech1, speech2,

};

class speech1

{

name = "speech1";

sound[] = {"\sound\speech1.ogg", 1, 1.0};

titles[] = { };

};

class speech2

{

name = "speech2";

sound[] = {"\sound\speech2.ogg", db+7, 1.0};

titles[] = { };

};

That is assuming you have two speech files, you can declare and add more as you need them.

Lastly, create a subfolder in your mission folder called "sounds". Put your .ogg and .lip files in there.

Now in the editor, just use the command in a trigger

Man1 say "speech1";

And it should work.

---------- Post added at 01:18 PM ---------- Previous post was at 01:13 PM ----------

Yes there are a few steps and it is a bit involved, but you get used to it, and its all worth it when you see your characters speaking...

-----

EDIT: Just realised I have db+7 for the speech2 settings...Normally should be a 0 value, but obviously you can play around with this setting if you want to adjust the volume.

Edited by Funkman

Share this post


Link to post
Share on other sites

@muni

i found this demo mission of speaking AI with lips and figured i should post it here, then i realised it was yours :D

great demo m8.

Share this post


Link to post
Share on other sites

thx lad, coulndt have done without the help of the community :)

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  

×