Jump to content

Recommended Posts

Hi all

 

I am trying to make a pvp scenario in which opfor will need to take civilian AI Hostage during the mission, and part of blufors mission will be to free those hostages. 

 

I am very confused as to how to make this work as I have no experience with scripting. Any help is appreciated, 

 

Thanks

Share this post


Link to post
Share on other sites
33 minutes ago, EO said:

 

As far as I was aware none of these explained how to make players be able to turn civilian AI into hostages during the game as everything I found, the civilians start as hostages and are rescued

Share this post


Link to post
Share on other sites

@Arma Llama,

Here's a simple method for creating a group of hostages for the player to rescue,

Paste this into any one of the hostage group unit's init field,

hostage_grp=group this;
{
	_x allowDamage false;
	removeAllWeapons _x;
	removeHeadgear _x;
	_x unlinkItem "NVGoggles";
	removeAllItems _x;
	_x setcaptive true;
	_x disableAI "ALL";
	_x switchMove "Acts_AidlPsitMstpSsurWnonDnon04"; 
	_x setvariable ["you_isHOSTAGE", 1];
} forEach units hostage_grp;

and give player this action (init.sqf or init properties dialog),

rescueAction=[ player, "Rescue", 
"\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", 
"\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", 
"(player distance cursorTarget) <4 && (cursorTarget getvariable ""you_isHOSTAGE"") >0", "isNull objectParent player && alive cursorTarget", {}, {}, {
	cursorTarget enableAI "ALL";
	cursorTarget setcaptive false;
	cursorTarget switchMove ""; 
	[cursorTarget] join (group player);
	systemChat "Hostage Rescued";
	cursorTarget setVariable ["you_isHOSTAGE", 0];
}, {}, [], 2, 0, false, true] call BIS_fnc_holdActionAdd;

Have fun!
 

  • Like 2

Share this post


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

@Arma Llama,

Here's a simple method for creating a group of hostages for the player to rescue,
 

Hi, thanks for the help that was really kind. However, is there any way i can change this in order to allow the player to make the civ a hostage first (allowing a different side to rescue them)?

Thanks again

Share this post


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

Do you mean make AI prisoners?

Yes! That is what I mean, apologies for not being clearer.

Share this post


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

The easiest way is with ACE, but if you don't want to do that, maybe something like this?

 

https://forums.bohemia.net/forums/topic/221744-hvt-capture-and-hostage-rescue-scripts/

I have tried ACE before but found it a bit too much for friends and I with regards to having to apply tq's etc. It is a grand mod though.

Share this post


Link to post
Share on other sites

The link I gave is to another script besides ACE, is that something that will work?

Share this post


Link to post
Share on other sites
On 5/14/2020 at 8:10 PM, Rich_R said:

The link I gave is to another script besides ACE, is that something that will work?

 

I'll give it a go now, thanks

Share this post


Link to post
Share on other sites
On 5/14/2020 at 8:10 PM, Rich_R said:

The link I gave is to another script besides ACE, is that something that will work?

To make what is described in the link work, do I literally just need to put: 

//prepare HVT and hostage 

obj_hostage execvm "Hostage_setup.sqf"; 

obj_HVT execvm "Hvt_setup.sqf";

in the hostage units init box in the editor?

Thanks

Share this post


Link to post
Share on other sites

I am quite confused as to how I use the script, I have downloaded the dropbox file but am unsure what to do next

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

×