Jump to content
jstibbsy

Hold Action Intel Pickup

Recommended Posts

I'm working on Mission 3 of my campaign and I'm trying to have an optional intel pickup from a laptop.
I can get the Hold action working but can't seem to get the intel working. Here's what I have:

_intel = _this select 0;
_this = _this select 1;
// Add Hold Action to Pick up intel
[
/* 0 object */				        _intel,
/* 1 action title */				"Gather Intel",
/* 2 idle icon */				"pics\intel.paa",
/* 3 progress icon */				"pics\intel.paa",
/* 4 condition to show */			"true",
/* 5 condition for action */			"true",
/* 6 code executed on start */			{},
/* 7 code executed per tick */			{},
/* 8 code executed on completion */      	{
	       //Intel picked up without deleteing the laptop
						},
/* 9 code executed on interruption */       {
					    },
/* 10 arguments */			    [],
/* 11 action duration */		    6,
/* 12 priority */			    1,
/* 13 remove on completion */		    true,
/* 14 show unconscious */		    false
] remoteExec ["bis_fnc_holdActionAdd"]; 

I removed the code I had in there as it just wouldn't work.
Thanks in advance

Share this post


Link to post
Share on other sites
	       //Intel picked up without deleteing the laptop

What do you mean by "intel picked up"? What exactly the completion script supposed to do?

Share this post


Link to post
Share on other sites

When the action is completed the intel is spawned in your briefing or intel tab (can't remember what it was called) but the laptop is not deleted.

Share this post


Link to post
Share on other sites

When the action is completed the intel is spawned in your briefing or intel tab (can't remember what it was called) but the laptop is not deleted.

 

A diary record would cause an entry to show up under the briefing section, but only for the player that "recovers" the intel. You could put this for the on completion code:

{(_this select 1) createDiaryRecord ["Diary", ["Title of Entry", "Details of entry here."]]}

I copied and pasted your code and put that in and it worked for me. There's lots of formatting options for createDiaryRecord as well. You can put images in even.

 

Hope this is what you're looking for!

Share this post


Link to post
Share on other sites

I tried that, hmm, still doesn't work, I put a hint saying hint "intel collect"; which works fine but that just doesn't show anything but a new briefing tab.
Here's what I have: 
 

_intel = _this select 0;
_unit = _this select 1;
// Add Hold Action to Pick up intel
[
/* 0 object */				        _intel,
/* 1 action title */				"Gather Intel",
/* 2 idle icon */				"pics\intel.paa",
/* 3 progress icon */				"pics\intel.paa",
/* 4 condition to show */			"true",
/* 5 condition for action */			"true",
/* 6 code executed on start */			{},
/* 7 code executed per tick */			{},
/* 8 code executed on completion */      	{	
hint "intel collected";
{(_this select 1) createDiaryRecord ["Diary", ["Title of Entry", "Details of entry here."]]}       
						},
/* 9 code executed on interruption */       {
					    },
/* 10 arguments */			    [],
/* 11 action duration */		    6,
/* 12 priority */			    1,
/* 13 remove on completion */		    true,
/* 14 show unconscious */		    false
] remoteExec ["bis_fnc_holdActionAdd"]; 

I will change the name and everything, but still doesn't work.

Share this post


Link to post
Share on other sites

Alright figured it out I think something was wrong with my code.
Now it all works thanks :)

  • Like 1

Share this post


Link to post
Share on other sites

Both your hostage and this function are not jip compatible if I am not missing anything. You should make sure the action also appears for JIP players.

  • Like 2

Share this post


Link to post
Share on other sites

Both your hostage and this function are not jip compatible if I am not missing anything. You should make sure the action also appears for JIP players.

Not too familiar with making functions JIP compatible, sadly. I mostly just make scripts for my missions so I haven't looked into it. Wouldn't know where to start, really. :/

Share this post


Link to post
Share on other sites

Not too familiar with making functions JIP compatible, sadly. I mostly just make scripts for my missions so I haven't looked into it. Wouldn't know where to start, really. :/

...remoteExec ["BIS_fnc_holdActionAdd",[0,-2] select isDedicated,true];

That should do the trick. You can read more about it here https://community.bistudio.com/wiki/remoteExec

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

×