Jump to content
Sign in to follow this  
=WKV= Blackwatch

Evac by smoke not working help needed please

Recommended Posts

Im using the following script to call in a heli evac. However when I throw the smoke the chopper either flies off in a random direction or lands miles away

//////////////////////////////////////////////////////////////////
// Function file for Armed Assault
// Created by: TODO: Author Name
//////////////////////////////////////////////////////////////////

//this addEventHandler ["fired",{_this execvm "detect_smoke.sqf"}]

_shooter = _this Select 0; 
_ammotype = _this Select 4;

//hint format["%1",_ammotype];

sleep 2;
switch (_ammotype) do
{

   case "SmokeShellGreen":
   {
      Hint "Smoke Detected, evac inbound";
_wp0 = group chopper addWaypoint [ getpos player, 1];	
_wp0 setWaypointType "move";
_wp0 setWaypointStatements ["true", "chopper land 'land'"];

waituntil {{_x in chopper}count units blue  == {alive _x} count units  blue};


_wp1 = group chopper addWaypoint [getpos base, 50];
_wp1 setWaypointType "MOVE";

_wp2 = group chopper addWaypoint [getpos base, 50];
_wp2 setWaypointType "TR UNLOAD";
_wp2 setWaypointStatements ["true", "chopper land 'land';chopper setdamage 1"];

  };

     case "1Rnd_SmokeGreen_Grenade_shell":
   {
      Hint "Smoke Detected, evac inbound";
   };

       case "FlareGreen_F":
   {
      Hint "Smoke Detected, evac inbound";
   };

      case "3Rnd_SmokeGreen_Grenade_shell":
   {
      Hint "Smoke Detected, evac inbound";
   };

       case "UGL_FlareGreen_F":
   {
      Hint "Smoke Detected, evac inbound";
   };

     case "3Rnd_UGL_FlareGreen_F":
   {
      Hint "Smoke Detected, evac inbound";
   };

};

Could a guru look at it please as it has driven me nuts for the last 3 days

Share this post


Link to post
Share on other sites
//////////////////////////////////////////////////////////////////
// Function file for Armed Assault
// Created by: TODO: Author Name
//////////////////////////////////////////////////////////////////

//this addEventHandler ["fired",{_this execvm "detect_smoke.sqf"}]

_shooter = _this Select 0; 
_ammotype = _this Select 4;

//hint format["%1",_ammotype];

sleep 2;
switch (_ammotype) do {
   case "SmokeShellGreen":{
       Hint "Smoke Detected, evac inbound";
  };
   case "1Rnd_SmokeGreen_Grenade_shell": {
	Hint "Smoke Detected, evac inbound";
   };
   case "FlareGreen_F":{
      Hint "Smoke Detected, evac inbound";
   };
   case "3Rnd_SmokeGreen_Grenade_shell":{
      Hint "Smoke Detected, evac inbound";
   };
   case "UGL_FlareGreen_F":{
      Hint "Smoke Detected, evac inbound";
   };
   case "3Rnd_UGL_FlareGreen_F":{
      Hint "Smoke Detected, evac inbound";
   }; 
};

_wp0 = group chopper addWaypoint [ getpos player, 0];	
_wp0 setWaypointType "move";
_wp0 setWaypointStatements ["true", "chopper land 'GET IN'"];

waituntil {{_x in chopper} count (units blue)  == {alive _x} count (units  blue)};

_wp1 = group chopper addWaypoint [getpos base, 0];
_wp1 setWaypointType "TR UNLOAD";
_wp1 setWaypointStatements ["true", "{deleteVehicle _x} forEach (crew vehicle _this) + [vehicle _this]"];

Share this post


Link to post
Share on other sites

