Last active
March 16, 2016 05:34
-
-
Save devynspencer/65e7a9d681519865ed68 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fnc_spawnEvacVehicle = { | |
_evacFaction = side player; | |
_evacOrigin = [getPos player, floor random [50, 60, 70], floor random 360] call BIS_fnc_relPos; | |
_evacTarget = [getPos player, 10, floor random 360] call BIS_fnc_relPos; | |
_evacDestination = getMarkerPos "marker_extractionDestination"; | |
_evacTargetGroup = group player; | |
_evacVehicleClass = ["B_Heli_Transport_01_F"] call BIS_fnc_selectRandom; | |
_evacSpawn = [_evacOrigin, _evacOrigin getDir _evacTarget, _evacVehicleClass, _evacFaction] call BIS_fnc_spawnVehicle; | |
_evacSpawnGroup = _evacSpawn select 2; | |
_evacSpawnVehicle = _evacSpawn select 0; | |
_evacWpLoad = _evacSpawnGroup addWaypoint [_evacTarget, 5]; | |
_evacWpLoad setWaypointType "MOVE"; | |
_evacWpLoad setWaypointBehavior "CARELESS"; | |
_evacWpLoad setWaypointSpeed "FULL"; | |
_evacWpLoad setWaypointStatements [ | |
{ _x in _evacSpawnVehicle } count (units _evacTargetGroup) == { alive _x } count (units _evacTargetGroup) | |
]; | |
_evacWpUnload = _evacSpawnGroup addWaypoint [_evacTarget, 5]; | |
_evacWpUnload setWaypointType "MOVE"; | |
_evacWpUnload setWaypointBehavior "CARELESS"; | |
_evacWpUnload setWaypointSpeed "FULL"; | |
_evacWpUnload setWaypointStatements [ | |
{ _x in _evacSpawnVehicle } count (units _evacTargetGroup) == 0; | |
]; | |
}; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment