Jump to content
XMDM

Interactive Intel Items

Recommended Posts

Format creates strings, so there is no need to put quotes around it...

[this,"RscAttributeDiaryRecord",["Bomb Schematics",format ["To disarm the bomb, cut the %1 wire",disarm]]] call bis_fnc_setServerVariable;

what would be the best way to place that code into the init of a object spawned by script i have made a function that i want to loop after the intel file is found to spawn another one within an array of markers to be found again.

this is a PVP map so players will be moving around there FOBS trying to take out sectors. so the intel files need to update and be able to show where the Intel file is.

this is what i got but no mater what i try its not compilable with the setVehicleInit command would u know a work around?

FNC_Tracking_OPFOR_FOB = {
hint "BLUFOR have found a Intel File";

if (!alive OPFOR_Intel_File) then {

	"FOB_OPFOR_1" setMarkerPos (getPos FOB_OPFOR);
	_OPFOR_Intel_File = ["Intel_File1_F" createVehicle getMarkerPos "OPFOR_Intel_File1_Marker",["OPFOR_Intel_File1_Marker","OPFOR_Intel_File1_Marker"], 0, "NONE"];
	_OPFOR_Intel_File setVehicleInit ""
	data = [OPFOR_Intel_File,"RscAttributeDiaryRecord",[  "A letter to CSAT Gen(1).",
	"TO: General Atlia<br /><br />  From: LT. Kouse<br /><br />
	Subject: Operations in Zones 1 and 2<br /><br />
	General our situation here is dire we have the USA forces to our North East. We need more reinforcements here.<br />
	We are currently locked in engagements with the 2nd Marine Division on the North Eastern border.<br /> 
	The battles are getting worse by the day but we will hold out till the last man.<br />
	We have built a <font color='#84e4ff'><marker name = 'FOB_OPFOR_1'>FOB</marker></font color> it will serve as our Launch point into Zones 1 and 2.<br />
	As a precaution I have stationed a platoon to guard the outpost so we can buy time for reinforcements.<br /><br />
	CSAT Command<br /><br />
	LT.Kouse Sector 1 Commanding officer.  ",""]] call bis_fnc_setServerVariable;""
	while {alive FOB_OPFOR} do {

		"FOB_OPFOR_1" setMarkerPos (getPos FOB_OPFOR);
		OPFOR_Flag_trg setPos (getPos FOB_OPFOR);			

		if (!alive OPFOR_Flag_trg) then {
			OPFOR_Flag_trg = createTrigger["EmptyDetector", getPos "FOB_OPFOR_1"];
			OPFOR_Flag_trg setTriggerArea[50,50,0,false];
			OPFOR_Flag_trg setTriggerActivation["WEST","PRESENT",true];
			OPFOR_Flag_trg setTriggerStatements ["player in thisList", "'FOB_OPFOR_1' setMarkerPos getPos 'BLUFOR_Flag', hint 'OPFOR FOB Nearby'",""];
		};

		sleep 5;
	};
}
else {
	if {alive OPFOR_Intel_File} then {
		"FOB_OPFOR_1" setMarkerPos (getPos OPFOR_Base_Flag);
		deleteVehicle OPFOR_Flag_trg;
	};
};
};

Share this post


Link to post
Share on other sites

No point in setting the init of a spawned object IMHO, just apply what you need to it after it spawned.

So in your case, create the intel, save it to a local variable, then apply the code I showed earlier.

_intel = "Blah" createVehicle...

[_intel,"RscAttributeDiaryRecord",["Bomb Schematics",format ["To disarm the bomb, cut the %1 wire",disarm]]] call bis_fnc_setServerVariable;

Edited by JShock

Share this post


Link to post
Share on other sites

Just wondering how would I show an image under the text of the intel when it is picked up?

Share this post


Link to post
Share on other sites

Hi guys. ¿Do you think it is possible to create an intel iten and make it spawn on an specific soldier vest or uniform instead on the ground?

I am working on a mission where an enemy officer has to be captured and some secret docuemnts must be found on his uniform. I have created the "intel" document and it spawns on the ground and works good but I need it to be on the AI Officer uniform or vest instead than on the ground.

Any idea would be welcomed :cool:

  • Like 1

Share this post


Link to post
Share on other sites

Is there someway to change the size of the picture?

I was testing this, and it didnt work. Anyone got some ideas?

if (isServer) then {      this setVariable ["RscAttributeDiaryRecord_texture","JohnMartinez.jpg" width="512" height="512", true];
[this,"RscAttributeDiaryRecord",["Top Secret Docs","These Docs outline the enemies defenses",""]] call bis_fnc_setServerVariable;
this setVariable ["recipients", west, true];  }; 

Share this post


Link to post
Share on other sites
The object needs the variable "recipients" defined on it, the script uses this in a BIS_fnc_MP call to determine who to share the intel with.

UNTESTED something like....

objects init

if (isServer) then {
this setVariable ["RscAttributeDiaryRecord_texture","a3\structures_f_epc\Items\Documents\Data\document_secret_01_co.paa", true];
[this,"RscAttributeDiaryRecord",["Top Secret Docs","These Docs outline the enemies defenses",""]] call bis_fnc_setServerVariable;
this setVariable ["recipients", west, true];
[this,"init"] spawn bis_fnc_initIntelObject;
};

The above should share the info with all WEST players..

Hey man, nice work, would you know how to add your own picture to code instead of the default one? Maybe if to find (a3\structures_f_epc\Items\Documents\Data\document_secret_01_co.paa") and add custom made pictures to that folder?

Got it already

Edited by ringoray
Found how to do it

Share this post


Link to post
Share on other sites

Hi guys. This is very cool and handy for missions. I have tried working it in to my current mission, but for some reason the intel doesn't pick up my variable.

In the Intel's Init:

if (isServer) then {[this,"RscAttributeDiaryRecord",["Disarm code", Format ["Reminder: The code's %1.", txtcode]]] call bis_fnc_setServerVariable; this setVariable ["recipients", west, true]};

When it is picked up, it reads "Reminder: The code's any".

So instead of the variable's text string, it's just returning the word "any".

I use the variable - txtcode - in other parts of the mission and it works fine, reading back to players as a text string within a hint.

Any deas???

Edited by Vapour

Share this post


Link to post
Share on other sites
Hey man, nice work, would you know how to add your own picture to code instead of the default one? Maybe if to find (a3\structures_f_epc\Items\Documents\Data\document_secret_01_co.paa") and add custom made pictures to that folder?

Got it already

Check this code

[color="#FF0000"]if (isServer) then {      this setVariable ["RscAttributeDiaryRecord_texture",[/color][color="#008000"]"JohnMartinez.jpg"[/color][color="#FF0000"], true];[/color]
[color="#0000CD"][this,"RscAttributeDiaryRecord",["Top Secret Docs","These Docs outline the enemies defenses",""]] call bis_fnc_setServerVariable;
this setVariable ["recipients", west, true];  };[/color]

There "JohnMartinez.jpg" is your picture. If you have it in a folder its like this ,"foldername/yourpicture.jpg",

Share this post


Link to post
Share on other sites
Add your item like this on the unit.

soldierUnitName linkItem "Land_File2_F";

try using this information from this thread to detect when player takes the document and then do what you want.

http://forums.bistudio.com/showthread.php?189561-Trig-condition

Does anybody have a working template for this? How do I attach the information ( text and picture) to this specific intel file which is linked to an ai?

Edited by Loooci

Share this post


Link to post
Share on other sites
if (isServer) then {
   this setVariable ["RscAttributeDiaryRecord_texture","a3\structures_f_epc\Items\Documents\Data\document_secret_01_co.paa", true];
   [this,"RscAttributeDiaryRecord",["Top Secret Docs","<br /><execute expression= ""[(group player), 'my intel task', ['an intel task', 'secret docs', ''], [0,0,0], 'ASSIGNED', 0] call BIS_fnc_taskCreate"" >These Docs outline the enemies defenses</execute><br />",""]] call bis_fnc_setServerVariable;
   this setVariable ["recipients", west, true];
};

In the above, would anyone know exactly what I would replace to add the task using the taskmaster2 method?

["Newtask1","Task1Title","Task1Desc",true,["mrkTask1",getpos car]] call SHK_Taskmaster_Add

Did you get this figured out? I worked my way through the thread and re-worked the objective I'm adding using the Zeus Intel item. It adds a neat touch when you collect some docs. I'm tempted to try the Taskmaster2 as it tends to fall back on a more-scripted approach, which I'm used to. My task is simply to collect the docs, trigger an event, which was simple, have the intel posted for the side to read, all done, but then also trigger multiple further objectives and set the intel/docs objective succeeded. this was close enough: thread but I haven't got a setTaskState Module placed, as I read there I shouldn't need one. I have:

Docs/Zeus Intel <--> Set Task Destination Module

Set Task Destination Module <--> Create Task Module

Create Task Module <--> Synchronised for Side (I use a static and out-of-the-way vehicle and sync Diary records and Tasks to that, keeps the map editing area a bit clearer :)

I get a notification that the Task has been created, and an icon for the destination, I can assign it for the team, but when I take the docs, all I get is the 'Intel' notification, the task has not succeeded?

This is what I have in my Zeus Intel init:

data = [this,"RscAttributeDiaryRecord",
["Enemy Intelligence Map","",""]] 
call bis_fnc_setServerVariable; 
this addEventHandler ["ContainerClosed",if ("Intel_File1_F" in (weapons player)) then {_taskID = "1";
[[_taskID,"SUCCEEDED"],"BIS_fnc_taskSetState", side (_this select 1), false, false] call BIS_fnc_MP; 
(_this select 0) removeEventHandler ["ContainerClosed",0];}];

Should work no?

I'm guessing, but have you tried adding:

 call SHK_Taskmaster_upd;

here

if (isServer) then {
   this setVariable ["RscAttributeDiaryRecord_texture","a3\structures_f_epc\Items\Documents\Data\document_secret_01_co.paa", true];
   [this,"RscAttributeDiaryRecord",["Top Secret Docs","<br /><execute expression= ""[(group player), 'my intel task', ['an intel task', 'secret docs', ''], [0,0,0], 'ASSIGNED', 0] [color="#FF0000"]call BIS_fnc_taskCreate[/color]"" >These Docs outline the enemies defenses</execute><br />",""]] call bis_fnc_setServerVariable;
   this setVariable ["recipients", west, true];
};

with all else as written?

Share this post


Link to post
Share on other sites

Does THIS help? to early in the morning,browsing the forum because im having trouble sleeping, so just quickly browsed over your post but the linked post deals with intel object and completing and adding taskmaster tasks.

Share this post


Link to post
Share on other sites

Excellent post - thank you, I'm sure that it's going to help. I am in the same boat myself atm (in a hurry), and not able to re-check what I'm doing. But to get this right is uber-critical so I will have to get it clamped down understood before moving into some more complex areas of task editing, so I'll check back later when my objective is as it needs to be - cheers!

Share this post


Link to post
Share on other sites

I tried using some of the calls used in that thread, but they didn't help. Not surprising considering they were designed for use with SHK_ Maybe it will help Tay-UK? Since testing I've also noticed that this (first) objective is available in the pre-mission briefing, so I'm getting ahead of myself a bit, which I want, at this stage to avoid at all costs! I'm going to take a step backwards. I'm pleased I am able to add intel information to the object, and some of the very basic Create Task Module set-up is a lot clearer, but I don't want to run before I can crawl with this, so I'm going to look more closely at how to arrange for any pre-set Tasks to remain invisible for the pre-mission briefing...

Edited by Foxsch
amended typo

Share this post


Link to post
Share on other sites

Well I get it all working eventually!

Now on 2 counts in two different missions:-

A mission I have been working on since the first post is where I would like to 'collect' some intel, rather than take it, or 'find' it, unlike the first.

I thought I'd post this (very) simple solution to a scenario whereby approaching a unit (on the same side would make sense) and the intel hints and actions all take place without any 'action-scroll' by the player:

nul = execVM "intel.sqf";

../intel.sqf

nul = [this,"RscAttributeDiaryRecord",["High Command Orders","Congratulations on your promotion to High Commander! Press Ctrl and Space-Bar to access your Patrols and deploy them wisely",""]] 
   call bis_fnc_setServerVariable;
   this setVariable ["recipients", west, true];
nul = ["G1", "SUCCEEDED"] spawn BIS_fnc_taskSetState; 
hint "Orders Received";

I hope this helps somebody!

Share this post


Link to post
Share on other sites

Hi, Im using this to spawn intel.....

 

if (isServer) then {
this setVariable ["RscAttributeDiaryRecord_texture","a3\structures_f_epc\Items\Documents\Data\document_secret_01_co.paa", true];
[this,"RscAttributeDiaryRecord",["Top Secret Docs","These Docs outline the enemies defenses",""]] call bis_fnc_setServerVariable;
this setVariable ["recipients", west, true];
[this,"init"] spawn bis_fnc_initIntelObject;
};
 
 
 
Which works very well on items but when i use it on a civ or soldier they disappear after we take the intel.
Any way to make sure units don't de-spawn after we gather intel?
 
Also how do i path the intel photos to use a custom photo in a intel folder in the mission folder?
 
Thanks

Share this post


Link to post
Share on other sites

Sorry to bring up an old topic, but I'm learning the Arma 3 scripting and having some trouble.

 

I'm trying to do something pretty simple.  I want an OPFOR character to drop a piece of specific intel when he is killed.  So far I've been able to create the piece of Intel exactly how I want it.  I can have it spawn at his feet at the start of the mission, but I cannot figure out how to make it spawn when he is killed.

 

I have a sqf named "inteldrop.sqf" that contains:

Doc1 setPos (Hasib1 modelToWorld [1,-1,0]);

 

This is what drops the intel "Doc1" at the start.  Do I need to add a modifer to the init.sqf file to only run inteldrop.sqf when the character Hasib1 is !alive?  Any help is appreciated.

Share this post


Link to post
Share on other sites

You can skip the script.

 

Place down a trigger with a condition of:

!alive Hasib1

and the OnAct of:

Doc1 setPos (Hasib1 modelToWorld [1,-1,0]);

Or a onKilled eventHandler if you wanted to get fancy. Hasib1's init field:

this addEventHandler ["Killed", {Doc1 setPos ((_this select 0) modelToWorld [1,-1,0]);}]

Share this post


Link to post
Share on other sites

You are amazing!  All this time I was lead to believe a trigger couldn't do it.  Thanks!  I did try the EH in his init but it didn't seem to work, I probably did something wrong, but the trigger works so I'm good!  Thank you!

 

 

You can skip the script.

 

Place down a trigger with a condition of:

!alive Hasib1

and the OnAct of:

Doc1 setPos (Hasib1 modelToWorld [1,-1,0]);

Or a onKilled eventHandler if you wanted to get fancy. Hasib1's init field:

this addEventHandler ["Killed", {Doc1 setPos ((_this select 0) modelToWorld [1,-1,0]);}]
  • Like 2

Share this post


Link to post
Share on other sites

You could bury a execute command into the intel text like...

if (isServer) then {
this setVariable ["RscAttributeDiaryRecord_texture","a3\structures_f_epc\Items\Documents\Data\document_secret_01_co.paa", true];
[this,"RscAttributeDiaryRecord",["Top Secret Docs","<br /><execute expression=""[(group player), 'my intel task', ['an intel task', 'secret docs', ''], [0,0,0], 'ASSIGNED', 0] call BIS_fnc_taskCreate"">These Docs outline the enemies defenses</execute><br />",""]] call bis_fnc_setServerVariable;
this setVariable ["recipients", west, true];
[this,"init"] spawn bis_fnc_initIntelObject;
}; 

When some one clicks on the "These Docs outline the enemies defenses" inside of the intel his whole group will receive the task "secret docs".

 

 

Larrow, you keep impressing me over and over again! :worship:

Share this post


Link to post
Share on other sites

...to revive the topic :)

In the props > thing > intel section, there are 3 kind of objects (documents, photo, secret documents) that can be used to display desired text entry when picked up. I use this code in the init box of these objects:

[this,"RscAttributeDiaryRecord",["desired title",format ["desired text"]]] call bis_fnc_setServerVariable;

And it works fine.

If i want to pick up other kind of objects (for example laptop, cell phone, camera etc.) I use this code in the init box:

This addaction ["Collect Intel","collect.sqf"]; 

Combined with the collect.sqf file with this code:

Player SwitchMove "AinvPercMstpSrasWrflDnon_Putdown_A-movPercMstpSrasWrflDnon";
Sleep 0.5;
DeleteVehicle intel;

- the variable name of the object in this case is intel.

This also works fine.

The question is how do I combine those two things? For example, I want to pick up the laptop, but after picking it up, I want it to display an intel text entry.

Share this post


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

The question is how do I combine those two things? For example, I want to pick up the laptop, but after picking it up, I want it to display an intel text entry.

See my very first post in this thread as that is exactly what it does. You wont need your addAction and script as this is already handled for you by the intel script. Just paste the code into the init box of the laptop.

Share this post


Link to post
Share on other sites

Just to add coz I didnt see it written. 

 

To start a task once the intel is picked up add a trigger for create task and give your Intel a name. Then in the trigger condition add

 

!alive intelname

 

That then should trigger your task once Intel is picked up. 

 

This works well with the task modules and it should work with scriptted task but I have only used the modules

  • 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

×