Could it be because I am using two hidden heli pads for the chopper insertion that is somehow throwing it? No matter what i do the evac chopper just flies off and doesnt come near the green smoke :(

Edited by =WKV= Blackwatch

Share this post


Link to post
Share on other sites

This should work for you. The helicopter is named extractHeli.

//////////////////////////////////////////////////////////////////
// Function file for Armed Assault
// Created by: TODO: Author Name
// this addEventHandler ["fired",{_this execvm "detect_smoke.sqf"}]
//////////////////////////////////////////////////////////////////

_shooter = _this Select 0; 
_ammotype = _this Select 4;

//hint format["%1",_ammotype];

switch (_ammotype) do {
   case "SmokeShellGreen":{
	Hint "Smoke Detected, evac inbound";
};
   case "1Rnd_SmokeGreen_Grenade_shell": {
	Hint "Smoke Detected, evac inbound";
   };
   case "FlareGreen_F":{
	Hint "Smoke Detected, evac inbound";
   };
   case "3Rnd_SmokeGreen_Grenade_shell":{
	Hint "Smoke Detected, evac inbound";
   };
   case "UGL_FlareGreen_F":{
	Hint "Smoke Detected, evac inbound";
   };
   case "3Rnd_UGL_FlareGreen_F":{
	Hint "Smoke Detected, evac inbound";
   }; 
};

_heliPad = "Land_HelipadEmpty_F" createVehicle (getPos Player);

_wp0 = chopper addWaypoint [getPos player, 0];	
_wp0 setWaypointType "MOVE";
_wp0 setWaypointStatements ["true", "(vehicle this) land 'GET IN'"];

waituntil {{_x in extractHeli} count (units blue) == {alive _x} count (units  blue)};

_wp1 = chopper addWaypoint [getPos base, 0];	
_wp1 setWaypointType "TR UNLOAD";
_wp1 setWaypointStatements ["true", "(vehicle this) land 'GET OUT'"];

deleteVehicle _helipad;

waituntil {{_x in extractHeli} count (units blue) == 0};

_wp2 = chopper addWaypoint [getpos base, 2000];
_wp2 setWaypointType "MOVE";
_wp2 setWaypointStatements ["true", "{deleteVehicle _x} forEach (crew vehicle this) + [vehicle this]"];

Edited by cobra4v320

Share this post


Link to post
Share on other sites

atill no joy unfortunately... I might have to give up on this evac script and just throw some boats in instead as it is pi****ng me right off to be honest.

How you guys throw out so many good missions is beyond me

Share this post


Link to post
Share on other sites

Okay here is an example mission with a completely different script.

http://www.mediafire.com/download/m5ywnwo45mn1x5k/extraction_example.Stratis.pbo

Throw smoke (you must be within 50 meters of the extract marker), an invisible helipad is created where the smoke lands, spawns in a helicopter based on the players side. The helicopter lands and waits until the group is on board, flys to the base helipad, waits for them to disembark, then flys off back to its start position where everything gets cleaned up and deleted.

You need a trigger axis a and b can be zero.

condition: ((count ((markerpos "extractMrk") nearObjects ["Smokeshell", 50])) > 0)
activation: _null = [] execVM "extraction.sqf"

Here is the script:

/*
File: extraction.sqf
Author: cobra4v320
*/
if (!isServer || isDedicated) exitWith {};

hint "Smoke detected, extraction helicopter inbound";

_side = side player;

private ["_startPos","_endPos","_direction"];
_startPos = MarkerPos "heliSpawnMrk";
_endPos = MarkerPos "extractMrk";
_direction = [_startPos, _endPos ] call BIS_fnc_dirTo;

private ["_helisv","_heli","_heliGroup","_dir"];
switch (_side) do {
case blufor:{
	_helisv = [_startPos, _direction, "B_Heli_Light_01_F", blufor] call BIS_fnc_spawnVehicle;
	_heli = _helisv select 0;
	_heliGroup = _helisv select 2;

	_dir = direction _heli;
	_heli setVelocity [sin(_dir)*60,cos(_dir)*60,0];
	{_x disableAI "AUTOTARGET"; _x disableAI "TARGET"; _x allowFleeing 0} forEach (units _heliGroup);
};
case opfor:{
	_helisv = [_startPos, _direction, "O_Heli_Light_02_unarmed_F", opfor] call BIS_fnc_spawnVehicle;
	_heli = _helisv select 0;
	_heliGroup = _helisv select 2;

	_dir = direction _heli;
	_heli setVelocity [sin(_dir)*60,cos(_dir)*60,0];
	{_x disableAI "AUTOTARGET"; _x disableAI "TARGET"; _x allowFleeing 0} forEach (units _heliGroup);
};
case independent:{
	_helisv = [_startPos, _direction, "I_Heli_Transport_02_F", independent] call BIS_fnc_spawnVehicle;
	_heli = _helisv select 0;
	_heliGroup = _helisv select 2;

	_dir = direction _heli;
	_heli setVelocity [sin(_dir)*60,cos(_dir)*60,0];
	{_x disableAI "AUTOTARGET"; _x disableAI "TARGET"; _x allowFleeing 0} forEach (units _heliGroup);
};
};

_heli spawn {
while { alive _this } do { 
	player action ["collisionlightOff", _this]; //turn off lights
	sleep 0.01;
};
};

private ["_radius","_smokeArray","_qty","_smoke","_smokePos"];
_radius = 1500;
_smokearray = _endPos nearObjects ["SmokeShell",_radius];
_qty = count _smokearray;

if (_qty > 0) then {_smoke = _smokearray select 0; _smokePos = position _smoke};

sleep 2;

_heliPad = "Land_HelipadEmpty_F" createVehicle _smokePos;

_wp0 = _heliGroup addWaypoint [position _heliPad, 0];
_wp0 setWaypointType "MOVE";
_wp0 setWaypointStatements ["true", "(vehicle this) land 'GET IN'"];

waituntil {{_x in _heli} count (units group player) == {alive _x} count (units group player)};

_wp1 = _heliGroup addWaypoint [getPos base, 0];	
_wp1 setWaypointType "TR UNLOAD";
_wp1 setWaypointStatements ["true", "(vehicle this) land 'GET OUT'"];

waituntil {{_x in _heli} count (units group player) == 0};

_wp2 = _heliGroup addWaypoint [_startPos, 0];
_wp2 setWaypointType "MOVE";
_wp2 setWaypointStatements ["true", "{deleteVehicle _x} forEach (crew vehicle this) + [vehicle this]"];

deleteVehicle _helipad;
deleteMarker "heliSpawnMrk";
deleteMarker "extractMrk";

Edited by cobra4v320

Share this post


Link to post
Share on other sites

That looks just the job thank you, How would I changer the chopper to a Ghost hawk as there will be upto 10 players in 2 teams ( team one upto 6 and team two upto 4 ) at the end if I can get the hostage part working?

Share this post


Link to post
Share on other sites

Amazing thank you bud....a massive help :) it works perfect thank you. now to work out the trigger to get the hostages to get in the chopper and im good to go.

