Jump to content
Sign in to follow this  
Kovah85

Best way to have conversations?

Recommended Posts

I am looking for the best way to make it so that you can talk to certain units in game, right now I am using add/removeAction with an If statement in the script to determine which action you picked. I'm happy with this, but what I am not happy with is that I am using the hint command for the unit's speech.

I've searched around for hours to find a solution and I keep finding links to the directSay command. This sounds like it would be exactly what I am looking for, but I have no idea on how to set up the description.ext and I can't find any help on that subject, at least not on my own.

So my question is this. Is the way I am handling the 'conversations' (add/removeAction with If statements in script) the best way? Or is there a more efficient way? And secondly how does one set up a description.ext for the purposes of using directSay?

Thanks for your time.

Share this post


Link to post
Share on other sites

description.ext:

class CfgRadio

{

sounds[] = { hlaska1, hlaska2, hlaska3, hlaska4, hlaska5 };

class hlaska1

{

name = "hlaska1";

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

title = "Agent Smith?";

};

class hlaska2

{

name = "hlaska2";

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

title = "A...ano.";

};

class hlaska3

{

name = "hlaska3";

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

title = "Jste vpořádku?";

};

class hlaska4

{

name = "hlaska4";

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

title = "Ty šmejdi mi dali do těla, ale dostanu se z toho.";

};

class hlaska5

{

name = "hlaska5";

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

title = "Fajn. Náš medik se na vás podívá. Musíme dokonÄit misi, pak vyrazíme zpÄ›t na základnu.";

};

};

In your script:

TL directSay "hlaska1";

sleep 2;

civil directSay "hlaska2";

sleep 2;

TL directSay "hlaska3";

sleep 5;

civil directSay "hlaska4";

sleep 3;

TL directSay "hlaska5";

sleep 5;

From one of my missions, text is in Czech but that should not be a problem. :)

You can just edit the text between "".

It works well and looks nice.

Share this post


Link to post
Share on other sites

Oh man! Thanks a lot! This is pretty much exactly what I was hoping for.

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  

×