Jump to content
Sign in to follow this  
tromac

Help needed on AI Direct Speach Text

Recommended Posts

Hi guys,

I've been looking and have only found the topic on conversations which is too complicated for what I am after. It's 2am here and I so desperately need to get to sleep but this is the last thing to do in the mission.

What I want to do is have a trigger activate an AI to say something in direct text to the player who activated the trigger.

Basically I have locked aircraft with mechanics working on them and when someone goes to get in it the mechanic says "Sorry mate but she's grounded" or something similar. How do I do this? Please use idiot speak as I am tired and not great at this.

Thanks in advance.

---------- Post added at 02:56 AM ---------- Previous post was at 02:22 AM ----------

I think I am on the right track with this topic http://forums.bistudio.com/showthread.php?t=92393&highlight=direct+chat

But how do I define the string? I tried using crw4 directSay _tech01; where crw4 is the AI and _tech01 is the string in Description.Ext

I'm not sure I am defining the string correctly as all I have is

_tech01 = "Sorry sir but this bird is being serviced. She's out of action unless the OC says otherwise";

HELPPPPPP

Share this post


Link to post
Share on other sites

No guarantees, but try

crw4 directSay "tech01"

I wouldn't use _ as class prefixes either, as they tend to be used for _local variables.

DirectSay is a radio protocol thing, not a string thing. So you need to setup cfgRadio in your description.ext for this to work (string would be in the titles). Example of that approach that works for me, in description.ext:

class CfgRadio {
sounds[] = {};
class Loadmaster1 {name="Loadmaster1";sound[]={\sounds\01_OneMinuteToDropZone.ogg,db-30,1.0};title = "One minute to the dropzone.";};
class Loadmaster2 {name="Loadmaster2";sound[]={\sounds\02_GetReady.ogg,db-30,1.0};title = "Okay, get ready!";};
class Loadmaster3 {name="Loadmaster3";sound[]={\sounds\03_GetOutNow.ogg,db-30,1.0};title = "Green light! Get your ass out now!";};
};

If you don't need actual voices, try titleText instead. It is the chat equivalent of directSay (where for others it will be sideChat/sideRadio, globalChat/globalRadio etc).

Share this post


Link to post
Share on other sites

Thank you so much Carl.

I have it partially working but get a sound error. I don't actually want any sound played but want the words to come from the AI so I don't think Titletext would suit? And also only visible to those in the area not everyone.

Is it possible to user the radio without playing a sound file?

My Description.ext now looks like this but I get the error no entry on the sound file.

class CfgRadio

{

sounds[] = { tech01 };

class tech01

{

name = "tech01";

sound[] = {"", 1, 1};

title = "Sorry sir but this bird is being serviced. She's out of action unless the OC says otherwise";

};

};

Edited by tromac

Share this post


Link to post
Share on other sites

Not sure, maybe it works with a dummy file rather than an empty file definition? I know I have to use that trick for setSoundEffect command to work properly with trigger based sounds.

Share this post


Link to post
Share on other sites

There is an oog file here that is just silence if anyone needs it.

Share this post


Link to post
Share on other sites

Thanks twirly and Carl,

I had tried just using an empty text file renamed to an ogg and this morning it didn't work. But when I got up and loaded it again it was working fine. Just needed to reload the mission, it's amazing what a few hours sleep will do for you.

Share this post


Link to post
Share on other sites
Just needed to reload the mission, it's amazing what a few hours sleep will do for you.

No, it wasn't the sleep. It actually was the reload ;) Changes to description.ext (or anything included to it, like dialogs etc) requires you to save or load the mission for those changes to take effect.

Share this post


Link to post
Share on other sites
No, it wasn't the sleep. It actually was the reload ;) Changes to description.ext (or anything included to it, like dialogs etc) requires you to save or load the mission for those changes to take effect.

Yep but I needed the sleep to contemplate that might have been the case :)

Share this post


Link to post
Share on other sites

From my understanding were you able to get the AI to read or "Speak" without using a custom sound by using a blank file?

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  

×