Share this post


Link to post
Share on other sites

Hi,

Thanks for sharing ;)

i was looking for the same .......So the heli is activated by "smoke" .What should i change in the script to activate it only by a simple radius area in a trigger (let say 50 )

In advance thanks .....

Share this post


Link to post
Share on other sites

This should work and it can be called from a trigger using blufor present or whatever your condition is.

/*
File: extraction.sqf
Author: cobra4v320
*/
if (!isServer || isDedicated) exitWith {};

hint "Extraction helicopter inbound";

_side = side player;

private ["_startPos","_endPos","_direction"];
_startPos = MarkerPos "heliSpawnMrk";
_endPos = MarkerPos "extractMrk";
_direction = [_startPos, _endPos ] call BIS_fnc_dirTo;

private ["_helisv","_heli","_heliGroup","_dir"];
switch (_side) do {
case blufor:{
	_helisv = [_startPos, _direction, "B_Heli_Light_01_F", blufor] call BIS_fnc_spawnVehicle;
	_heli = _helisv select 0;
	_heliGroup = _helisv select 2;

	_dir = direction _heli;
	_heli setVelocity [sin(_dir)*60,cos(_dir)*60,0];
	{_x disableAI "AUTOTARGET"; _x disableAI "TARGET"; _x allowFleeing 0} forEach (units _heliGroup);
};
case opfor:{
	_helisv = [_startPos, _direction, "O_Heli_Light_02_unarmed_F", opfor] call BIS_fnc_spawnVehicle;
	_heli = _helisv select 0;
	_heliGroup = _helisv select 2;

	_dir = direction _heli;
	_heli setVelocity [sin(_dir)*60,cos(_dir)*60,0];
	{_x disableAI "AUTOTARGET"; _x disableAI "TARGET"; _x allowFleeing 0} forEach (units _heliGroup);
};
case independent:{
	_helisv = [_startPos, _direction, "I_Heli_Transport_02_F", independent] call BIS_fnc_spawnVehicle;
	_heli = _helisv select 0;
	_heliGroup = _helisv select 2;

	_dir = direction _heli;
	_heli setVelocity [sin(_dir)*60,cos(_dir)*60,0];
	{_x disableAI "AUTOTARGET"; _x disableAI "TARGET"; _x allowFleeing 0} forEach (units _heliGroup);
};
};

