Jump to content
Sign in to follow this  
rejenorst

kbtell passing a variable

Recommended Posts

I've noticed that with kbtell I can actually string together multiple sounds to be used in a singular radio message.

Example this will play r_alpha.ogg followed by r_move.ogg :

class testspeech
{
	text = "Alpha moving";
	speech[] = {"\Sounds\r_alpha.ogg","\Sounds\r_move.ogg"};
	gesture = "gestureGo";
	class Arguments {};
};

I am just wondering if its possible to send variables to the bikb file and use them in the following manner:

speech[] = {"\Sounds\(_this select 0)","\Sounds\(_this select 1)"};

If so how would I send them via the kbtell command?

Currently I use the following for civilian screams when firednear when calling kbtell:

_unit kbTell [_unit,"scream",_scream];

_scream being a format string with random numeric value that calls one of 8 screams.

If for example I wanted to pass a variable through kbtell would it be possible like this for example or some way similar?:

_unit kbTell [_unit,"scream",_scream,["r_alpha.ogg"]];

Thanks.

EDIT: Nevermind I figured it out:

class Sentences
{
   class rejcs_radio_1
{
	text = "%Team %Order %EndMsg";
	speech[] = {%Team,%Order,%EndMsg};
	gesture = "";
	class Arguments 
	{
	   class Team {type = "simple";};
	   class Order {type = "simple";};
	   class EndMsg {type = "simple";};
	};
};
};
class Arguments{};
class Special{};
startWithVocal[] = {};
startWithConsonant[] = {};

And use the following kbtell:

_groupIdText = "Alpha"; 
_groupIdFileName = "\Sounds\r_alpha.ogg";
_groupTaskRadioText = "Moving!";
_groupTaskRadioFileName = "\Sounds\r_moving.ogg";
_groupRadioEndMsgText = "Over!";
_groupRadioEndMsgFileName = "\Sounds\r_over.ogg";

_groupLeader kbTell [player,"rejcs_radio","rejcs_radio_1",["Team",{},_groupIdText ,[_groupIdFileName]],["Order",{},_groupTaskRadioText,[_groupTaskRadioFileName]],["EndMsg",{},_groupRadioEndMsgText,[_groupRadioEndMsgFileName]]];

Edited by Rejenorst

Share this post


Link to post
Share on other sites

Is KB tell an addon I do not see hardly any info on it wvwn When I google it

Share this post


Link to post
Share on other sites

kbtell is a command for ARMA's conversation system. kbtell is the command to get a unit to say a particular sentence. In all the conversation system is a flexible way of creating a list of conversational sentences linked with their text and sound files etc. Its a tad more complicated than using sideRadio etc though.

For more information check here, (commands are linked in the post): http://forums.bistudio.com/showthread.php?91875-New-conversation-system-how-to

Related commands:

https://community.bistudio.com/wiki/kbAddTopic

https://community.bistudio.com/wiki/kbTell

https://community.bistudio.com/wiki/kbRemoveTopic

Also if anyone knows where I can find the list of native radio commands I would much appreciate it. I noticed that typing in things like Alpha results in the unit saying "Move to Alpha" etc.

Edited by Rejenorst

Share this post


Link to post
Share on other sites

That contains the sounds themselves but I am just looking for classnames of the sounds to call.

class Sentences
{
   class rejcs_radio_1
{
	text = "%Radcall ";
	speech[] = {%Radcall};
	gesture = "";
	class Arguments 
	{
	   class Radcall {type = "simple";};
	};
};
};
class Arguments{};
class Special{};
startWithVocal[] = {};
startWithConsonant[] = {};

for example this will result in the unit saying "Move to point Alpha". "Alpha" being the sound class called I assume in the relevant unit's voice.

_groupLeader kbTell [player,"rejcs_radio","rejcs_radio_1",["Radcall",{},_"Move to point alpha!",["Alpha"]]]

Edited by Rejenorst

Share this post


Link to post
Share on other sites

Ok! I'm sorry. i'm not sure if i understand your guestion correctly. If i use KBtell with arma 3 default sounds, i look sounds from "RadioProtocolENG " and create class for it.

		class Airplane
{
	text = ;
	speech[] = {veh_air_plane_p};
	class Arguments {};
};

player kbTell [player ,"All_sounds","Airplane","SIDE"]};

Edit. So you are looking way to use kbtell with arma default sounds, without creating class. So my post dont help you :)

Edited by MikkoL

Share this post


Link to post
Share on other sites

I think your right. I was just looking at this:

https://community.bistudio.com/wiki/Arma_3_Radio_Protocol

I did make a class but you can specify what you want it to say by using arguments so in my above example the class "Radcall" is whatever code you specify in the kbtell.

I will try and test some of those sounds in the above link.

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  

×