Jump to content
Sign in to follow this  
mrsandbox

Bis_fnc_kbtell

Recommended Posts

So i found the entry on the Bis Biki, but still cant get the System to work. My problem is that i dont know how and where i have to define the "container" in the desciption.ext or Cfg Sentences File.

 

/*

	Description:
	Plays conversation. Script terminates itself when conversation is finished.

	Parameter(s):
	_this select 0: STRING - Topic name
	_this select 1 (Optional): STRING - container name (default: current mission ID)
	_this select 2 (Optional): ARRAY - section to be played. Elements can be:
		* STRING - "variant" - play specific variant
		* ARRAY
			* [startingSentence,(endingSentence)] - play al sentences between specific start and end
				startingSentence can be in format:
					* STRING - full sentence name (example: 04_intro_team_PLA_0")
					* ARRAY - [<actorID>(,<sentenceID>)] (example: ["PLA",0] or just ["PLA_0"])
					* BOOL - true to play random sentence, false to play first sentence
					* default - first sentence
				endingSentence can be in format:
					* STRING - full sentence name (example: 04_intro_team_PLA_0")
					* ARRAY - [<actorID>(,<sentenceID>)] (example: ["PLA",0] or just ["PLA_0"])
					* BOOL - true to play only one sentence, false if continue to last sentence
					* default - last sentence
		* (default: play everything)
	_this select 3 (Optional): BOOL or STRING or OBJECT or CODE - true to force radio, name of custom radio channel, listener's channel, returned value of code
	_this select 4 (Optional): CODE - code executed at the start of every sentence (arguments are same as in kbAddTopic event handler) (default: {})
				   ARRAY - code with arguments in format [code,arguments]
	_this select 5 (Optional):
		ARRAY - replacement units for those defined in .bikb file (in chronological order)
		BOOL - when true, dummy logics will be created for all actor units which doesn't exist (default: false or value of 'bis_fnc_kbTell_createDummy' variable)
	_this select 6 (Optional): NUMBER - music and sound volumes will be multiplied by this value when conversation starts (default: 0.1)
	_this select 7 (Optional): BOOL - true to disable radio protocol message while the conversation is playing (default: true)

	Returns:
	NOTHING
*/
//Todo: priority kbTell stppoing current conversation, split into several functions (config loading)

 

How and where do i have to define the Sentences, other then the .bikb file? Maybe someone can post an easy working example or has an idea. Thanks in advance!

Share this post


Link to post
Share on other sites

On top of the bikb file, you also need CfgSentences. This goes in the description.ext but because it can be very long I would recommend creating a file called cfgSentences.hpp and then in the description.ext writing

#include "cfgSentences.hpp"


The actual content is very similar to the bikb so it mostly involves copy and pasting stuff.

There's the stuff for an example attached

To use it, open the editor and place two units (with radios), name one actor_1 and the other actor_2

Copy and paste the attached files into it

Then in the debug console write

_sentence=["00_messiah","Mission1"] spawn Bis_fnc_kbTell;}

and click Execute

 

*I should mention I haven't tested this or used ARMA for a while, but this should be fine.

https://www.mediafire.com/?1eqj8br71541yhg

  • Like 1

Share this post


Link to post
Share on other sites

Thanks very much, Jonas. This is allready helping!

Still having a damn hard time adjusting the parameters of the function since there are so many. 

But i want to use that function because you can choose the channels by yourself  and disable the radio protocol automaticly.

Share this post


Link to post
Share on other sites

I'll be honest, most of the parameters aren't really necessary. Some of the are bit odd though in the sense that they can do massively different things which makes it look really complicated.

 

  • The most important one (IMO) (in addition to what's above) is probably the third one (_this select 2) which allows you to play a bit of a conversation, to use the example above. 
_sentence=["00_messiah","Mission1",[SENTENCE_1,SENTENCE_1]] spawn Bis_fnc_kbTell;}

Will only play sentence 1

 

  • Next one sounds like the one you're interested in, I vaguely recall using it in conjunction with https://community.bistudio.com/wiki/radioChannelCreate for a custom radio channel. Might have to experiment with that one yourself. I don't know much about it.
  • Honestly never used the code one, but sounds like if you just put something like {variable1=variable1+1} would just run each time 
  • Replacement units, helpful when you want a unit to say something, but you don't know what it will be. E.g. if you want the player's group leader to give a command but the original group leader might be dead you can define a replacement so it will still work.
  • Volume multiplier is self-explanatory but you shouldn't need to bother with it
  • Disable radio protocol, think it should be left as true, since it defaults to true I wouldn't bother it again.

As a fictional example of what a fully fleshed out command could look like

_sentence=["00_messiah","Mission1",[SENTENCE_1,SENTENCE_1],"CUSTOM_RADIO_1",{variable1=variable1+1},[Unit1,unit2....unitN],1,true] spawn Bis_fnc_kbTell;}

Share this post


Link to post
Share on other sites

Nice...Got everything working what i need. Thank you, very helpfull !

Share this post


Link to post
Share on other sites

Hi, I'm not english but I understand almost all whats was said previously.

 

I'm looking for a kbtell command to make a group hear the sentence in MP :

 

Exemple :

 

Leader_group KbTell [GROUP_1 ,"introduction","Intro_1"];

 

leader say intro_1 and all the group_1 hear it

 

have you any idea ? Thanks

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  

×