_heli spawn {
while { alive _this } do { 
	player action ["collisionlightOff", _this]; //turn off lights
	sleep 0.01;
};
};

_wp0 = _heliGroup addWaypoint [position player, 0];
_wp0 setWaypointType "MOVE";
_wp0 setWaypointStatements ["true", "(vehicle this) land 'GET IN'"];

waituntil {{_x in _heli} count (units group player) == {alive _x} count (units group player)};

_wp1 = _heliGroup addWaypoint [getPos base, 0];	
_wp1 setWaypointType "TR UNLOAD";
_wp1 setWaypointStatements ["true", "(vehicle this) land 'GET OUT'"];

waituntil {{_x in _heli} count (units group player) == 0};

_wp2 = _heliGroup addWaypoint [_startPos, 0];
_wp2 setWaypointType "MOVE";
_wp2 setWaypointStatements ["true", "{deleteVehicle _x} forEach (crew vehicle this) + [vehicle this]"];

deleteMarker "heliSpawnMrk";
deleteMarker "extractMrk";

---------- Post added at 17:47 ---------- Previous post was at 17:47 ----------

I also have a version where the helicopter doors automatically open and close if anyone is interested.

Edited by cobra4v320

Share this post


Link to post
Share on other sites

I have modified cobra4v320's extraction script to make support heli:

- Heli comes when player trhow green smoke.

- Heli lands and wait until player is with 50 meters radius.

- Heli pick ups to base when player is +50 meters radius from heli.

- The player can call the chopper all times needed.

All works well except that the heli don't wait and I can't undersand why.:confused:

I have make a triger in editor with

1.- Condition:

((count ((getPos player) nearObjects ["Smokeshellgreen", 50])) > 0)

This checks if player is within 50m of throwed smokeshell. I don't know if the shells in the bags of player counts too.

2.- Activation:

_marker = createMarker ["heliSpawnMrk", [15309.7, 17394] ];
    "heliSpawnMrk" setMarkerText "Support HQ";
    "heliSpawnMrk" setMarkerType "Empty";
    "heliSpawnMrk" setMarkerColor "ColorBlue";
_marker = createMarker ["extractMrk", position player ];
    "extractMrk" setMarkerText "Support LZ";
    "extractMrk" setMarkerType "hd_Pickup";
    "extractMrk" setMarkerColor "ColorBlue";
    "extractMrk" setMarkerPos getpos player;
_null = [] execVM "support.sqf";

This will spawn two markers, one for chopper spawn and the other for chopper landing, needed in the script, and exec support.sqf. This way the markers only exists when condition is true, and the landing marker is maked on the player position.

support.sqf

if (!isServer || isDedicated) exitWith {};

hint "Smoke detected, extraction helicopter inbound";

_side = side player;

private ["_startPos","_endPos","_direction"];
_startPos = MarkerPos "heliSpawnMrk";
_endPos = MarkerPos "extractMrk";
_direction = [_startPos, _endPos ] call BIS_fnc_dirTo;

private ["_helisv","_heli","_heliGroup","_dir"];		
_helisv = [_startPos, _direction, "B_Heli_Transport_01_camo_F", blufor] call BIS_fnc_spawnVehicle;
_heli = _helisv select 0;
 		clearMagazineCargo _heli;
	clearWeaponCargo _heli;
	clearItemCargo _heli;
	clearBackpackCargo _heli;
	_heli addItemCargo ["FirstAidKit",10];
	_heli addItemCargo ["Medikit",2];
	_heli addItemCargo ["ToolKit",2];
	_heli addWeaponCargo ["Rangefinder",3];
	_heli addMagazineCargo ["Titan_AT", 12];
	_heli addMagazineCargo ["20Rnd_762x51_Mag", 12];
	_heli addBackpackCargo ["B_Mortar_01_weapon_F", 1];
	_heli addBackpackCargo ["B_Mortar_01_support_F", 1];
	_heli addBackpackCargo ["B_UAV_01_backpack_F", 2];
	_heli addBackpackCargo ["B_GMG_01_A_weapon_F", 1];
	_heli addBackpackCargo ["B_HMG_01_support_F", 1];
	_heli addAction["<t color='#ff1111'>Virtual Ammobox</t>", "VAS\open.sqf"];
_heliGroup = _helisv select 2;

_dir = direction _heli;
_heli setVelocity [sin(_dir)*60,cos(_dir)*60,0];
{_x disableAI "AUTOTARGET"; _x disableAI "TARGET"; _x allowFleeing 0} forEach (units _heliGroup);

_heli spawn {
while { alive _heli } do { 
	player action ["collisionlightOff", _this]; //turn of lights
	sleep 0.01;
};
};

private ["_radius","_smokeArray","_qty","_smoke","_smokePos"];
_radius = 1500;
_smokearray = _endPos nearObjects ["SmokeShell",_radius];
_qty = count _smokearray;

if (_qty > 0) then {_smoke = _smokearray select 0; _smokePos = position _smoke};

_heliPad = "Land_HelipadEmpty_F" createVehicle _smokePos;

_wp0 = _heliGroup addWaypoint [position _heliPad, 0];
_wp0 setWaypointType "MOVE";
_wp0 setWaypointStatements ["true", "(vehicle this) land 'LAND'"];

while { (count ((getPos player) nearObjects [_heli, 50])) > 0 } do {
    sleep 10;
};

_wp2 = _heliGroup addWaypoint [_startPos, 0];
_wp2 setWaypointType "MOVE";
_wp2 setWaypointStatements ["true", "{deleteVehicle _x} forEach (crew vehicle this) + [vehicle this]"];

deleteVehicle _helipad;
deleteMarker "heliSpawnMrk";
deleteMarker "extractMrk";

Thanks.

Share this post


Link to post
Share on other sites

HI,

Something not working for me.

I m using this script in extraction.sqf

/*
File: extraction.sqf
Author: cobra4v320
*/
if (!isServer || isDedicated) exitWith {};

hint "Extraction helicopter inbound";

_side = side player;

private ["_startPos","_endPos","_direction"];
_startPos = MarkerPos "heliSpawnMrk";
_endPos = MarkerPos "extractMrk";
_direction = [_startPos, _endPos ] call BIS_fnc_dirTo;

private ["_helisv","_heli","_heliGroup","_dir"];
switch (_side) do {
   case blufor:{
       _helisv = [_startPos, _direction, "B_Heli_Light_01_F", blufor] call BIS_fnc_spawnVehicle;
       _heli = _helisv select 0;
       _heliGroup = _helisv select 2;

       _dir = direction _heli;
       _heli setVelocity [sin(_dir)*60,cos(_dir)*60,0];
       {_x disableAI "AUTOTARGET"; _x disableAI "TARGET"; _x allowFleeing 0} forEach (units _heliGroup);
   };
   case opfor:{
       _helisv = [_startPos, _direction, "O_Heli_Light_02_unarmed_F", opfor] call BIS_fnc_spawnVehicle;
       _heli = _helisv select 0;
       _heliGroup = _helisv select 2;

       _dir = direction _heli;
       _heli setVelocity [sin(_dir)*60,cos(_dir)*60,0];
       {_x disableAI "AUTOTARGET"; _x disableAI "TARGET"; _x allowFleeing 0} forEach (units _heliGroup);
   };
   case independent:{
       _helisv = [_startPos, _direction, "I_Heli_Transport_02_F", independent] call BIS_fnc_spawnVehicle;
       _heli = _helisv select 0;
       _heliGroup = _helisv select 2;

       _dir = direction _heli;
       _heli setVelocity [sin(_dir)*60,cos(_dir)*60,0];
       {_x disableAI "AUTOTARGET"; _x disableAI "TARGET"; _x allowFleeing 0} forEach (units _heliGroup);
   };
};

_heli spawn {
   while { alive _this } do { 
       player action ["collisionlightOff", _this]; //turn off lights
       sleep 0.01;
   };
};

_wp0 = _heliGroup addWaypoint [position player, 0];
_wp0 setWaypointType "MOVE";
_wp0 setWaypointStatements ["true", "(vehicle this) land 'GET IN'"];

waituntil {{_x in _heli} count (units group player) == {alive _x} count (units group player)};

_wp1 = _heliGroup addWaypoint [getPos base, 0];    
_wp1 setWaypointType "TR UNLOAD";
_wp1 setWaypointStatements ["true", "(vehicle this) land 'GET OUT'"];

waituntil {{_x in _heli} count (units group player) == 0};

_wp2 = _heliGroup addWaypoint [_startPos, 0];
_wp2 setWaypointType "MOVE";
_wp2 setWaypointStatements ["true", "{deleteVehicle _x} forEach (crew vehicle this) + [vehicle this]"];

deleteMarker "heliSpawnMrk";
deleteMarker "extractMrk";

I put 2 markers on map named : heliSpawnMrk and extractMrk

I add a trigger with on act :

 _null = [] execVM "extraction.sqf"

So when the trigger is activated, the heli comes, lands then i get in, but the heli doesn't move to extract pos. It stay at the same place. :confused:

What i m doing wrong ?

(i tried only with editor mod)

Share this post


Link to post
Share on other sites

You need to place an invisible helipad at your base, then call it base. Look at WP1 in the code above.

---------- Post added at 07:47 ---------- Previous post was at 07:46 ----------

Another option is making the spawnPos the return position. I will update the script.

---------- Post added at 09:24 ---------- Previous post was at 07:47 ----------

Here is an example mission for an extraction.

http://www.mediafire.com/download/ega7qas51w2283g/extraction_example.zip

It is called by using either a radio trigger, throwing a smokeshell, or using a combined smokeshell/radio call.

This will spawn in a ghosthawk on the blufor side and pick up the players group. It is also setcaptive true.

0 = [blufor, group player, "B_Heli_Transport_01_camo_F", true] execVM "COB_extraction.sqf"

Here is the script, but I would recommend the extraction example, it is in a compressed folder and unpbo already. You will need to put down 3 markers, one for the helicopter spawn, one for the extraction, and one for where they will be dropped off. You will also need to place invisible helicopter pads at the marker locations. In my example mission I did not place one at the last marker because Camp Rogain already has one.

/*
Filename: COB_extraction.sqf
Author: cobra4v320

Description:
Spawns a helicopter at a marker location, the helicopter moves to another marker location and picks up a group of soldiers.
Prior to the helicopter touching down it will open both of its doors. When the group is in the helicopter the doors will close.
The helicopter will then move to another marker and drop off the group. Prior to landing the doors will open. When the
group gets out the doors will close and the helicopter will return to its spawn position and delete the crew, helicopter, and markers.
Requires pre-placed helicopter pads or place the marker over a pad that already has them like camp rogain or stratis airbase.

Parameter(s):
_this select 0: this is the side of the extraction helicopter (blufor, opfor, independent).
_this select 1: this is the group that the extraction helicopter will pick up.
_this select 2: the is the helicopter classname or type.
_this select 3: this will set the helicopter as captive, keeps the enemy from shooting at them. (default is false)

Example(s):
0 = [blufor, group player, "B_Heli_Transport_01_camo_F", true] execVM "COB_extraction.sqf" //this will spawn a ghosthawk and it will be setCaptive True
*/

if (!isServer) exitWith {};

hint "Extraction helicopter inbound";

_side = _this select 0;
_group = _this select 1;
_heliType = _this select 2;
_captive = if (count _this > 3) then {_this select 3} else {false};

_spawnPos = getMarkerPos "heliSpawnMrk";
_extractPos = getMarkerPos "extractMrk";
_basePos = getMarkerPos "baseMrk";
_spawnDir = [_spawnPos, _extractPos] call BIS_fnc_dirTo;

_helisv = [_spawnPos, _spawnDir, _heliType, _side] call BIS_fnc_spawnVehicle;
_heli = _helisv select 0;
_heliGroup = _helisv select 2;
_dir = direction _heli;
_heli setVelocity [sin(_dir)*60,cos(_dir)*60,0];

{
_x disableAI "AUTOTARGET"; 
_x disableAI "TARGET"; 
_x allowFleeing 0; 
_x setCaptive _captive;
} forEach (units _heliGroup);

_heli spawn {
   while { alive _this } do { 
       player action ["collisionlightOff", _this]; //turn off lights
       sleep 0.01;
   };
};

_wp0 = _heliGroup addWaypoint [_extractPos, 0];
_wp0 setWaypointType "MOVE";
_wp0 setWaypointSpeed "FULL";
_wp0 setWaypointBehaviour "CARELESS";
_wp0 setWaypointStatements ["true", "(vehicle this) land 'GET IN'; {(vehicle this) animateDoor [_x, 1]} forEach ['door_back_L','door_back_R','door_L','door_R']"];

waituntil {{_x in _heli} count (units _group) == {alive _x} count (units _group)};

{_heli animateDoor [_x, 0]} forEach ["door_back_L","door_back_R","door_L","door_R"];

_wp1 = _heliGroup addWaypoint [_basePos, 0];    
_wp1 setWaypointType "MOVE";
_wp1 setWaypointSpeed "FULL";
_wp1 setWaypointBehaviour "CARELESS";
_wp1 setWaypointStatements ["true", "(vehicle this) land 'GET OUT'; {(vehicle this) animateDoor [_x, 1]} forEach ['door_back_L','door_back_R','door_L','door_R']"];

waituntil {{_x in _heli} count (units _group) < 1};

{_heli animateDoor [_x, 0]} forEach ["door_back_L","door_back_R","door_L","door_R"];

_wp2 = _heliGroup addWaypoint [_spawnPos, 0];
_wp2 setWaypointType "MOVE";
_wp2 setWaypointSpeed "FULL";
_wp2 setWaypointBehaviour "CARELESS";
_wp2 setWaypointStatements ["true", "{deleteVehicle _x} forEach (crew vehicle this) + [vehicle this]"];

deleteMarker "heliSpawnMrk";
deleteMarker "extractMrk";
deleteMarker "baseMrk";

Share this post


Link to post
Share on other sites

Thank you cobra !! :cool:

Other noob question :) : There is a way to spawn 2 or 3 helicopters because i need more than 10 places and i would like to keep AH9, or it is automatic (depending of number of players in game) :confused:

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  

×