Jump to content
XMDM

Interactive Intel Items

Recommended Posts

awesome, thx.

is there a way to replacethe message "take intel" with something else like "download intel", "pick up laptop" etc?

Share this post


Link to post
Share on other sites
3 hours ago, Sheflja said:

is there a way to replacethe message "take intel" with something else like "download intel", "pick up laptop" etc?

Only if you omit the call to BIS_fnc_initIntelObject, all it does is add the action for you.

You can then add your own action with your specific title which calls the "action" part of BIS_fnc_initIntelObject when used. e.g something like..

if (isServer) then {
	//Diary picture
	this setVariable ["RscAttributeDiaryRecord_texture","a3\structures_f_epc\Items\Documents\Data\document_secret_01_co.paa", true];
	//Diary heading and text
	[this,"RscAttributeDiaryRecord",["Top Secret Docs","These Docs outline the enemies defenses",""]] call BIS_fnc_setServerVariable;
	//Diary entry transmitted too when picked up.. follows BIS_fnc_MP rules
	this setVariable ["recipients", west, true];
	//Sides that can interact with intelObject
	this setVariable ["RscAttributeOwners", [west], true];
};
if ( hasInterface ) then {
	this addAction [
		"Pick up laptop", //<-- YOUR TITLE
		{[_this,"action"] spawn BIS_fnc_initIntelObject;},
		[],
		10,
		true,
		true,
		"",
		"isplayer _this && {_this distance _target < 2} && {(side group _this) in (_target getvariable ['RscAttributeOwners',[west,east,resistance,civilian]])}"
	];
};

 

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

@Larrow

 

Shouldn't RscAttributeOwner be an array?

	this setVariable ["RscAttributeOwners", west, true];

 

 

Because the condition expects one ?

 

{(side group _this) in (_target getvariable ['RscAttributeOwners',[west,east,resistance,civilian]])

 

 

Using your example causes an error with. Setting the variable to [west] instead of west, it works fine.

Share this post


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

Shouldn't RscAttributeOwner be an array?

Yep, fixed post.

  • Like 1
  • Thanks 1

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

×