Jump to content
Sign in to follow this  
pd3

AI join leader script (rescue/pow/recruit) w/special criteria

Recommended Posts

I'm preparing to create a mission with multiple objectives including a recruit/rescue portion, and I was simply going to port over a pow rescue script that I originally used in an A2 mission I had previously created however it no longer works.

I have looked, however to no avail to find a set of scripts which will meet some of the criteria necessary to work with the mission I'm creating.

Some of the criteria I would like to meet for using a given script include

- Remove recruit/rescue addaction on creation (surprisingly none of the methods I've encountered I've found do this)
- Script activated enableai "move" command from any location in the mission area for the subject once they are recruited (subject has a random chance to spawn in multiple locations)
- AI must behave no differently than another squad member once inducted, also targetable by opfor ai

This aspect of the mission entails investigating various suspected locations of the individual requiring rescue, with each location having its marker removed upon investigation (this part already works).

I'm going to keep fiddling around and try to make it work, but if anyone has any tips or insight, I'd be appreciative of the help.

 

Share this post


Link to post
Share on other sites

I've done this in my guerilla/rambo/hostage rescue/MGS3 Tanoa mission, which is unfortunately so complex it runs like shit so I keep it to myself. :huh2:

This is the script that I wrote, but it has a lot of unnecessary stuff like the hidden markers (as you can get intel that reveals the captives) but the addaction should work fine with some tweaks:

waitUntil {time > 0.1};

_unit = _this select 0;
_prob = _this select 1;

if ((random 1) > _prob ) exitWith {deleteVehicle _unit};

_anims = ["Acts_AidlPsitMstpSsurWnonDnon01", "Acts_AidlPsitMstpSsurWnonDnon02", "Acts_AidlPsitMstpSsurWnonDnon03", "Acts_AidlPsitMstpSsurWnonDnon04", "Acts_AidlPsitMstpSsurWnonDnon05"];

_marker = createMarker [str (_unit), getPos _unit];
_marker setMarkerType "hd_warning";
if (side _unit == WEST) then {_marker setMarkerColor "ColorWEST";} else {_marker setMarkerColor "ColorCivilian";};
_marker setMarkerText "Captive";
_marker setMarkerAlpha 0;

_unit setCaptive true;

_unit addAction ["Release", {removeAllActions (_this select 0); (_this select 0) playmove "Acts_AidlPsitMstpSsurWnonDnon_out"; sleep 5; (_this select 0) enableAI "MOVE"; [(_this select 0)] join player; (_this select 0) setCaptive false; captiveArray = captiveArray - [str (_this select 0)]; captivesFreed = captivesFreed + 1; deleteMarker (str (_this select 0));}, nil, 6, true, true, "", "alive _target", 3];

_unit disableAI "MOVE";

_number = floor random count _anims;
_anim = _anims select _number;
_unit switchmove _anim;

captiveArray = captiveArray + [_marker];

 

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  

×