Search the Community
Showing results for tags 'setcaptive'.
Found 4 results
-
Covert VIP ambush - SetCaptive issue
darkdespair55 posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hello All, So I am trying to make a CIA style mission based around one of the redone buildings on Cam Lao Nam (Multiplayer, self or server hosted). The players will start off as unarmed Blufor operatives in civis and take a ride on Air America. I know I need to use the setCaptive command but I am having issues with the event handler to remove this status. I am using eden editor and not putting extra script files in, just doing it all via the character init boxes. I found some of the below code on an older post but cant get it to work right. In this case SL1 is the squad leader and I'm trying this all just on one before copying it over. The goal is that when the player equips a weapon from the virtual arsenal box I have hidden in a van near the objective they lose the setCaptive state. Any help debugging whats below would be appreciated. *INIT BOX (Of the player)* removeAllWeapons SL1; //remove the weapons and items from default characters inventory removeAllItems SL1; removeAllAssignedItems SL1; SL1 setCaptive true; //set initial captive state this addEventHandler ["Take", { _unit = _this select 0; //at one point it would error out if I had this set at 0 but it seems to be accepting it now. *EDIT/Updated* _item = _this select 2; if ((_item isKindOf ["Rifle", configFile >> "CfgWeapons"]) || (_item isKindOf ["Pistol", configFile >> "CfgWeapons"]) || (_item isKindOf ["Launcher", configFile >> "CfgWeapons"])) then { _unit setCaptive false; //this is what was in the example [_unit, false] remoteExec["setCaptive"]; //tried adding server remote call and it didnt change anything. hint "You picked up a weapon enemies will now be hostile!"; }; }]; myfancygroup = group this; //This is for a helicopter to know the whole spawned group is onboard before taking off- 5 replies
-
- eden
- setcaptive
-
(and 1 more)
Tagged with:
-
Scenario "Convoy Attack" AI behaviour.
T Joel posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hi Arma team, New to scripting and I have a question or more. Background story: Single-player mission. BLUFOR(player) is a militia opposing an OPFOR militia. BLUFOR needs arms. We're actually attacking a powerful ally and blaming it on our enemy to get supplies and support. NOTE: For the simplicity of the mission the convoy is OPFOR! Convoy consists of 1 APC in the front, 2 trucks then an APC at the rear. The outcome should be: When the lead APC(variable: lead_convoy) hits the AT mine the (player) group engages the rear APC with an RPG and engages the dismounted crew when (all) the fighting is over gets into one of the trucks, and profits. The drivers of the ammo trucks should surrender and survive so the attack is blamed on a rival militia, crafty huh? Here's the part that's troublesome: There should be a group of BLUFOR AI that hits the front APC as they dismount after the AT mines detonate, then kills the crew of the lead APC and then gets in one of the trucks to profit. I have this in a trigger once the lead convoy vehicle hits the mine: ``` Condition: !alive convoy; { // Change state of the AI units from hiding (this works ok) _x commandWatch objNull; _x enableAI "AUTOTARGET"; _x enableAI "TARGET"; _x enableAI "SUPPRESSION"; _x enableAI "AUTOCOMBAT"; _x enableAI "MOVE"; } foreach (units ambush_1); // stops the trucks from rushing off (this works ok) {_x disableAI "MOVE"} forEach (units (group driver ammo_truck_1)); {_x disableAI "MOVE"} forEach (units (group driver ammo_truck_2)); // I want to change the vehicles to captive and the occupants ammo_truck_1D setcaptive TRUE; // Can you set a vehicle captive? ammo_truck_1D action ["EJECT", ammo_truck_1]; removeAllWeapons ammo_truck_1D; ammo_truck_2D setcaptive TRUE; ammo_truck_2 setcaptive TRUE; ammo_truck_2D action ["EJECT", ammo_truck_2]; removeAllWeapons ammo_truck_2D; ``` Behaviour: The AI ambush_1 activates, the truck drivers (ammo_truck_1D/2D) stop, get out and are captured. But the ambushers spend the time engaging the APC crew (waypoint activated) and rest mag-dumping into the empty ammo trucks often at point-blank range like absolute fuck faces. The ambushers do not get into the vehicle after the firefight is over from any waypoints. Playing from a squad member of the ambush_1 crew the ammo_trucks remain targets of the squad. I guess the question is how to make the trucks accessible to our AI? -
So basically trying to make a mission where team sneaks into the area and meets up with a local asset. The asset is simply there to deliver a local "civilian" truck for them to use to travel safely into city undercover. Basically what I was thinking was in the init of the vic, putting something like: "foreach unit set captive true;" however realized that probably wouldn't work because then they are liable to be set captive rest of mission. So basically looking for something that sets captive state true while units are in the vic but once they disembark the vic captive state switches back to false, with a like a two second buffer before the switch happens. Any help would be great as my search wasn't very fruitful.
- 4 replies
-
- setcaptive
- captive
-
(and 1 more)
Tagged with:
-
Hi, is there any way to trigger 'setCaptive true' only if certain conditions are met? Basically I want it to trigger it 'True' ONLY if the player is disguised as a CSAT helicopter pilot, wearing: I have been reading methods via this post but any further help would be welcome. Thanks!
- 8 replies
-
- setcaptive
- true
-
(and 1 more)
Tagged with: