Jump to content
Sign in to follow this  
Sexacutioner

Alternative for Setcaptive

Recommended Posts

So I've been trying to make a mission in which you originally start out as captive and then have to fight your way out of the enemy base. There are some major issues I've ran into with setCatpive and was wondering if there was a better way to go about this. Here is what I am running into:

If the mission starts with the player setCaptive true, then after it is changed to false most enemies still do not fire at the player. I was able to work around most of these issues with the following:

{
_currentPlayer=_x;
_currentPlayer setCaptive false;
{if (side _x==west) then {_x reveal _currentPlayer;};} forEach allGroups;
}	forEach arrayForPlayers;

That pretty much calls a "reveal" for every unit on the map of the players location and causes them to open fire again. However...

Any unit set to "Safe" still will not fire even after I call reveal on them. Even after using reveal the enemy fires a lot less. If I disable the initial setCaptive call there is tons of fire coming from all directions in the mission, however after turning setCaptive off and calling reveal you have to get right up on an enemy for them to do anything.

So is there a better way to do this. I'd like to have the player "captured" then have a gun snuck to them and make them "uncaptured" at that point.

---------- Post added at 13:10 ---------- Previous post was at 12:08 ----------

After messing around a bit I came up with this method that works a little better (although requires more hands on for each unit);

To set "captive"

{
_x disableAI "MOVE";
_x disableAI "TARGET";
_x disableAI "AUTOTARGET";
} forEach allUnits;

To remove "captive"

{
_x enableAI "MOVE";
_x enableAI "TARGET";
_x enableAI "AUTOTARGET";
} forEach allUnits;

Edited by Sexacutioner

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  

×