Jump to content
R3vo

RELEASE: Simple Conversation Script (APEX Edition)

Recommended Posts

Cool usefull script REVO.  I have a similar one for say3d commands.  I reccomend adding one more parameter: SecondsDelay.  Then in your script you sleep SecondsDelay before issuing the Chat message.  So with 3 calls to your script (and no hardcoded sleeps in-between), you can issue 3 chat lines, with a delay between each appearing driven by new SecondsDelay parameter.  Note that this also makes the script friendlier to use in Triggers where the sleep command is not allowed.

Share this post


Link to post
Share on other sites

Hi R3vo,

 

great work there! May I have a silly question; how you define the person which is speaking - I mean, the one which will move their lips?

Share this post


Link to post
Share on other sites
54 minutes ago, XerXesCZ said:

Hi R3vo,

 

great work there! May I have a silly question; how you define the person which is speaking - I mean, the one which will move their lips?

 

Parameters:
    _this select 0: _array
        _array select 0: STRING - Name of the person speaking - Default: Speaker
        _array select 1: STRING - Subtitle - Default: Subtitle
        _array select 2: OBJECT - Character which speaks the subtitle, used to enable lip movement - Default: objNull
Parameters:
    _this select 0: _array
        _array select 0: STRING - Name of the person speaking - Default: Speaker
        _array select 1: STRING - Subtitle - Default: Subtitle
        _array select 2: OBJECT - Character which speaks the subtitle, used to enable lip movement - Default: objNull

 

 

_line1 = ["Lt. Hopkins", "Good morning Sgt. Parker, I saw your performance in the simulator yesterday, you did very well.",Revo_instructor];
_line2 = ["Lt. Hopkins", "Today I want you to fly a patrol around Altis, get your gear and warm up the engine, you'll take off at 0600. I'll display today's route on your map as soon as you are in the air.",Revo_instructor];
_line3 = ["Lt. Hopkins", "Even though we haven't heard anything about CSAT for quite a while now, HQ is still nervous. So be extremely careful.",Revo_instructor];
_line4 = ["Lt. Hopkins", "Any questions?",Revo_instructor];
_line5 = ["Sgt. Parker","Sir, no Sir!",player];

[[_line1,_line2,_line3,_line4,_line5],"DIRECT"] execVM "scripts\fn_simpleConv.sqf";

 

The character who speaks can be defined for each line, in the example above it's Revo_instructor or the player in _line5

  • Like 1

Share this post


Link to post
Share on other sites

Thanks for your answer!

 

I suppose that you can make from this a function like this?

 

class CfgFunctions
{
	class XER
	{
		class Conversation
		{
			class Say {file = "fn_simpleConv.sqf";};
		};
	};
};

 

Share this post


Link to post
Share on other sites

Yes, that should work ;)

Share this post


Link to post
Share on other sites

R3vo, how would i make the script check if all lines has run, so for example i wait to make a conversation end, and then in the script complete the task. thanks in advance!

Share this post


Link to post
Share on other sites
41 minutes ago, mrsandbox said:

R3vo, how would i make the script check if all lines has run, so for example i wait to make a conversation end, and then in the script complete the task. thanks in advance!

 

waitUntil{sleep 1; isNil "Revo_fnc_simpleConversation_running"};

 

Share this post


Link to post
Share on other sites

Ok, I'll be that guy. I've followed the DaVinci code as far as I can. Can somebody please offer steps on how this script is implemented please?

Share this post


Link to post
Share on other sites

I'm having difficulty getting this to work, pretty noobish when it comes to scripting.

 

Is there any way to get that html tool reuploaded? It's no longer available.

Share this post


Link to post
Share on other sites
1 hour ago, phisher34 said:

I'm having difficulty getting this to work, pretty noobish when it comes to scripting.

 

Is there any way to get that html tool reuploaded? It's no longer available.

 

arma3_conv.html

 

 

see if that works. Open the file with your browser.

Share this post


Link to post
Share on other sites
4 hours ago, R3vo said:

 

arma3_conv.html

 

 

see if that works. Open the file with your browser.

Hey R3vo, wondering if you can help me with this. I've been watching tutorials all day but can't seem to crack this one issue, I think it's super easy.

 

I have a trigger in my mission that kicks off your dialogue script when the player is present.

The script is great and I've got all the functions working. But, it appears to keep repeating itself after the last line of dialogue, even after the player is no longer present. I've also tried it with and addAction command and get the same issue.

 

I am not sure what or where I need to write code to end the script after the last line is delivered?

 

I hope you can help, and I appreciate your time.

 

Thanks

Share this post


Link to post
Share on other sites

Hello R3vo. I've been using that HTML code to make this script work. However, I was wondering (I might have just missed this in the tutorials), whether it is possible to have a trigger fire after a certain line of dialog is said? I have someone in a mission say multiple lines, and want a trigger to activate after the 2nd.

Share this post


Link to post
Share on other sites
13 hours ago, novainfuse said:

Hello R3vo. I've been using that HTML code to make this script work. However, I was wondering (I might have just missed this in the tutorials), whether it is possible to have a trigger fire after a certain line of dialog is said? I have someone in a mission say multiple lines, and want a trigger to activate after the 2nd.

That's currently not possible. If I find the time I may implement something like this.

Share this post


Link to post
Share on other sites

HI R3vo. I do not understand scripting at all. As in English :D
I need different colors in one dialog. And thanks a lot for the script. INCREDIBLY simplifies the work with dialogs for me.
I tried this:
 

l1 = ["Летчик", "Две минуты!",vertPilot];
l2 = ["М-р Ягудин", "Так мужики, подорвали булки!",comandir1];
l3 = ["К-н Береговой", "Да мы давно готовы Вась, уже болит все от этих VIP-мест! Скорее бы на твердую землю стать, косточки размять.",pkp1];
l4 = ["М-р Ягудин", "Что это ты разнылся Юрок?",comandir1];
l5 = ["К-н Береговой", "Между прочим давно не восемнадцать. Могу и поныть.",pkp1];
l6 = ["М-р Ягудин", "Ну можешь и поныть. Но только пока мы в воздухе. Не вздумай заниматься этим на глазах у полковника.",comandir1];
l7 = ["К-н Береговой", "Ты про этого Антонова? Слышал что он отбитый нахер. Конкретнее знаете что?",pkp1];
l8 = ["М-р Ягудин", "А я слышал обратное. Не знаю. Поживем, увидим...",comandir1];
l9 = ["Л-т Бабченко", "Палки в колеса ему не суйте и все хорошо будет.",kalash1_1];
l10 = ["К-н Береговой", "Да ни кто и не собирался никому ничего и никуда совать, да Влад?",pkp1];
l11 = ["К-н Смирнов", "*молчит*",rpg1];
l12 = ["К-н Береговой", "Влад?",pkp1];
l13 = ["М-р Ягудин", "Ладно, хорош языками чесать. Мы на месте уже.",comandir1];
[[l1],"VEHICLE",0.13,false] execVM "scripts\fn_simpleConv.sqf";
[[l2,l3,l4,l5,l6,l7,l8,l9,l10,l11,l12,l13],"GROUP",0.13,false] execVM "scripts\fn_simpleConv.sqf";

Works, but not perfect. Line1 sometimes comes at the beginning of the dialogue (as it should), and sometimes at the end.

And that variant:

l1 = ["Летчик", "Две минуты!",vertPilot];
[[l1],"VEHICLE",0.13,false] execVM "scripts\fn_simpleConv.sqf";
l2 = ["М-р Ягудин", "Так мужики, подорвали булки!",comandir1];
l3 = ["К-н Береговой", "Да мы давно готовы Вась, уже болит все от этих VIP-мест! Скорее бы на твердую землю стать, косточки размять.",pkp1];
l4 = ["М-р Ягудин", "Что это ты разнылся Юрок?",comandir1];
l5 = ["К-н Береговой", "Между прочим давно не восемнадцать. Могу и поныть.",pkp1];
l6 = ["М-р Ягудин", "Ну можешь и поныть. Но только пока мы в воздухе. Не вздумай заниматься этим на глазах у полковника.",comandir1];
l7 = ["К-н Береговой", "Ты про этого Антонова? Слышал что он отбитый нахер. Конкретнее знаете что?",pkp1];
l8 = ["М-р Ягудин", "А я слышал обратное. Не знаю. Поживем, увидим...",comandir1];
l9 = ["Л-т Бабченко", "Палки в колеса ему не суйте и все хорошо будет.",kalash1_1];
l10 = ["К-н Береговой", "Да ни кто и не собирался никому ничего и никуда совать, да Влад?",pkp1];
l11 = ["К-н Смирнов", "*молчит*",rpg1];
l12 = ["К-н Береговой", "Влад?",pkp1];
l13 = ["М-р Ягудин", "Ладно, хорош языками чесать. Мы на месте уже.",comandir1];
[[l2,l3,l4,l5,l6,l7,l8,l9,l10,l11,l12,l13],"GROUP",0.13,false] execVM "scripts\fn_simpleConv.sqf";

Same effect

Share this post


Link to post
Share on other sites

@Hairy Potter

I wasn't able to reproduce the issue. How are you executing the code?

Share this post


Link to post
Share on other sites
Just now, Hairy Potter said:

null=[] execVM "dialogs\dialog.sqf"

 

Try to put a sleep 1; between the execution of your first dialogue and the second one. I am currently working on a way to have custom chat colours for each line, which would ultimately solve cases like yours.

  • Thanks 1

Share this post


Link to post
Share on other sites
4 minutes ago, R3vo said:

Try to put a sleep 1; between the execution of your first dialogue and the second one. I am currently working on a way to have custom chat colours for each line, which would ultimately solve cases like yours.

I did this

line1 = ["Летчик", "Две минуты!"];
[[line1],"VEHICLE",0.15,false] execVM "fn_simpleConv.sqf";
sleep 1;
line2 = ["М-р Ягудин", "Так мужики, подорвали булки со стульчаков!"];
line3 = ["К-н Береговой", "Да мы давно готовы Вась, уже болит все от этих VIP-мест! Скорее бы на твердую землю стать, косточки размять."];
line4 = ["М-р Ягудин", "Что это ты разнылся Юрок?"];
line5 = ["К-н Береговой", "Между прочим давно не восемнадцать! Могу и поныть!"];
line6 = ["М-р Ягудин", "Ну можешь и поныть. Но только пока мы в воздухе. Не вздумай заниматься этим на глазах у полковника."];
line7 = ["К-н Береговой", "Ты про этого Антонова? Слышал что он отбитый нахрен. Знаешь что нибудь про него конкретнее?"];
line8 = ["М-р Ягудин", "Говорят классный мужик. Прям... ОФИЦЕР! Не знаю я ничего конкретного... Поживем, увидим..."];
line9 = ["Л-т Бабченко", "Палки в колеса ему не суньте и все хорошо будет. Я так думаю."];
line10 = ["К-н Береговой", "Да ни кто и не собирался никому ничего и никуда совать, да Влад?"];
line11 = ["К-н Смирнов", "..."];
line12 = ["К-н Береговой", "Влад?"];
line13 = ["М-р Ягудин", "Ладно, хорош языками чесать. Почти на месте."];
[[line2,line3,line4,line5,line6,line7,line8,line9,line10,line11,line12,line13],"GROUP",0.15,false] execVM "fn_simpleConv.sqf";

And i think it working )) Thx for hint!!!

  • Thanks 1

Share this post


Link to post
Share on other sites

Hey R3vo,

 

Its working for me fine in singleplayer but not in mp. When im playing it in a coop mission with a friend the subtitles doesnt want to show up.

I have tried some solutions but I couldnt figure it out how it will work in mp. I only know that I must do something with this both things:

 

<params> remoteExec ["fnc_someScriptedFunction", targets, JIP];

 

[[line1,line2],"SIDE",0.15,true] execVM "fn_simpleConv.sqf";

 

Im to stupid to understand how i can convert functions to remoteExec.

 

regards,

 

JeckZeRippa

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

×