briefing.html)³Rebriefing.sqf)³R¨description.ext/£S¡fhqtt.sqf)³Riginit.sqf¶¢S´mission.sqmá SÝRoverview.html)³R«revive\Configuracion.sqfVґR§-revive\Data\accion.sqfÑ#ÁLprevive\Data\Evento_herido.sqfºQrevive\Data\Fun_Heli.sqf¬áûPFrevive\Data\JugadorHit.sqf×-[NÏrevive\Data\language.sqfp!Q revive\Data\menu\fnc_menuDef_Self.sqfÓûP‚revive\Data\muerte.sqfp†QŸ revive\MedEvac\Helicoptero.sqf%øûPI revive\MedEvac\Medico.sqfµëûPI revive\ReviveAceWounds.sqfл™Q¤éscripts\ammo.sqfdÚSù"scripts\infotext.sqf)³RÕscripts\Init_UPSMON.sqf)³RvUscripts\UPSMON.sqf)³Rm@scripts\UPSMON\actions\followme.sqf)³R° scripts\UPSMON\common\MON_functions.sqf)³RÚscripts\UPSMON\MON_artillery_add.sqf)³R‰ scripts\UPSMON\MON_spawn.sqf)³Rùscripts\UPSMON\MON_surrended.sqf)³R,teleport.sqfÐc R÷teleport_init.sqfDq¬Rúteleport_remove.sqf®c Røups.sqf)³Rd Debriefing

Endmission cheat is for pussies...


Cheaters fail at life.





Mission Accomplished


You have successfully murdered the people of Takistan. Let blood be spilled, tears be shed, and hate be spread. The villages of Takistan is filled with dead bodies. The US Peacekeeping force was no match for us Blacksuits. Mission Accomplished!!





Mission Failed


You have all died. Maybe the peacekeeping force was too much for you. Mission Failed!!


/* Briefing * The briefing can be defined by calling FHQ_TT_addBriefing. * The array is built like this. * The first element should be a filter (side, group, faction, or a piece of script). All units matching the * filter will see the briefing * This is followed by pairs of strings, a head line, and an actual text. * Briefings are added in the order in which they appear for any unit that matches * the last filter. */ [ east, ["Background", "You are a member of the Blacksuit Assassination Organization. Colonel Aziz had hired you to commence mass killings of nearby villages and towns in Takistan. He believe that they are too westernized and are disgusted with their ways and they must be annihilated. Within the night, you and other BlackSuit members will commence multiple raids at Takistan's many villages and towns, and assassinate the US peacekeeping force director stationed in Takistan. These villagers can't see at all in the night so that is the time we shall strike, but the US Peacekeeping force have nightvision googles so they can."], ["Mission", "Clear all the villages around Takistan from Khushab, Mulladost, Jilavur, Gospandi, Feruz Abad, Falar, Bastam, Nagara, Shamali, Rasman, and then kill the general."], ["Enemies", "Towns... loaded with petty villagers who are totally blind to the darkness. The only guys you need to worry about are US reinforcements. We're not sure how many they have. Their entire army might come for you or their entire army may not even be at base since they're busy reinforcing somewhere else. Who knows how many US reinforcements will come at you."], ["Hints", "If you're playing singleplayer, you can use high command to control the other Black Suit units. Once enemy reinforcements have arrive, you should fall back to your safe haven and use the extra weapons, ammos, and vehicles at your disposal. The mission is called Douchery since you're a bunch of douchebags killing petty villagers and UN troops who has no night vision (until US peacekeeping forces intervene that is). If your whereabouts are known, US peacekeeping force will respond within at least a 5 minute interval. Salvaging RPGs is always a good idea.

The amount of US reinforcements is random. Sometimes there's none, sometimes the whole army is after you with multiple combat choppers, transport helos, humvees, and tanks. Sometimes it's just tanks. Sometimes its just choppers. Sometimes, its just a bunch of infantries you should drive away from... Its random."], ["Safe Haven", "Armored SUVs are inside the warehouse. Ammo is inside the little room. Ladas are parked outside the garage. You can only access vehicles and weaponry once they are ready to go (when US Peacekeeping force are on the move)."], ["Credits", "Mission by Phantom Six.
FHQ Task Tracker by Varanon.
UPSMON by Monsada."] ] call FHQ_TT_addBriefing; [ east, // Filter ["task1", // Task name "Murder all the villagers in Khushab.", // Task text in briefing "Clear Khushab", // Task title in briefing "Khushab", // Waypoint text getmarkerpos "khushab" // Optional: Position or object // Optional: Initial state ], ["task2", // Task name "Murder all the villagers in Mulladost.", // Task text in briefing "Clear Mulladost", // Task title in briefing "Mulladost", // Waypoint text getmarkerpos "mulladost" // Optional: Position or object // Optional: Initial state ], ["task3", // Task name "Murder all the UN peacekeepers and villagers in Jilavur.", // Task text in briefing "Clear Jilavur", // Task title in briefing "Jilavur", // Waypoint text getmarkerpos "jilavur" // Optional: Position or object // Optional: Initial state ], ["task4", // Task name "Murder all the villagers in Gospandi.", // Task text in briefing "Clear Gospandi", // Task title in briefing "Gospandi", // Waypoint text getmarkerpos "gospandi" // Optional: Position or object // Optional: Initial state ], ["task5", // Task name "Murder all the UN peacekeepers and villagers in Feruz Abad.", // Task text in briefing "Clear Feruz Abad", // Task title in briefing "Feruz Abad", // Waypoint text getmarkerpos "feruz" // Optional: Position or object // Optional: Initial state ], ["task6", // Task name "Murder all the villagers in Falar.", // Task text in briefing "Clear Falar", // Task title in briefing "Falar", // Waypoint text getmarkerpos "falar" // Optional: Position or object // Optional: Initial state ], ["task7", // Task name "Murder all the villagers in Bastam.", // Task text in briefing "Clear Bastam", // Task title in briefing "Bastam", // Waypoint text getmarkerpos "bastam" // Optional: Position or object // Optional: Initial state ], ["task8", // Task name "Murder all the villagers in Nagara.", // Task text in briefing "Clear Nagara", // Task title in briefing "Nagara", // Waypoint text getmarkerpos "nagara" // Optional: Position or object // Optional: Initial state ], ["task9", // Task name "Murder all the villagers in Shamali.", // Task text in briefing "Clear Shamali", // Task title in briefing "Shamali", // Waypoint text getmarkerpos "Shamali" // Optional: Position or object // Optional: Initial state ], ["task10", // Task name "Murder all the villagers in Rasman.", // Task text in briefing "Clear Rasman", // Task title in briefing "Rasman", // Waypoint text getmarkerpos "Rasman" // Optional: Position or object // Optional: Initial state ], ["task11", // Task name "Assassinate the director of the US Peacekeeping force in Takistan.", // Task text in briefing "Assassinate the general", // Task title in briefing "general", // Waypoint text getmarkerpos "director" // Optional: Position or object // Optional: Initial state ] ] call FHQ_TT_addTasks;onLoadMission = "Douchery"; onLoadMissionTime = False; class Header { gameType = Coop; minPlayers = 1; maxPlayers = 10; playerCountMultipleOf =1; }; respawn = "BASE"; respawnDelay = 4; class Params { class Rain0 { title = "Rain"; values[] = {0,1,2,3}; texts[] = {"None","Light","Moderate","Heavy"}; default = 1; }; class Fog1 { title = "Fog"; values[] = {0,1,2,3}; texts[] = {"None","Light","Moderate","Heavy"}; default = 3; }; class View2 { title="View Distance"; values[]={0,1,2,3,4}; texts[]={"100m","500m","1000m","2000m","5000m"}; default = 2; }; }; /* FHQ TaskTracker for the FHQ Multiplayer framework * * This scriptset is used to create briefings and tasks, and keep track of * task states. * * In general, briefings and tasks can be created for individual players, for * groups of players, and specific to the side or faction of the player. * * Unit filters: * Whenever a unit filter is asked for, there are several possibilities to * define what you need to assign to: * single object: A single player * group: All players of a group * side: All players of a side * faction (string): All players of a certain faction * code: The piece of code is called for every playable character. Return true if you want * the character to be selected, or false otherwise. The only parameter is the playable * object to be tested * * When calling a function that assigns briefings or tasks, a pool of all playable units is created. * The filter is tested against those units, and all units matching the filter will have the tasks/briefing * assigned to them. Subsequently, these units (that mached the filter) are removed from the pool. Further * filtering is done on the remaining units. * * This essentially means that you should define tasks/briefing entries from specific to general. For example, * assuming one player group is west (whith special tasks), and the rest of the players share another set of tasks, * you would first use the specific group as filter value, followed by west to assign the following tasks to all * remaining west players. * * Examples: * {(side _this) != west): All playable characters that are not BLUFOR * player: the player on the current client * group westMan1_1: All units in westMan1_1's group * east: All playable characters on the OPFOR side * "BIS_BAF": All playable british soliders * * * Briefing entries: * Briefing entries are defined as an array of two strings. The first string is the title as it * will appear in the middle colum when the "Notes" section is highlighted in the left colum. * The second string is a text that can contains links to markers, code, and some html formatting * and will be displayed on the right column when the title in the center column is highlited. * * * Task entries: * A single task entry is an array. The elements in the array are as follows: * String: task name * String: Task text (the text that will appear in the right colum) * String: Task title (it will appear in the center column when "Tasks" is highlited in the left column). * String: optional Waypoint title (Will appear on the waypoint marker in the player's main view). * Object or position: The destination for this task, either an object, or a position. * String: Optional initial state ("created" if nothing given) * * * Commonly used examples: * * 1. Assign a task as current task: * ["taskDestroy", "assigned"] call FHQ_TT_setTaskState; * * * 2. Check if a task is completed (Note, might be successful, failed or cancelled) * if (["taskInsert"] call FHQ_TT_isTaskCompleted) then {hint "yes";}; * * * 3. Check if a task is successful * if (["taskDestroy"] call FHQ_TT_isTaskSuccessful) then {hint "yay";}; * * * 4. Mark a task and select another task that is not completed yet. * ["taskDestroySecondary", "succeeded", "taskDestroyPrimary", "taskDestroySecondary", "taskExfiltrate"] * call FHQ_TT_markTaskAndNext; * * This example marks taskDestroySecondary as succesful, and then checks if taskDestroyPrimary is completed. * If not, it is set to assigned. If it is completed, it continues with the taskDestroySecondary and eventually * taskExfiltrate. * * * * * TODO: Add possibility to change waypoint position */ FHQ_TT_init = { FHQ_TT_supressTaskHints = true; /* Check for Arma 3 or 2 */ FHQ_TT_is_arma3 = false; if (isClass (configfile >> "CfgAddons" >> "PreloadAddons" >> "A3")) then { FHQ_TT_is_arma3 = true; }; if (isServer) then { // Global list of tasks kept on the server. Always contains full info: // [unit filter, description, state] FHQ_TT_TaskList = []; }; if (!isDedicated) then { // Local version of the client // I wonder, though, why this is necessary, since according to the documentation, // the effects of createSimpleTask are global // Anyway, [name, state, list of objects] FHQ_TT_ClientTaskList = []; if (isNil {player} || isNull player) then { FHQ_TT_isJIPPlayer = true; }; [] spawn { // Wait for join in progress waitUntil {!isNil {player}}; waitUntil {!isNull player}; // Wait until the task list is ready. waitUntil {!isNil "FHQ_TT_initialized"}; FHQ_TT_TaskList call FHQ_TT_UpdateTaskList; FHQ_TT_supressTaskHints = false; "FHQ_TT_TaskList" addPublicVariableEventHandler {(_this select 1) call FHQ_TT_UpdateTaskList}; }; }; }; FHQ_TT_filterUnits = { private ["_unitsArray", "_inputArray", "_outputArray"]; _unitsArray = _this select 1; _inputArray = _this select 0; _outputArray = []; switch (typename _inputArray) do { case "CODE": { // Filter all playable units by comparing them with the code {if (_x call _inputArray) then {_outputArray = _outputArray + [_x];};} forEach _unitsArray; }; case "GROUP": { // Filter out all objects not in group {if (_x in units _inputArray) then {_outputArray = _outputArray + [_x];};} forEach _unitsArray; }; case "OBJECT": { // Result is only the array containing the object _outputArray = [_inputArray]; }; case "SIDE": { // Filter out all objects not belonging to side {if (side _x == _inputArray) then {_outputArray = _outputArray + [_x];};} forEach _unitsArray; }; case "STRING": { // Filer out all objects not belonging to the faction {if (faction _x == _inputArray) then {_outputArray = _outputArray + [_x];};} forEach _unitsArray; }; }; _outputArray; }; /* FHQ_TT_addBriefingEntry: Add a briefing entry for the given entities * * This function adds a briefing entry for the given units. The units can be * supplied as either a player, a group, a side, a faction, or a piece of code. * All playable units will receive the given entries if they match the condition. * * [_units, _topic, _text] call FHQ_TT_addBriefingEntry; * [_units, _subject, _topic, _text] call FHQ_TT_addBriefingEntry; (NOT YET IMPLEMENTED) * * Parameters: * _units: A single unit, a group, side faction, or piece of code that will * be run on all playable units. * _topic: topic to add to * _text: text for this subject * _subject: Subject to file this under. A new subject is created if it does not exist yet. * (optional, not yet implemented) * */ FHQ_TT_addBriefingEntry = { private ["_units", "_subject", "_topic", "_text", "_unitsArray", "_unitPool"]; _units = _this select 0; _subject = "Diary"; _topic = _this select 1; _text = _this select 2; _unitPool = (if (isMultiplayer) then {playableUnits} else {switchableUnits}); _unitsArray = [_units, _unitPool] call FHQ_TT_filterUnits; {_x createDiaryRecord [_subject, [_topic, _text]]} forEach _unitsArray; }; /* Internally used to add topics to units in reversed order */ FHQ_TT_addBriefingEntries = { private ["_units", "_subject", "_topics", "_count", "_i", "_topic", "_text"]; _units = _this select 0; _subject = "Diary"; _topics = _this select 1; _count = count _topics; if (_count > 0) then { for [ {_i = _count - 1}, {_i >= 0}, {_i = _i - 1}] do { _topic = (_topics select _i) select 0; _text = (_topics select _i) select 1; {_x createDiaryRecord [_subject, [_topic, _text]]} forEach _units; }; }; }; /* FHQ_TT_addBriefing: Add a full briefing to the selected units. * * This functions receives an array as input. The elements of the input array * are interpreted as follows: * If the element is a two-element array consisting of two strings, the entry is * interpreted as a new briefing topic. * If the element is anything else, the following topics will only be presented to * the units matching the element. For example, if the element is a group, the following * entries are added to this group only. * If a new unit match is encountered, the units that have been assigned targets before * will be removed from the pool of units being considered for future topics. * * In other words, you can define briefings from bottom up. If you first define briefing topics * for a group of players, and then for a side, the side specific topics will not be added to the * group. This is meant to enable you to go from specific units up to general. * * In normal circumstances, you will most likely only define one briefing for a single group of * players, and thus passing only an array of string pairs. */ FHQ_TT_addBriefing = { private ["_unitPool", "_numEntries", "_currentUnits", "_currentTopicList", "_current"]; _unitPool = (if (isMultiplayer) then {playableUnits} else {switchableUnits}); _numEntries = count _this; _currentUnits = _unitPool; _currentTopicList = []; for "_i" from 0 to (_numEntries - 1) do { _current = _this select _i; if (typename _current == "ARRAY") then { // Parameter is an entry for the briefing, apply it to the _currentUnits pool // {_x createDiaryRecord ["Diary", [_current select 0, _current select 1]];} forEach _currentUnits; _currentTopicList = _currentTopicList + [[_current select 0, _current select 1]]; } else { // Parameter is a filter for the units. Remove the _currentUnits from the pool and select // units according to the filter. Note: not removing anything on _i = 0 if (_i != 0) then { _unitPool = _unitPool - _currentUnits; }; if (count _currentTopicList > 0) then { [_currentUnits, _currentTopicList] call FHQ_TT_addBriefingEntries; _currentTopicList = []; }; _currentUnits = [_current, _unitPool] call FHQ_TT_filterUnits; }; }; // Add any leftovers if (count _currentTopicList > 0) then { [_currentUnits, _currentTopicList] call FHQ_TT_addBriefingEntries; _currentTopicList = []; }; }; /* FHQ_TT_getTaskName * Internal */ FHQ_TT_getTaskName = { private ["_task", "_name"]; _task = (_this select 0) select 0; if (typename _task == "ARRAY") then { _name = _task select 0; } else { _name = _task; }; _name; }; /* FHQ_TT_createSimpleTask: * * Internal */ FHQ_TT_createSimpleTask = { private ["_currentUnits", "_currentTask", "_currentTaskState", "_taskObjects", "_taskName"]; _currentUnits = _this select 0; _currentTask = _this select 1; // [name|[name,parent], text, title, waypoint, object/position] _currentTaskState = _this select 2; _taskObjects = []; { private "_task"; if (typename (_currentTask select 0) == "ARRAY") then { private ["_parentTask"]; _taskName = (_currentTask select 0) select 0; _parentTask = (_currentTask select 0) select 1; _task = _x createSimpleTask [_taskName, _x getVariable format["FHQ_TT_taskname_%1", _parentTask]]; } else { _taskName = _currentTask select 0; _task = _x createSimpleTask [_currentTask select 0]; }; _task setSimpleTaskDescription [_currentTask select 1, _currentTask select 2, _currentTask select 3]; if (count _currentTask > 4) then { switch (typename (_currentTask select 4)) do { case "ARRAY": { _task setSimpleTaskDestination (_currentTask select 4); }; case "OBJECT": { _task setSimpleTaskTarget [_currentTask select 4, true]; }; }; }; _task setTaskState _currentTaskState; if (tolower(_currentTaskState) == "assigned") then { _x setCurrentTask _task; }; _x setVariable [format["FHQ_TT_taskname_%1", _taskName], _task, true]; _taskObjects = _taskObjects + [_task]; } forEach _currentUnits; _taskObjects; }; /* Internal */ FHQ_TT_addTaskEntries = { private ["_currentUnits", "_tasks", "_count", "_i", "_current", "_state"]; _currentUnits = _this select 0; _tasks = _this select 1; _count = count _tasks; if (_count > 0) then { if (FHQ_TT_is_arma3) then { for [ {_i = 0}, {_i < _count}, {_i = _i + 1}] do { _current = _tasks select _i; _state = "created"; // Optional state if (count _current >= 6) then { _state = _current select 5; }; // fifth element is either an object/position, or a string. In the latter case, // object/position was ommited but initial state given if (count _current >= 5) then { if (typename (_current select 4) == "STRING") then { _state = _current select 4; }; }; FHQ_TT_TaskList = FHQ_TT_TaskList + [[_currentUnits, _current, _state]]; }; } else { for [ {_i = _count - 1}, {_i >= 0}, {_i = _i - 1}] do { _current = _tasks select _i; _state = "created"; // Optional state if (count _current >= 6) then { _state = _current select 5; }; // fifth element is either an object/position, or a string. In the latter case, // object/position was ommited but initial state given if (count _current >= 5) then { if (typename (_current select 4) == "STRING") then { _state = _current select 4; }; }; FHQ_TT_TaskList = FHQ_TT_TaskList + [[_currentUnits, _current, _state]]; }; } }; }; /* FHQ_TT_addTasks: Add tasks to the mission * * write me * */ FHQ_TT_addTasks = { private ["_numEntries", "_unitPool", "_currentUnits", "_currentTaskList", "_current"]; if (!isServer) exitWith {}; _numEntries = count _this; if (_numEntries <= 0) exitWith {}; _unitPool = (if (isMultiplayer) then {playableUnits} else {switchableUnits}); _currentUnits = _unitPool; _currentTaskList = []; for "_i" from 0 to (_numEntries - 1) do { _current = _this select _i; if (typename _current == "ARRAY") then { _currentTaskList = _currentTaskList + [_current]; } else { // Parameter is a filter for the units. if (_i != 0) then { _unitPool = _unitPool - _currentUnits; }; if (count _currentTaskList > 0) then { [_currentUnits, _currentTaskList] call FHQ_TT_addTaskEntries; _currentTaskList = []; }; _currentUnits = [_current, _unitPool] call FHQ_TT_filterUnits; }; }; if (count _currentTaskList > 0) then { [_currentUnits, _currentTaskList] call FHQ_TT_addTaskEntries; }; // Send task list to clients publicVariable "FHQ_TT_TaskList"; if (!isDedicated) then { FHQ_TT_TaskList call FHQ_TT_UpdateTaskList; }; FHQ_TT_initialized = true; publicVariable "FHQ_TT_initialized"; }; FHQ_TT_hasTask = { private "_result"; _result = false; { if ((_x call FHQ_TT_getTaskName) == _this) exitWith {_result = true;}; } forEach FHQ_TT_ClientTaskList; _result; }; FHQ_TT_taskHint = { if (!FHQ_TT_is_arma3) then { /* Arma 2 */ private ["_desc", "_state", "_color", "_icon", "_text"]; _desc = _this select 0; _state = _this select 1; _color = [1, 1, 1, 1]; _icon = "taskNew"; _text = "New Task"; switch (tolower(_state)) do { case "created": { _color = [1, 1, 1, 1]; _icon = "taskNew"; _text = localize "str_taskNew"; }; case "assigned": { _color = [1, 1, 1, 1]; _icon = "taskCurrent"; _text = localize "str_taskSetCurrent"; }; case "succeeded": { _color = [0.600000,0.839215,0.466666,1]; _icon = "taskDone"; _text = localize "str_taskAccomplished"; }; case "canceled": { _color = [0.75,0.75,0.75,1]; _icon = "taskFailed"; _text = localize "str_taskCancelled"; }; case "cancelled": { _color = [0.75,0.75,0.75,1]; _icon = "taskFailed"; _text = localize "str_taskCancelled"; }; case "failed": { _color = [0.972549,0.121568,0,1]; _icon = "taskFailed"; _text = localize "str_taskFailed"; }; }; taskHint [format ["%1\n%2", _text, _desc], _color, _icon]; } else { /* Arma 3 */ private ["_notifyTemplate", "_desc", "_state"]; _desc = _this select 0; _state = _this select 1; switch (tolower _state) do { case "created": { _notifyTemplate = "TaskCreated"; }; case "assigned": { _notifyTemplate = "TaskAssigned"; }; case "succeeded": { _notifyTemplate = "TaskSucceeded"; }; case "canceled": { _notifyTemplate = "TaskCanceled"; }; case "cancelled": { _notifyTemplate = "TaskCanceled"; }; case "failed": { _notifyTemplate = "TaskFailed"; }; }; [_notifyTemplate, ["", _desc]] call BIS_fnc_showNotification; }; }; FHQ_TT_UpdateTaskList = { if (isDedicated) exitWith {}; private ["_count", "_i", "_tasks"]; _tasks = _this; _count = count _tasks; if (_count > 0) then { for [ {_i = 0}, {_i < _count}, {_i = _i + 1}] do { private ["_current", "_currentUnits", "_taskObjects", "_currentTask", "_currentTaskState", "_currentTaskName", "_currentTaskParent"]; _current = _tasks select _i; // [units, taskDesc, state] _currentTask = _current select 1; // [name|[name,parent], text, title, waypoint, object/position] _currentUnits = _current select 0; _currentTaskState = _current select 2; _currentTaskName = ""; _currentTaskParent = ""; if (typename (_currentTask select 0) == "ARRAY") then { _currentTaskName = (_currentTask select 0) select 0; _currentTaskParent = (_currentTask select 0) select 1; } else { _currentTaskName = _currentTask select 0; }; if (_currentTaskName call FHQ_TT_hasTask) then { private ["_localTask", "_x", "_task"]; _localTask = FHQ_TT_ClientTaskList select _i; // [name, state, objects] diag_log format["_localTask -> %1, _curent -> %2", _localTask select 1, _current select 2]; if ((_current select 2) != (_localTask select 1)) then { // Update the task _localTask set [1, _current select 2]; FHQ_TT_ClientTaskList set [_i, _localTask]; if (player in (_currentUnits)) then { [_currentTask select 2, _current select 2] call FHQ_TT_taskHint; }; { _task = _x; if (_current select 2 == "assigned") then { { if (_task in (simpletasks _x)) then { _x setCurrentTask _task; }; } forEach _currentUnits; }; _task setTaskState (_current select 2); } forEach (_localTask select 2); }; } else { _taskObjects = [_currentUnits, _currentTask, _currentTaskState] call FHQ_TT_createSimpleTask; FHQ_TT_ClientTaskList set [_i, [(_current select 1), _currentTaskState, _taskObjects]]; if (player in (_currentUnits) && !FHQ_TT_supressTaskHints) then { [_currentTask select 2, _currentTaskState] call FHQ_TT_taskHint; }; }; }; }; }; /* FHQ_TT_setTaskState: Set state of a specific task * * write me * * [_taskName, _state] call FHQ_TT_setTaskState; */ FHQ_TT_setTaskState = { if (!isServer) exitWith {}; private ["_count", "_taskName", "_newState", "_i", "_curTask"]; _count = count FHQ_TT_TaskList; _taskName = _this select 0; _newState = _this select 1; for [ {_i = 0}, {_i < _count}, {_i = _i + 1}] do { _curTask = FHQ_TT_TaskList select _i; diag_log format["_curTask = %1", _curTask]; //if (_taskName == ((_curTask select 1) select 0)) exitWith if (_taskName == ([_curTask select 1] call FHQ_TT_getTaskName)) exitWith { _curTask set [2, _newState]; FHQ_TT_TaskList set [_i, _curTask]; }; }; publicVariable "FHQ_TT_TaskList"; if (!isDedicated) then { FHQ_TT_TaskList call FHQ_TT_UpdateTaskList; }; }; /* FHQ_TT_getTaskState: Get state of a specific task * * write me * * _result = [_taskName] call FHQ_TT_getTaskState; */ FHQ_TT_getTaskState = { private ["_result", "_taskName"]; _result = ""; _taskName = _this select 0; { // if (((_x select 1) select 0) == _taskname) exitWith if (([_x select 1] call FHQ_TT_getTaskName) == _taskname) exitWith { _result = (_x select 2); }; } forEach FHQ_TT_TaskList; _result; }; /* FHQ_TT_isTaskCompleted: Check whether a task is canceled, successful or failed * * _result = [_taskName] call FHQ_TT_isTaskCompleted; */ FHQ_TT_isTaskCompleted = { private "_result"; _result = (tolower(_this call FHQ_TT_getTaskState) in ["succeeded", "canceled", "failed"]); _result; }; /* FHQ_TT_areTasksCompleted: Check for all tasks given whether they are cancelled, successful, or failed * _result = [_taskName1, _taskName2, ...] call FHQ_TT_areTasksCompleted */ FHQ_TT_areTasksCompleted = { private ["_result", "_x"]; _result = true; { if (!(tolower ([_x] call FHQ_TT_getTaskState) in ["succeeded", "canceled", "failed"])) exitWith { _result = false; }; } forEach _this; _result; }; /* FHQ_TT_isTaskSuccessful: Check whether a task is ended successfully * * _result = [_taskName] call FHQ_TT_isTaskSuccessful; */ FHQ_TT_isTaskSuccessful = { private "_result"; _result = (tolower(_this call FHQ_TT_getTaskState) == "succeeded"); _result; }; /* FHQ_TT_areTasksSuccessful: Check success for all tasks given * _result = [_taskName1, _taskName2, ...] call FHQ_TT_areTasksSuccessful */ FHQ_TT_areTasksSuccessful = { private ["_result", "_x"]; _result = true; { if (tolower ([_x] call FHQ_TT_getTaskState) != "succeeded") exitWith { _result = false; }; } forEach _this; _result; }; /* FHQ_TT_getAllTasksWithState: Get all tasks with a given state * * _taskList = [_state] call FHQ_TT_getAllTasksWithState; */ FHQ_TT_getAllTasksWithState = { private ["_result", "_taskState"]; _result = []; _taskState = _this select 0; { if ((_x select 2) == _taskState) then { _result = _result + [(_x select 1) select 0]; }; } forEach FHQ_TT_TaskList; _result; }; /* FHQ_TT_markTaskAndNext: Mark a task as completed, and look for the next * open task. * * ["taskName", "state", ("newTask1", "newTask2" ... )] call FHQ_TT_markTaskAndNext; */ FHQ_TT_markTaskAndNext = { private "_i"; [_this select 0, _this select 1] call FHQ_TT_setTaskState; for [ {_i = 2}, {_i < count _this}, {_i = _i + 1} ] do { if (!([_this select _i] call FHQ_TT_isTaskCompleted)) exitWith { [_this select _i, "assigned"] call FHQ_TT_setTaskState; }; }; }; /* ------------ End of file, calling init ------------ */ call FHQ_TT_init; "world" setMarkerAlpha 0; "area0" setMarkerAlpha 0; "area1" setMarkerAlpha 0; "area2" setMarkerAlpha 0; "area3" setMarkerAlpha 0; "area4" setMarkerAlpha 0; "area5" setMarkerAlpha 0; "area6" setMarkerAlpha 0; "area7" setMarkerAlpha 0; "area8" setMarkerAlpha 0; "area9" setMarkerAlpha 0; "base" setMarkerAlpha 0; call compile preProcessFileLineNumbers "fhqtt.sqf"; call compile preProcessFileLineNumbers "briefing.sqf"; execVM "scripts\infotext.sqf"; execVM "UPS.sqf"; [] execVM "revive\ReviveAceWounds.sqf"; switch (paramsArray select 0) do { case 0: { 0 setOvercast 0; 0 setRain 0; }; case 1: { 0 setOvercast 0.8; 0 setRain 0.3; }; case 2: { 0 setOvercast 0.9; 0 setRain 0.6; }; case 3: { 0 setOvercast 1; 0 setRain 1; }; }; switch (paramsArray select 1) do { case 0: { 0 setFog 0; }; case 1: { 0 setFog 0.3; }; case 2: { 0 setFog 0.6; }; case 3: { 0 setFog 1; }; }; viewparam = (paramsArray select 2); if (viewparam == 0) then {setViewDistance 100}; if (viewparam == 1) then {setViewDistance 500}; if (viewparam == 2) then {setViewDistance 1000}; if (viewparam == 3) then {setViewDistance 2000}; if (viewparam == 4) then {setViewDistance 5000};version=11; class Mission { addOns[]= { "cacharacters_e", "cawheeled_pmc", "takistan", "ca_modules_functions", "ca_highcommand", "camisc3", "CATracked_E_M2A2_Bradley", "cawheeled_e_hmmwv", "CAAir_E_AH64D", "caair_e_ch_47f", "CAAir_E_UH60M", "CATracked_E", "CAWheeled_E", "cawheeled_e_stryker", "caweapons_pmc", "cawheeled_pmc_armoredsuv", "ace_main", "ace_sys_wounds", "CABuildings", "camisc_e", "acex_c_weapon", "cawheeled_e_volha" }; addOnsAuto[]= { "ca_modules_functions", "cacharacters_e", "ca_highcommand", "CATracked_E_M2A2_Bradley", "cawheeled_e_hmmwv", "CAAir_E_AH64D", "caair_e_ch_47f", "CAAir_E_UH60M", "CATracked_E", "CAWheeled_E", "CAWheeled_E_stryker", "ace_main", "ace_sys_wounds", "cawheeled_pmc", "camisc3", "caweapons_pmc", "cawheeled_pmc_armoredsuv", "CABuildings", "camisc_e", "cawheeled_e_volha", "takistan" }; randomSeed=13137577; class Intel { briefingName="ACE CO 10 Douchery [Respawn/Revive]"; briefingDescription="Drive around villages in Takistan and murder the locals there with silence weapons. Oh how fair it is to kill poorly armed peasants in the night where they don't see us."; startWeather=0; forecastWeather=0; year=2013; day=27; hour=0; minute=0; }; class Groups { items=124; class Item0 { side="LOGIC"; class Vehicles { items=1; class Item0 { position[]={-11.538979,339.28604,5487.8433}; id=12; side="LOGIC"; vehicle="FunctionsManager"; leader=1; lock="UNLOCKED"; skill=0.60000002; }; }; }; class Item1 { side="EAST"; class Vehicles { items=6; class Item0 { presence=0; position[]={31.650406,333.50558,5498.5327}; special="NONE"; id=13; side="EAST"; vehicle="TK_Soldier_EP1"; leader=1; rank="COLONEL"; skill=0.60000002; }; class Item1 { position[]={32.104416,333.79694,5494.9707}; special="NONE"; id=5; side="CIV"; vehicle="Functionary1_EP1"; player="PLAY CDG"; rank="LIEUTENANT"; skill=1; text="p6"; init="this moveindriver car2; this addMagazine ""30Rnd_556x45_StanagSD""; this addMagazine ""30Rnd_556x45_StanagSD""; this addMagazine ""30Rnd_556x45_StanagSD""; this addMagazine ""30Rnd_556x45_StanagSD""; this addMagazine ""30Rnd_556x45_StanagSD""; this addMagazine ""30Rnd_556x45_StanagSD""; this addMagazine ""30Rnd_556x45_StanagSD""; this addMagazine ""30Rnd_556x45_StanagSD""; this addMagazine ""30Rnd_556x45_StanagSD""; this addWeapon ""M4A1_AIM_SD_CAMO""; this addMagazine ""HandGrenade_West""; this addMagazine ""HandGrenade_West""; this addMagazine ""HandGrenade_West""; this addWeapon ""NVGoggles""; this addWeapon ""Binocular_Vector""; this addWeapon ""ItemGPS""; this addMagazine ""ACE_LargeBandage""; this addMagazine ""ACE_LargeBandage""; this addMagazine ""ACE_Morphine""; this addMagazine ""ACE_Morphine""; this addMagazine ""ACE_Epinephrine""; this addMagazine ""ACE_Epinephrine""; this addMagazine ""ACE_12Rnd_45ACP_USPSD""; this addMagazine ""ACE_12Rnd_45ACP_USPSD""; this addWeapon ""ACE_USPSD""; this addWeapon ""ACE_Earplugs"";"; description="Blacksuit Leader"; synchronizations[]={16}; }; class Item2 { position[]={29.011047,334.3768,5493.873}; special="NONE"; id=6; side="CIV"; vehicle="Functionary1_EP1"; player="PLAY CDG"; rank="SERGEANT"; skill=1; text="p7"; init="this moveinCargo car2; this addMagazine ""30Rnd_9x19_MP5SD""; this addMagazine ""30Rnd_9x19_MP5SD""; this addMagazine ""30Rnd_9x19_MP5SD""; this addMagazine ""30Rnd_9x19_MP5SD""; this addMagazine ""30Rnd_9x19_MP5SD""; this addMagazine ""30Rnd_9x19_MP5SD""; this addMagazine ""30Rnd_9x19_MP5SD""; this addMagazine ""30Rnd_9x19_MP5SD""; this addMagazine ""30Rnd_9x19_MP5SD""; this addWeapon ""MP5SD""; this addMagazine ""HandGrenade_West""; this addMagazine ""HandGrenade_West""; this addMagazine ""HandGrenade_West""; this addWeapon ""NVGoggles""; this addWeapon ""Binocular_Vector""; this addWeapon ""ItemGPS""; this addMagazine ""ACE_LargeBandage""; this addMagazine ""ACE_LargeBandage""; this addMagazine ""ACE_Medkit""; this addMagazine ""ACE_Medkit""; this addMagazine ""ACE_Morphine""; this addMagazine ""ACE_Morphine""; this addMagazine ""ACE_Epinephrine""; this addMagazine ""ACE_Epinephrine""; this addWeapon ""ACE_Earplugs"";"; description="Blacksuit"; }; class Item3 { position[]={31.313728,334.12207,5493.1011}; special="NONE"; id=7; side="CIV"; vehicle="Functionary1_EP1"; player="PLAY CDG"; rank="SERGEANT"; skill=1; text="p8"; init="this moveinCargo car2; this addMagazine ""30Rnd_9x19_MP5SD""; this addMagazine ""30Rnd_9x19_MP5SD""; this addMagazine ""30Rnd_9x19_MP5SD""; this addMagazine ""30Rnd_9x19_MP5SD""; this addMagazine ""30Rnd_9x19_MP5SD""; this addMagazine ""30Rnd_9x19_MP5SD""; this addMagazine ""30Rnd_9x19_MP5SD""; this addMagazine ""30Rnd_9x19_MP5SD""; this addMagazine ""30Rnd_9x19_MP5SD""; this addWeapon ""MP5SD""; this addMagazine ""HandGrenade_West""; this addMagazine ""HandGrenade_West""; this addMagazine ""HandGrenade_West""; this addWeapon ""NVGoggles""; this addWeapon ""Binocular_Vector""; this addWeapon ""ItemGPS""; this addMagazine ""ACE_LargeBandage""; this addMagazine ""ACE_LargeBandage""; this addMagazine ""ACE_Medkit""; this addMagazine ""ACE_Medkit""; this addMagazine ""ACE_Morphine""; this addMagazine ""ACE_Morphine""; this addMagazine ""ACE_Epinephrine""; this addMagazine ""ACE_Epinephrine""; this addWeapon ""ACE_Earplugs"";"; description="Blacksuit"; }; class Item4 { position[]={33.682091,333.73154,5493.1479}; special="NONE"; id=8; side="CIV"; vehicle="Functionary1_EP1"; player="PLAY CDG"; rank="SERGEANT"; skill=1; text="p9"; init="this moveinCargo car2; this addMagazine ""30Rnd_9x19_MP5SD""; this addMagazine ""30Rnd_9x19_MP5SD""; this addMagazine ""30Rnd_9x19_MP5SD""; this addMagazine ""30Rnd_9x19_MP5SD""; this addMagazine ""30Rnd_9x19_MP5SD""; this addMagazine ""30Rnd_9x19_MP5SD""; this addMagazine ""30Rnd_9x19_MP5SD""; this addMagazine ""30Rnd_9x19_MP5SD""; this addMagazine ""30Rnd_9x19_MP5SD""; this addWeapon ""MP5SD""; this addMagazine ""HandGrenade_West""; this addMagazine ""HandGrenade_West""; this addMagazine ""HandGrenade_West""; this addWeapon ""NVGoggles""; this addWeapon ""Binocular_Vector""; this addWeapon ""ItemGPS""; this addMagazine ""ACE_LargeBandage""; this addMagazine ""ACE_LargeBandage""; this addMagazine ""ACE_Medkit""; this addMagazine ""ACE_Medkit""; this addMagazine ""ACE_Morphine""; this addMagazine ""ACE_Morphine""; this addMagazine ""ACE_Epinephrine""; this addMagazine ""ACE_Epinephrine""; this addWeapon ""ACE_Earplugs"";"; description="Blacksuit"; }; class Item5 { position[]={35.105888,333.34897,5494.6089}; special="NONE"; id=9; side="CIV"; vehicle="Functionary1_EP1"; player="PLAY CDG"; rank="SERGEANT"; skill=1; text="p10"; init="this moveinCargo car2; this addMagazine ""30Rnd_9x19_MP5SD""; this addMagazine ""30Rnd_9x19_MP5SD""; this addMagazine ""30Rnd_9x19_MP5SD""; this addMagazine ""30Rnd_9x19_MP5SD""; this addMagazine ""30Rnd_9x19_MP5SD""; this addMagazine ""30Rnd_9x19_MP5SD""; this addMagazine ""30Rnd_9x19_MP5SD""; this addMagazine ""30Rnd_9x19_MP5SD""; this addMagazine ""30Rnd_9x19_MP5SD""; this addWeapon ""MP5SD""; this addMagazine ""HandGrenade_West""; this addMagazine ""HandGrenade_West""; this addMagazine ""HandGrenade_West""; this addWeapon ""NVGoggles""; this addWeapon ""Binocular_Vector""; this addWeapon ""ItemGPS""; this addMagazine ""ACE_LargeBandage""; this addMagazine ""ACE_LargeBandage""; this addMagazine ""ACE_Medkit""; this addMagazine ""ACE_Medkit""; this addMagazine ""ACE_Morphine""; this addMagazine ""ACE_Morphine""; this addMagazine ""ACE_Epinephrine""; this addMagazine ""ACE_Epinephrine""; this addWeapon ""ACE_Earplugs"";"; description="Blacksuit"; }; }; }; class Item2 { side="EAST"; class Vehicles { items=6; class Item0 { presence=0; position[]={19.288239,335.22833,5498.1968}; special="NONE"; id=14; side="EAST"; vehicle="TK_Soldier_EP1"; leader=1; rank="COLONEL"; skill=0.60000002; }; class Item1 { position[]={19.100296,335.61661,5494.6313}; special="NONE"; id=0; side="CIV"; vehicle="Functionary1_EP1"; player="PLAYER COMMANDER"; rank="LIEUTENANT"; skill=1; text="p1"; init="this moveinDriver car1; this addMagazine ""30Rnd_556x45_StanagSD""; this addMagazine ""30Rnd_556x45_StanagSD""; this addMagazine ""30Rnd_556x45_StanagSD""; this addMagazine ""30Rnd_556x45_StanagSD""; this addMagazine ""30Rnd_556x45_StanagSD""; this addMagazine ""30Rnd_556x45_StanagSD""; this addMagazine ""30Rnd_556x45_StanagSD""; this addMagazine ""30Rnd_556x45_StanagSD""; this addMagazine ""30Rnd_556x45_StanagSD""; this addWeapon ""M4A1_AIM_SD_CAMO""; this addMagazine ""HandGrenade_West""; this addMagazine ""HandGrenade_West""; this addMagazine ""HandGrenade_West""; this addWeapon ""NVGoggles""; this addWeapon ""Binocular_Vector""; this addWeapon ""ItemGPS""; this addMagazine ""ACE_LargeBandage""; this addMagazine ""ACE_LargeBandage""; this addMagazine ""ACE_Morphine""; this addMagazine ""ACE_Morphine""; this addMagazine ""ACE_Epinephrine""; this addMagazine ""ACE_Epinephrine""; this addMagazine ""ACE_12Rnd_45ACP_USPSD""; this addMagazine ""ACE_12Rnd_45ACP_USPSD""; this addWeapon ""ACE_USPSD""; this addWeapon ""ACE_Earplugs"";"; description="Blacksuit Leader"; synchronizations[]={15}; }; class Item2 { position[]={15.454703,336.14487,5493.2974}; special="NONE"; id=1; side="CIV"; vehicle="Functionary1_EP1"; player="PLAY CDG"; rank="SERGEANT"; skill=1; text="p2"; init="this moveinCargo car1; this addMagazine ""30Rnd_9x19_MP5SD""; this addMagazine ""30Rnd_9x19_MP5SD""; this addMagazine ""30Rnd_9x19_MP5SD""; this addMagazine ""30Rnd_9x19_MP5SD""; this addMagazine ""30Rnd_9x19_MP5SD""; this addMagazine ""30Rnd_9x19_MP5SD""; this addMagazine ""30Rnd_9x19_MP5SD""; this addMagazine ""30Rnd_9x19_MP5SD""; this addMagazine ""30Rnd_9x19_MP5SD""; this addWeapon ""MP5SD""; this addMagazine ""HandGrenade_West""; this addMagazine ""HandGrenade_West""; this addMagazine ""HandGrenade_West""; this addWeapon ""NVGoggles""; this addWeapon ""Binocular_Vector""; this addWeapon ""ItemGPS""; this addMagazine ""ACE_LargeBandage""; this addMagazine ""ACE_LargeBandage""; this addMagazine ""ACE_Medkit""; this addMagazine ""ACE_Morphine""; this addMagazine ""ACE_Morphine""; this addMagazine ""ACE_Epinephrine""; this addMagazine ""ACE_Epinephrine""; this addWeapon ""ACE_Earplugs"";"; description="Blacksuit"; }; class Item3 { position[]={18.30961,335.90967,5492.7617}; special="NONE"; id=2; side="CIV"; vehicle="Functionary1_EP1"; player="PLAY CDG"; rank="SERGEANT"; skill=1; text="p3"; init="this moveinCargo car1; this addMagazine ""30Rnd_9x19_MP5SD""; this addMagazine ""30Rnd_9x19_MP5SD""; this addMagazine ""30Rnd_9x19_MP5SD""; this addMagazine ""30Rnd_9x19_MP5SD""; this addMagazine ""30Rnd_9x19_MP5SD""; this addMagazine ""30Rnd_9x19_MP5SD""; this addMagazine ""30Rnd_9x19_MP5SD""; this addMagazine ""30Rnd_9x19_MP5SD""; this addMagazine ""30Rnd_9x19_MP5SD""; this addWeapon ""MP5SD""; this addMagazine ""HandGrenade_West""; this addMagazine ""HandGrenade_West""; this addMagazine ""HandGrenade_West""; this addWeapon ""NVGoggles""; this addWeapon ""Binocular_Vector""; this addWeapon ""ItemGPS""; this addMagazine ""ACE_LargeBandage""; this addMagazine ""ACE_LargeBandage""; this addMagazine ""ACE_Medkit""; this addMagazine ""ACE_Morphine""; this addMagazine ""ACE_Morphine""; this addMagazine ""ACE_Epinephrine""; this addMagazine ""ACE_Epinephrine""; this addWeapon ""ACE_Earplugs"";"; description="Blacksuit"; }; class Item4 { position[]={20.677975,335.61792,5492.8086}; special="NONE"; id=3; side="CIV"; vehicle="Functionary1_EP1"; player="PLAY CDG"; rank="SERGEANT"; skill=1; text="p4"; init="this moveinCargo car1; this addMagazine ""30Rnd_9x19_MP5SD""; this addMagazine ""30Rnd_9x19_MP5SD""; this addMagazine ""30Rnd_9x19_MP5SD""; this addMagazine ""30Rnd_9x19_MP5SD""; this addMagazine ""30Rnd_9x19_MP5SD""; this addMagazine ""30Rnd_9x19_MP5SD""; this addMagazine ""30Rnd_9x19_MP5SD""; this addMagazine ""30Rnd_9x19_MP5SD""; this addMagazine ""30Rnd_9x19_MP5SD""; this addWeapon ""MP5SD""; this addMagazine ""HandGrenade_West""; this addMagazine ""HandGrenade_West""; this addMagazine ""HandGrenade_West""; this addWeapon ""NVGoggles""; this addWeapon ""Binocular_Vector""; this addWeapon ""ItemGPS""; this addMagazine ""ACE_LargeBandage""; this addMagazine ""ACE_LargeBandage""; this addMagazine ""ACE_Medkit""; this addMagazine ""ACE_Morphine""; this addMagazine ""ACE_Morphine""; this addMagazine ""ACE_Epinephrine""; this addMagazine ""ACE_Epinephrine""; this addWeapon ""ACE_Earplugs"";"; description="Blacksuit"; }; class Item5 { position[]={22.101772,335.28387,5494.2695}; special="NONE"; id=4; side="CIV"; vehicle="Functionary1_EP1"; player="PLAY CDG"; rank="SERGEANT"; skill=1; text="p5"; init="this moveinCargo car1; this addMagazine ""30Rnd_9x19_MP5SD""; this addMagazine ""30Rnd_9x19_MP5SD""; this addMagazine ""30Rnd_9x19_MP5SD""; this addMagazine ""30Rnd_9x19_MP5SD""; this addMagazine ""30Rnd_9x19_MP5SD""; this addMagazine ""30Rnd_9x19_MP5SD""; this addMagazine ""30Rnd_9x19_MP5SD""; this addMagazine ""30Rnd_9x19_MP5SD""; this addMagazine ""30Rnd_9x19_MP5SD""; this addWeapon ""MP5SD""; this addMagazine ""HandGrenade_West""; this addMagazine ""HandGrenade_West""; this addMagazine ""HandGrenade_West""; this addWeapon ""NVGoggles""; this addWeapon ""Binocular_Vector""; this addWeapon ""ItemGPS""; this addMagazine ""ACE_LargeBandage""; this addMagazine ""ACE_LargeBandage""; this addMagazine ""ACE_Medkit""; this addMagazine ""ACE_Morphine""; this addMagazine ""ACE_Morphine""; this addMagazine ""ACE_Epinephrine""; this addMagazine ""ACE_Epinephrine""; this addWeapon ""ACE_Earplugs"";"; description="Blacksuit"; synchronizations[]={4}; }; }; }; class Item3 { side="LOGIC"; class Vehicles { items=1; class Item0 { position[]={42.580742,334.95761,5471.1821}; id=16; side="LOGIC"; vehicle="HighCommandSubordinate"; leader=1; lock="UNLOCKED"; skill=0.60000002; synchronizations[]={15,5}; }; }; }; class Item4 { side="LOGIC"; class Vehicles { items=1; class Item0 { position[]={31.303574,337.1402,5471.2012}; id=15; side="LOGIC"; vehicle="HighCommand"; leader=1; lock="UNLOCKED"; skill=0.60000002; synchronizations[]={0,16}; }; }; }; class Item5 { side="GUER"; class Vehicles { items=2; class Item0 { position[]={1566.2157,232.37625,5718.3008}; special="NONE"; id=27; side="GUER"; vehicle="TK_GUE_Soldier_AT_EP1"; leader=1; skill=0.28453031; init="nul=[this,""area0""] execVM ""scripts\upsmon.sqf"";"; }; class Item1 { position[]={1563.5621,232.25569,5711.6812}; special="NONE"; id=35; side="GUER"; vehicle="TK_GUE_Soldier_AAT_EP1"; skill=0.21220414; }; }; }; class Item6 { side="GUER"; class Vehicles { items=1; class Item0 { position[]={1524.3971,234.84276,5738.7979}; special="NONE"; id=28; side="GUER"; vehicle="TK_GUE_Soldier_3_EP1"; leader=1; skill=0.21220414; init="nul=[this,""area0""] execVM ""scripts\upsmon.sqf"";"; }; }; }; class Item7 { side="GUER"; class Vehicles { items=1; class Item0 { position[]={1492.8297,235.95731,5755.3911}; special="NONE"; id=29; side="GUER"; vehicle="TK_GUE_Soldier_5_EP1"; leader=1; skill=0.21220414; init="nul=[this,""area0""] execVM ""scripts\upsmon.sqf"";"; }; }; }; class Item8 { side="GUER"; class Vehicles { items=1; class Item0 { position[]={1467.641,237.15726,5771.0151}; special="NONE"; id=30; side="GUER"; vehicle="TK_GUE_Soldier_2_EP1"; leader=1; skill=0.21220414; init="nul=[this,""area0""] execVM ""scripts\upsmon.sqf"";"; }; }; }; class Item9 { side="GUER"; class Vehicles { items=1; class Item0 { position[]={1596.313,231.60635,5703.9033}; special="NONE"; id=31; side="GUER"; vehicle="TK_GUE_Soldier_4_EP1"; leader=1; skill=0.21220414; init="nul=[this,""area0""] execVM ""scripts\upsmon.sqf"";"; }; }; }; class Item10 { side="GUER"; class Vehicles { items=2; class Item0 { position[]={1622.5485,229.93004,5689.9644}; special="NONE"; id=32; side="GUER"; vehicle="TK_GUE_Soldier_AT_EP1"; leader=1; skill=0.32640377; init="nul=[this,""area0""] execVM ""scripts\upsmon.sqf"";"; }; class Item1 { position[]={1616.9437,230.0435,5686.5674}; special="NONE"; id=36; side="GUER"; vehicle="TK_GUE_Soldier_AAT_EP1"; skill=0.21220414; }; }; }; class Item11 { side="GUER"; class Vehicles { items=1; class Item0 { position[]={1511.8064,235.50281,5747.3652}; special="NONE"; id=33; side="GUER"; vehicle="TK_GUE_Soldier_EP1"; leader=1; skill=0.21220414; init="nul=[this,""area0""] execVM ""scripts\upsmon.sqf"";"; }; }; }; class Item12 { side="GUER"; class Vehicles { items=1; class Item0 { position[]={1552.7965,233.01555,5723.7954}; special="NONE"; id=34; side="GUER"; vehicle="TK_GUE_Soldier_EP1"; leader=1; skill=0.21220414; init="nul=[this,""area0""] execVM ""scripts\upsmon.sqf"";"; }; }; }; class Item13 { side="GUER"; class Vehicles { items=2; class Item0 { position[]={2004.2411,285.8786,7590.9033}; special="NONE"; id=37; side="GUER"; vehicle="TK_GUE_Soldier_AR_EP1"; leader=1; skill=0.35685676; init="nul=[this,""area1""] execVM ""scripts\upsmon.sqf"";"; }; class Item1 { position[]={2012.0076,284.93872,7592.3037}; special="NONE"; id=46; side="GUER"; vehicle="TK_GUE_Soldier_2_EP1"; skill=0.25407669; }; }; }; class Item14 { side="GUER"; class Vehicles { items=1; class Item0 { position[]={2064.0703,288.54849,7565.5659}; special="NONE"; id=38; side="GUER"; vehicle="TK_GUE_Soldier_5_EP1"; leader=1; skill=0.25407669; init="nul=[this,""area1""] execVM ""scripts\upsmon.sqf"";"; }; }; }; class Item15 { side="GUER"; class Vehicles { items=2; class Item0 { position[]={1983.0518,278.93018,7638.6694}; special="NONE"; id=39; side="GUER"; vehicle="TK_GUE_Soldier_4_EP1"; leader=1; skill=0.37208313; init="nul=[this,""area1""] execVM ""scripts\upsmon.sqf"";"; }; class Item1 { position[]={1994.011,277.68701,7636.5112}; special="NONE"; id=45; side="GUER"; vehicle="TK_GUE_Soldier_3_EP1"; skill=0.25407669; }; }; }; class Item16 { side="GUER"; class Vehicles { items=2; class Item0 { position[]={2037.0642,276.29901,7702.6357}; special="NONE"; id=40; side="GUER"; vehicle="TK_GUE_Soldier_AT_EP1"; leader=1; skill=0.36066329; init="nul=[this,""area1""] execVM ""scripts\upsmon.sqf"";"; }; class Item1 { position[]={2042.6866,274.47751,7688.8511}; special="NONE"; id=43; side="GUER"; vehicle="TK_GUE_Soldier_AAT_EP1"; skill=0.22743049; }; }; }; class Item17 { side="GUER"; class Vehicles { items=2; class Item0 { position[]={2092.7388,266.34543,7702.6357}; special="NONE"; id=41; side="GUER"; vehicle="TK_GUE_Soldier_MG_EP1"; leader=1; skill=0.37208313; init="nul=[this,""area1""] execVM ""scripts\upsmon.sqf"";"; }; class Item1 { position[]={2091.9634,266.89795,7694.0835}; special="NONE"; id=44; side="GUER"; vehicle="TK_GUE_Soldier_2_EP1"; skill=0.22743049; }; }; }; class Item18 { side="GUER"; class Vehicles { items=1; class Item0 { position[]={2141.7654,260.46204,7717.5884}; special="NONE"; id=42; side="GUER"; vehicle="TK_GUE_Soldier_EP1"; leader=1; skill=0.25407669; init="nul=[this,""area1""] execVM ""scripts\upsmon.sqf"";"; }; }; }; class Item19 { side="GUER"; class Vehicles { items=1; class Item0 { position[]={2588.0647,198.23706,5104.0137}; azimut=-49.123215; special="NONE"; id=47; side="GUER"; vehicle="UN_CDF_Soldier_Guard_EP1"; leader=1; skill=0.41395658; init="this setPos ((position this nearestObject 29615) buildingPos 1);"; }; }; }; class Item20 { side="GUER"; class Vehicles { items=1; class Item0 { position[]={2601.9961,199.62112,5062.5962}; azimut=-165.55521; special="NONE"; id=48; side="GUER"; vehicle="UN_CDF_Soldier_Guard_EP1"; leader=1; skill=0.41395658; init="this setPos ((position this nearestObject 29764) buildingPos 1);"; }; }; }; class Item21 { side="GUER"; class Vehicles { items=1; class Item0 { position[]={2671.1411,196.87917,5095.9404}; azimut=103.83037; special="NONE"; id=49; side="GUER"; vehicle="UN_CDF_Soldier_Guard_EP1"; leader=1; skill=0.41395658; init="this setPos ((position this nearestObject 29994) buildingPos 1);"; }; }; }; class Item22 { side="GUER"; class Vehicles { items=1; class Item0 { position[]={2647.7205,196.2365,5135.582}; azimut=40.764286; special="NONE"; id=50; side="GUER"; vehicle="UN_CDF_Soldier_Guard_EP1"; leader=1; skill=0.41395658; init="this setPos ((position this nearestObject 29913) buildingPos 1);"; }; }; }; class Item23 { side="GUER"; class Vehicles { items=4; class Item0 { position[]={2622.967,198.32785,5089.5811}; special="NONE"; id=51; side="GUER"; vehicle="UN_CDF_Soldier_Guard_EP1"; leader=1; rank="SERGEANT"; skill=0.46666664; init="nul=[this,""area2"",""fortify""] execVM ""scripts\upsmon.sqf"";"; }; class Item1 { position[]={2620.1804,198.5358,5087.3818}; special="NONE"; id=52; side="GUER"; vehicle="UN_CDF_Soldier_EP1"; rank="CORPORAL"; skill=0.33333331; }; class Item2 { position[]={2622.1804,198.45259,5087.3818}; special="NONE"; id=53; side="GUER"; vehicle="UN_CDF_Soldier_AMG_EP1"; rank="CORPORAL"; skill=0.33333331; }; class Item3 { position[]={2624.1804,198.36938,5087.3818}; special="NONE"; id=54; side="GUER"; vehicle="UN_CDF_Soldier_MG_EP1"; rank="CORPORAL"; skill=0.33333331; }; }; }; class Item24 { side="GUER"; class Vehicles { items=4; class Item0 { position[]={2628.6926,198.57968,5078.6812}; special="NONE"; id=55; side="GUER"; vehicle="UN_CDF_Soldier_Guard_EP1"; leader=1; rank="SERGEANT"; skill=0.46666664; init="nul=[this,""area2"",""fortify""] execVM ""scripts\upsmon.sqf"";"; }; class Item1 { position[]={2625.906,198.78264,5076.4819}; special="NONE"; id=56; side="GUER"; vehicle="UN_CDF_Soldier_EP1"; rank="CORPORAL"; skill=0.33333331; }; class Item2 { position[]={2627.906,198.70903,5076.4819}; special="NONE"; id=57; side="GUER"; vehicle="UN_CDF_Soldier_AMG_EP1"; rank="CORPORAL"; skill=0.33333331; }; class Item3 { position[]={2629.906,198.63477,5076.4819}; special="NONE"; id=58; side="GUER"; vehicle="UN_CDF_Soldier_MG_EP1"; rank="CORPORAL"; skill=0.33333331; }; }; }; class Item25 { side="GUER"; class Vehicles { items=1; class Item0 { position[]={2493.7944,192.75079,5044.2139}; special="NONE"; id=59; side="GUER"; vehicle="TK_GUE_Soldier_2_EP1"; leader=1; skill=0.21220414; init="nul=[this,""area2""] execVM ""scripts\upsmon.sqf"";"; }; }; }; class Item26 { side="GUER"; class Vehicles { items=1; class Item0 { position[]={2517.8213,193.10341,5014.1885}; special="NONE"; id=60; side="GUER"; vehicle="TK_GUE_Soldier_2_EP1"; leader=1; skill=0.21220414; init="nul=[this,""area2""] execVM ""scripts\upsmon.sqf"";"; }; }; }; class Item27 { side="GUER"; class Vehicles { items=1; class Item0 { position[]={2536.5933,194.38348,5073.1929}; special="NONE"; id=61; side="GUER"; vehicle="TK_GUE_Soldier_5_EP1"; leader=1; skill=0.21220414; init="nul=[this,""area2""] execVM ""scripts\upsmon.sqf"";"; }; }; }; class Item28 { side="GUER"; class Vehicles { items=1; class Item0 { position[]={2488.5498,193.99101,5073.1929}; special="NONE"; id=62; side="GUER"; vehicle="TK_GUE_Soldier_EP1"; leader=1; skill=0.21220414; init="nul=[this,""area2""] execVM ""scripts\upsmon.sqf"";"; }; }; }; class Item29 { side="GUER"; class Vehicles { items=1; class Item0 { position[]={5138.0054,145.49675,6096.7749}; azimut=-12.785508; special="NONE"; id=63; side="GUER"; vehicle="UN_CDF_Soldier_Guard_EP1"; leader=1; skill=0.41395658; init="this setPos ((position this nearestObject 33393) buildingPos 1);"; }; }; }; class Item30 { side="GUER"; class Vehicles { items=1; class Item0 { position[]={5208.2271,144.54065,6119.7212}; azimut=26.296211; special="NONE"; id=64; side="GUER"; vehicle="UN_CDF_Soldier_Guard_EP1"; leader=1; skill=0.41395658; init="this setPos ((position this nearestObject 33639) buildingPos 1);"; }; }; }; class Item31 { side="GUER"; class Vehicles { items=1; class Item0 { position[]={5223.8613,145.47868,6050.9302}; azimut=122.81373; special="NONE"; id=65; side="GUER"; vehicle="UN_CDF_Soldier_Guard_EP1"; leader=1; skill=0.41395658; init="this setPos ((position this nearestObject 33685) buildingPos 1);"; }; }; }; class Item32 { side="GUER"; class Vehicles { items=1; class Item0 { position[]={5097.9136,145.39999,6024.543}; azimut=-154.7148; special="NONE"; id=66; side="GUER"; vehicle="UN_CDF_Soldier_Guard_EP1"; leader=1; skill=0.41395658; init="this setPos ((position this nearestObject 33724) buildingPos 1);"; }; }; }; class Item33 { side="GUER"; class Vehicles { items=1; class Item0 { position[]={5085.625,146.17783,6084.7632}; azimut=-69.629883; special="NONE"; id=67; side="GUER"; vehicle="UN_CDF_Soldier_Guard_EP1"; leader=1; skill=0.41395658; init="this setPos ((position this nearestObject 33412) buildingPos 1);"; }; }; }; class Item34 { side="GUER"; class Vehicles { items=4; class Item0 { position[]={5121.5786,145.39999,6045.3462}; azimut=73.385223; special="NONE"; id=68; side="GUER"; vehicle="UN_CDF_Soldier_Guard_EP1"; leader=1; rank="SERGEANT"; skill=0.46666664; init="nul=[this,""area4"",""nomove""] execVM ""scripts\upsmon.sqf"";"; }; class Item1 { position[]={5119.6748,145.39999,6046.8623}; azimut=73.385223; special="NONE"; id=69; side="GUER"; vehicle="UN_CDF_Soldier_EP1"; rank="CORPORAL"; skill=0.33333331; }; class Item2 { position[]={5120.2476,145.39999,6044.9487}; azimut=73.385223; special="NONE"; id=70; side="GUER"; vehicle="UN_CDF_Soldier_AMG_EP1"; rank="CORPORAL"; skill=0.33333331; }; class Item3 { position[]={5120.8188,145.39999,6043.0332}; azimut=73.385223; special="NONE"; id=71; side="GUER"; vehicle="UN_CDF_Soldier_MG_EP1"; rank="CORPORAL"; skill=0.33333331; }; }; }; class Item35 { side="GUER"; class Vehicles { items=4; class Item0 { position[]={5114.0264,145.4109,6075.4175}; azimut=73.385223; special="NONE"; id=72; side="GUER"; vehicle="UN_CDF_Soldier_Guard_EP1"; leader=1; rank="SERGEANT"; skill=0.46666664; init="nul=[this,""area4"",""nomove""] execVM ""scripts\upsmon.sqf"";"; }; class Item1 { position[]={5112.1226,145.43091,6076.9336}; azimut=73.385223; special="NONE"; id=73; side="GUER"; vehicle="UN_CDF_Soldier_EP1"; rank="CORPORAL"; skill=0.33333331; }; class Item2 { position[]={5112.6953,145.40985,6075.02}; azimut=73.385223; special="NONE"; id=74; side="GUER"; vehicle="UN_CDF_Soldier_AMG_EP1"; rank="CORPORAL"; skill=0.33333331; }; class Item3 { position[]={5113.2666,145.40697,6073.1045}; azimut=73.385223; special="NONE"; id=75; side="GUER"; vehicle="UN_CDF_Soldier_MG_EP1"; rank="CORPORAL"; skill=0.33333331; }; }; }; class Item36 { side="GUER"; class Vehicles { items=1; class Item0 { position[]={5172.0571,145.37689,6082.8799}; azimut=73.385223; special="NONE"; id=76; side="GUER"; vehicle="UN_CDF_Soldier_EP1"; leader=1; rank="CORPORAL"; skill=0.33333331; }; }; class Waypoints { items=2; class Item0 { position[]={5210.1431,145.39999,6093.0415}; combatMode="RED"; speed="LIMITED"; combat="SAFE"; class Effects { }; showWP="NEVER"; }; class Item1 { position[]={5172.1147,145.37752,6082.9058}; type="CYCLE"; class Effects { }; showWP="NEVER"; }; }; }; class Item37 { side="GUER"; class Vehicles { items=1; class Item0 { position[]={5166.522,145.38702,6056.7158}; azimut=-15.769395; special="NONE"; id=77; side="GUER"; vehicle="UN_CDF_Soldier_EP1"; leader=1; rank="CORPORAL"; skill=0.33333331; }; }; class Waypoints { items=2; class Item0 { position[]={5154.3145,145.32608,6107.4331}; combatMode="RED"; speed="LIMITED"; combat="SAFE"; class Effects { }; showWP="NEVER"; }; class Item1 { position[]={5166.501,145.38664,6056.7749}; type="CYCLE"; class Effects { }; showWP="NEVER"; }; }; }; class Item38 { side="GUER"; class Vehicles { items=1; class Item0 { position[]={5217.0127,145.40829,6072.3257}; azimut=265.82431; special="NONE"; id=78; side="GUER"; vehicle="UN_CDF_Soldier_EP1"; leader=1; rank="CORPORAL"; skill=0.33333331; }; }; class Waypoints { items=2; class Item0 { position[]={5177.561,145.39116,6064.3291}; combatMode="RED"; speed="LIMITED"; combat="SAFE"; class Effects { }; showWP="NEVER"; }; class Item1 { position[]={5216.73,145.41061,6072.2383}; type="CYCLE"; class Effects { }; showWP="NEVER"; }; }; }; class Item39 { side="GUER"; class Vehicles { items=4; class Item0 { position[]={5371.1553,140.3092,6276.0806}; special="NONE"; id=79; side="GUER"; vehicle="TK_GUE_Soldier_TL_EP1"; leader=1; rank="CORPORAL"; skill=0.31878984; init="nul=[this,""area4""] execVM ""scripts\upsmon.sqf"";"; }; class Item1 { position[]={5368.2988,140.45328,6273.3306}; special="NONE"; id=80; side="GUER"; vehicle="TK_GUE_Soldier_4_EP1"; skill=0.24265686; }; class Item2 { position[]={5371.1084,140.36189,6273.3315}; special="NONE"; id=81; side="GUER"; vehicle="TK_GUE_Soldier_EP1"; skill=0.20839763; }; class Item3 { position[]={5373.918,140.26102,6273.8223}; special="NONE"; id=82; side="GUER"; vehicle="TK_GUE_Bonesetter_EP1"; skill=0.2; }; }; }; class Item40 { side="GUER"; class Vehicles { items=4; class Item0 { position[]={5280.9038,146.10632,6188.6484}; special="NONE"; id=83; side="GUER"; vehicle="TK_GUE_Soldier_TL_EP1"; leader=1; rank="CORPORAL"; skill=0.31878984; init="nul=[this,""area4""] execVM ""scripts\upsmon.sqf"";"; }; class Item1 { position[]={5278.0474,146.01569,6185.8984}; special="NONE"; id=84; side="GUER"; vehicle="TK_GUE_Soldier_AT_EP1"; skill=0.3682763; }; class Item2 { position[]={5280.8569,146.05167,6185.8994}; special="NONE"; id=85; side="GUER"; vehicle="TK_GUE_Soldier_AAT_EP1"; skill=0.27311048; }; class Item3 { position[]={5283.6665,146.09753,6186.3901}; special="NONE"; id=86; side="GUER"; vehicle="TK_GUE_Bonesetter_EP1"; skill=0.2; }; }; }; class Item41 { side="GUER"; class Vehicles { items=4; class Item0 { position[]={5342.1348,153.15254,6097.4717}; special="NONE"; id=87; side="GUER"; vehicle="TK_GUE_Soldier_TL_EP1"; leader=1; rank="CORPORAL"; skill=0.31878984; init="nul=[this,""area4""] execVM ""scripts\upsmon.sqf"";"; }; class Item1 { position[]={5339.2783,153.58997,6094.7217}; special="NONE"; id=88; side="GUER"; vehicle="TK_GUE_Soldier_MG_EP1"; skill=0.24265686; }; class Item2 { position[]={5342.0879,154.15622,6094.7227}; special="NONE"; id=89; side="GUER"; vehicle="TK_GUE_Soldier_AR_EP1"; skill=0.30356348; }; class Item3 { position[]={5344.8975,154.14262,6095.2134}; special="NONE"; id=90; side="GUER"; vehicle="TK_GUE_Bonesetter_EP1"; skill=0.2; }; }; }; class Item42 { side="GUER"; class Vehicles { items=4; class Item0 { position[]={5482.0776,170.47772,6196.6001}; special="NONE"; id=91; side="GUER"; vehicle="TK_GUE_Soldier_TL_EP1"; leader=1; rank="CORPORAL"; skill=0.31878984; init="nul=[this,""area4""] execVM ""scripts\upsmon.sqf"";"; }; class Item1 { position[]={5479.2212,170.34166,6193.8501}; special="NONE"; id=92; side="GUER"; vehicle="TK_GUE_Soldier_Sniper_EP1"; skill=0.98114669; }; class Item2 { position[]={5482.0308,170.80533,6193.8511}; special="NONE"; id=93; side="GUER"; vehicle="TK_GUE_Soldier_5_EP1"; skill=0.50912243; }; class Item3 { position[]={5484.8403,170.88135,6194.3418}; special="NONE"; id=94; side="GUER"; vehicle="TK_GUE_Bonesetter_EP1"; skill=0.2; }; }; }; class Item43 { side="GUER"; class Vehicles { items=4; class Item0 { position[]={5386.1431,149.26546,6200.7476}; special="NONE"; id=95; side="GUER"; vehicle="TK_GUE_Soldier_TL_EP1"; leader=1; rank="CORPORAL"; skill=0.31878984; init="nul=[this,""area4""] execVM ""scripts\upsmon.sqf"";"; }; class Item1 { position[]={5383.2866,149.26071,6197.9976}; special="NONE"; id=96; side="GUER"; vehicle="TK_GUE_Soldier_HAT_EP1"; skill=0.53576928; }; class Item2 { position[]={5386.0962,149.96616,6197.9985}; special="NONE"; id=97; side="GUER"; vehicle="TK_GUE_Soldier_2_EP1"; skill=0.20839763; }; class Item3 { position[]={5388.9058,150.53577,6198.4893}; special="NONE"; id=98; side="GUER"; vehicle="TK_GUE_Bonesetter_EP1"; skill=0.2; }; }; }; class Item44 { side="GUER"; class Vehicles { items=2; class Item0 { position[]={3651.7681,152.49014,8586.3506}; special="NONE"; id=99; side="GUER"; vehicle="TK_GUE_Soldier_MG_EP1"; leader=1; skill=0.44821584; init="nul=[this,""area3""] execVM ""scripts\upsmon.sqf"";"; }; class Item1 { position[]={3652.1802,152.45287,8581.0801}; special="NONE"; id=107; side="GUER"; vehicle="TK_GUE_Soldier_AR_EP1"; skill=0.3340171; }; }; }; class Item45 { side="GUER"; class Vehicles { items=1; class Item0 { position[]={3642.8271,152.58983,8550.8604}; special="NONE"; id=100; side="GUER"; vehicle="TK_GUE_Soldier_EP1"; leader=1; skill=0.21220414; init="nul=[this,""area3""] execVM ""scripts\upsmon.sqf"";"; }; }; }; class Item46 { side="GUER"; class Vehicles { items=1; class Item0 { position[]={3676.7498,151.44075,8645.501}; special="NONE"; id=101; side="GUER"; vehicle="TK_GUE_Soldier_EP1"; leader=1; skill=0.21220414; init="nul=[this,""area3""] execVM ""scripts\upsmon.sqf"";"; }; }; }; class Item47 { side="GUER"; class Vehicles { items=1; class Item0 { position[]={3605.2234,155.65112,8471.4668}; special="NONE"; id=102; side="GUER"; vehicle="TK_GUE_Soldier_EP1"; leader=1; skill=0.21220414; init="nul=[this,""area3""] execVM ""scripts\upsmon.sqf"";"; }; }; }; class Item48 { side="GUER"; class Vehicles { items=2; class Item0 { position[]={3600.2268,153.82855,8526.6738}; special="NONE"; id=103; side="GUER"; vehicle="TK_GUE_Soldier_AT_EP1"; leader=1; skill=0.35685676; init="nul=[this,""area3""] execVM ""scripts\upsmon.sqf"";"; }; class Item1 { position[]={3599.5505,154.08734,8519.4961}; special="NONE"; id=106; side="GUER"; vehicle="TK_GUE_Soldier_AAT_EP1"; skill=0.29595014; }; }; }; class Item49 { side="GUER"; class Vehicles { items=2; class Item0 { position[]={3636.2529,151.4959,8646.0264}; special="NONE"; id=104; side="GUER"; vehicle="TK_GUE_Soldier_AT_EP1"; leader=1; skill=0.45582914; init="nul=[this,""area3""] execVM ""scripts\upsmon.sqf"";"; }; class Item1 { position[]={3636.0601,151.65582,8640.3652}; special="NONE"; id=105; side="GUER"; vehicle="TK_GUE_Soldier_AAT_EP1"; skill=0.29595014; }; }; }; class Item50 { side="GUER"; class Vehicles { items=4; class Item0 { position[]={5116.8433,145.39999,6059.8589}; azimut=73.385223; special="NONE"; id=108; side="GUER"; vehicle="UN_CDF_Soldier_Guard_EP1"; leader=1; rank="SERGEANT"; skill=0.46666664; init="nul=[this,""area4"",""nomove""] execVM ""scripts\upsmon.sqf"";"; }; class Item1 { position[]={5114.9395,145.39999,6061.375}; azimut=73.385223; special="NONE"; id=109; side="GUER"; vehicle="UN_CDF_Soldier_EP1"; rank="CORPORAL"; skill=0.33333331; }; class Item2 { position[]={5115.5122,145.39999,6059.4614}; azimut=73.385223; special="NONE"; id=110; side="GUER"; vehicle="UN_CDF_Soldier_AMG_EP1"; rank="CORPORAL"; skill=0.33333331; }; class Item3 { position[]={5116.0835,145.39999,6057.5459}; azimut=73.385223; special="NONE"; id=111; side="GUER"; vehicle="UN_CDF_Soldier_MG_EP1"; rank="CORPORAL"; skill=0.33333331; }; }; }; class Item51 { side="GUER"; class Vehicles { items=1; class Item0 { position[]={5932.0615,123.77737,7192.3643}; special="NONE"; id=112; side="GUER"; vehicle="TK_GUE_Soldier_2_EP1"; leader=1; skill=0.21220414; init="nul=[this,""area5""] execVM ""scripts\upsmon.sqf"";"; }; }; }; class Item52 { side="GUER"; class Vehicles { items=1; class Item0 { position[]={5985.4302,123.41756,7210.1489}; special="NONE"; id=113; side="GUER"; vehicle="TK_GUE_Soldier_EP1"; leader=1; skill=0.21220414; init="nul=[this,""area5""] execVM ""scripts\upsmon.sqf"";"; }; }; }; class Item53 { side="GUER"; class Vehicles { items=1; class Item0 { position[]={5908.3423,124.26906,7183.1758}; special="NONE"; id=114; side="GUER"; vehicle="TK_GUE_Soldier_5_EP1"; leader=1; skill=0.21220414; init="nul=[this,""area5""] execVM ""scripts\upsmon.sqf"";"; }; }; }; class Item54 { side="GUER"; class Vehicles { items=2; class Item0 { position[]={5878.3965,126.47414,7224.9692}; special="NONE"; id=115; side="GUER"; vehicle="TK_GUE_Soldier_AT_EP1"; leader=1; skill=0.38730949; init="nul=[this,""area5""] execVM ""scripts\upsmon.sqf"";"; }; class Item1 { position[]={5878.0171,126.82096,7219.1499}; special="NONE"; id=119; side="GUER"; vehicle="TK_GUE_Soldier_AAT_EP1"; skill=0.25027019; }; }; }; class Item55 { side="GUER"; class Vehicles { items=2; class Item0 { position[]={5888.7734,124.35926,7257.8701}; special="NONE"; id=116; side="GUER"; vehicle="TK_GUE_Soldier_MG_EP1"; leader=1; skill=0.41776311; init="nul=[this,""area5""] execVM ""scripts\upsmon.sqf"";"; }; class Item1 { position[]={5887.1851,124.41785,7251.5029}; special="NONE"; id=120; side="GUER"; vehicle="TK_GUE_Soldier_AR_EP1"; skill=0.29975668; }; }; }; class Item56 { side="GUER"; class Vehicles { items=2; class Item0 { position[]={5901.2261,123.54475,7285.7334}; special="NONE"; id=117; side="GUER"; vehicle="TK_GUE_Soldier_AT_EP1"; leader=1; skill=0.48247623; init="nul=[this,""area5""] execVM ""scripts\upsmon.sqf"";"; }; class Item1 { position[]={5899.2686,123.88122,7277.6899}; special="NONE"; id=118; side="GUER"; vehicle="TK_GUE_Soldier_AAT_EP1"; skill=0.25027019; }; }; }; class Item57 { side="GUER"; class Vehicles { items=1; class Item0 { position[]={5960.9194,123.67267,7203.1187}; special="NONE"; id=121; side="GUER"; vehicle="TK_GUE_Soldier_5_EP1"; leader=1; skill=0.21220414; init="nul=[this,""area5""] execVM ""scripts\upsmon.sqf"";"; }; }; }; class Item58 { side="GUER"; class Vehicles { items=2; class Item0 { position[]={5687.8579,82.027328,8949.4277}; special="NONE"; id=122; side="GUER"; vehicle="TK_GUE_Soldier_AT_EP1"; leader=1; skill=0.44440931; init="nul=[this,""area6""] execVM ""scripts\upsmon.sqf"";"; }; class Item1 { position[]={5687.2861,81.999779,8944.3213}; special="NONE"; id=127; side="GUER"; vehicle="TK_GUE_Soldier_AAT_EP1"; skill=0.33021057; }; }; }; class Item59 { side="GUER"; class Vehicles { items=2; class Item0 { position[]={5527.4497,81.587708,8917.6182}; special="NONE"; id=123; side="GUER"; vehicle="TK_GUE_Soldier_AT_EP1"; leader=1; skill=0.4710564; init="nul=[this,""area6""] execVM ""scripts\upsmon.sqf"";"; }; class Item1 { position[]={5527.8213,81.699158,8912.5996}; special="NONE"; id=128; side="GUER"; vehicle="TK_GUE_Soldier_AAT_EP1"; skill=0.33021057; }; }; }; class Item60 { side="GUER"; class Vehicles { items=3; class Item0 { position[]={5572.9429,87.409782,8816.667}; special="NONE"; id=124; side="GUER"; vehicle="TK_GUE_Soldier_4_EP1"; leader=1; skill=0.4710564; init="nul=[this,""area6""] execVM ""scripts\upsmon.sqf"";"; }; class Item1 { position[]={5570.291,87.602501,8815.0605}; special="NONE"; id=129; side="GUER"; vehicle="TK_GUE_Soldier_AR_EP1"; skill=0.36446983; }; class Item2 { position[]={5572.9844,87.647102,8814.1895}; special="NONE"; id=130; side="GUER"; vehicle="TK_GUE_Soldier_5_EP1"; skill=0.39873022; }; }; }; class Item61 { side="GUER"; class Vehicles { items=10; class Item0 { position[]={5615.543,81.910156,8890.8018}; special="NONE"; id=125; side="GUER"; vehicle="TK_GUE_Warlord_EP1"; leader=1; rank="LIEUTENANT"; skill=0.71848792; init="nul=[this,""area6"",""fortify""] execVM ""scripts\upsmon.sqf"";"; }; class Item1 { position[]={5612.3013,81.910004,8889.6162}; special="NONE"; id=137; side="GUER"; vehicle="TK_GUE_Soldier_MG_EP1"; rank="SERGEANT"; skill=0.48247623; }; class Item2 { position[]={5614.2568,81.910004,8888.0508}; special="NONE"; id=138; side="GUER"; vehicle="TK_GUE_Soldier_AR_EP1"; rank="CORPORAL"; skill=0.36446983; }; class Item3 { position[]={5615.6479,81.910004,8889.2686}; special="NONE"; id=139; side="GUER"; vehicle="TK_GUE_Soldier_AR_EP1"; rank="CORPORAL"; skill=0.36446983; }; class Item4 { position[]={5617.4736,81.910004,8888.2246}; special="NONE"; id=140; side="GUER"; vehicle="TK_GUE_Soldier_EP1"; skill=0.33021057; }; class Item5 { position[]={5618.4297,81.913361,8889.9199}; special="NONE"; id=141; side="GUER"; vehicle="TK_GUE_Soldier_EP1"; skill=0.33021057; }; class Item6 { position[]={5619.9463,81.911537,8888.46}; special="NONE"; id=142; side="GUER"; vehicle="TK_GUE_Soldier_2_EP1"; skill=0.33021057; }; class Item7 { position[]={5620.1606,81.914337,8890.208}; special="NONE"; id=143; side="GUER"; vehicle="TK_GUE_Soldier_2_EP1"; skill=0.33021057; }; class Item8 { position[]={5621.748,81.912186,8888.8643}; special="NONE"; id=144; side="GUER"; vehicle="TK_GUE_Soldier_5_EP1"; skill=0.24265686; }; class Item9 { position[]={5622.0972,81.914642,8890.9346}; special="NONE"; id=145; side="GUER"; vehicle="TK_GUE_Bonesetter_EP1"; skill=0.2; }; }; }; class Item62 { side="GUER"; class Vehicles { items=4; class Item0 { position[]={5688.6948,81.942474,8901.5459}; special="NONE"; id=126; side="GUER"; vehicle="TK_GUE_Soldier_TL_EP1"; leader=1; skill=0.51673549; init="nul=[this,""area6"",""fortify""] execVM ""scripts\upsmon.sqf"";"; }; class Item1 { position[]={5687.9399,81.939873,8899.9209}; special="NONE"; id=134; side="GUER"; vehicle="TK_GUE_Soldier_MG_EP1"; skill=0.44821584; }; class Item2 { position[]={5688.9995,81.940201,8900.126}; special="NONE"; id=135; side="GUER"; vehicle="TK_GUE_Soldier_2_EP1"; skill=0.34543693; }; class Item3 { position[]={5690.4355,81.94091,8900.5703}; special="NONE"; id=136; side="GUER"; vehicle="TK_GUE_Soldier_2_EP1"; skill=0.34543693; }; }; }; class Item63 { side="GUER"; class Vehicles { items=3; class Item0 { position[]={5714.8115,83.861809,8851.4883}; special="NONE"; id=131; side="GUER"; vehicle="TK_GUE_Soldier_4_EP1"; leader=1; skill=0.4710564; init="nul=[this,""area6""] execVM ""scripts\upsmon.sqf"";"; }; class Item1 { position[]={5712.1597,83.813713,8849.8818}; special="NONE"; id=132; side="GUER"; vehicle="TK_GUE_Soldier_AR_EP1"; skill=0.36446983; }; class Item2 { position[]={5714.853,84.029533,8849.0107}; special="NONE"; id=133; side="GUER"; vehicle="TK_GUE_Soldier_5_EP1"; skill=0.39873022; }; }; }; class Item64 { side="GUER"; class Vehicles { items=2; class Item0 { position[]={3081.9658,60.740948,9952.8711}; special="NONE"; id=146; side="GUER"; vehicle="TK_GUE_Soldier_AT_EP1"; leader=1; skill=0.41014975; init="nul=[this,""area7""] execVM ""scripts\upsmon.sqf"";"; }; class Item1 { position[]={3084.7253,60.524788,9946.916}; special="NONE"; id=155; side="GUER"; vehicle="TK_GUE_Soldier_AAT_EP1"; skill=0.30356348; }; }; }; class Item65 { side="GUER"; class Vehicles { items=2; class Item0 { position[]={3095.0491,60.439999,9879.4854}; special="NONE"; id=147; side="GUER"; vehicle="TK_GUE_Soldier_AT_EP1"; leader=1; skill=0.40634328; init="nul=[this,""area7""] execVM ""scripts\upsmon.sqf"";"; }; class Item1 { position[]={3096.1533,60.439999,9874.1025}; special="NONE"; id=156; side="GUER"; vehicle="TK_GUE_Soldier_AAT_EP1"; skill=0.25407669; }; }; }; class Item66 { side="GUER"; class Vehicles { items=2; class Item0 { position[]={3039.3066,60.439999,9858.2666}; special="NONE"; id=148; side="GUER"; vehicle="TK_GUE_Soldier_4_EP1"; leader=1; skill=0.48247623; init="nul=[this,""area7""] execVM ""scripts\upsmon.sqf"";"; }; class Item1 { position[]={3043.0469,60.439999,9851.3477}; special="NONE"; id=158; side="GUER"; vehicle="TK_GUE_Soldier_3_EP1"; skill=0.33782363; }; }; }; class Item67 { side="GUER"; class Vehicles { items=1; class Item0 { position[]={2981.9321,60.293419,9858.2666}; special="NONE"; id=149; side="GUER"; vehicle="TK_GUE_Soldier_EP1"; leader=1; skill=0.21220414; init="nul=[this,""area7""] execVM ""scripts\upsmon.sqf"";"; }; }; }; class Item68 { side="GUER"; class Vehicles { items=1; class Item0 { position[]={2927.123,59.487614,9844.5098}; special="NONE"; id=150; side="GUER"; vehicle="TK_GUE_Soldier_EP1"; leader=1; skill=0.21220414; init="nul=[this,""area7""] execVM ""scripts\upsmon.sqf"";"; }; }; }; class Item69 { side="GUER"; class Vehicles { items=2; class Item0 { position[]={3009.9197,62.232006,9953.6299}; special="NONE"; id=151; side="GUER"; vehicle="TK_GUE_Soldier_MG_EP1"; leader=1; skill=0.39873022; init="nul=[this,""area7""] execVM ""scripts\upsmon.sqf"";"; }; class Item1 { position[]={3012.2888,61.712551,9949.1377}; special="NONE"; id=157; side="GUER"; vehicle="TK_GUE_Soldier_AR_EP1"; skill=0.29595014; }; }; }; class Item70 { side="GUER"; class Vehicles { items=2; class Item0 { position[]={2965.3728,63.551025,9949.2002}; special="NONE"; id=152; side="GUER"; vehicle="TK_GUE_Soldier_HAT_EP1"; leader=1; skill=0.45582914; init="nul=[this,""area7""] execVM ""scripts\upsmon.sqf"";"; }; class Item1 { position[]={2967.3066,63.390026,9946.5547}; special="NONE"; id=159; side="GUER"; vehicle="TK_GUE_Soldier_3_EP1"; skill=0.35685676; }; }; }; class Item71 { side="GUER"; class Vehicles { items=1; class Item0 { position[]={2921.5259,63.306969,9943.6035}; special="NONE"; id=153; side="GUER"; vehicle="TK_GUE_Soldier_5_EP1"; leader=1; skill=0.21220414; init="nul=[this,""area7""] execVM ""scripts\upsmon.sqf"";"; }; }; }; class Item72 { side="GUER"; class Vehicles { items=1; class Item0 { position[]={2880.4773,65.642998,9943.6035}; special="NONE"; id=154; side="GUER"; vehicle="TK_GUE_Soldier_5_EP1"; leader=1; skill=0.21220414; init="nul=[this,""area7""] execVM ""scripts\upsmon.sqf"";"; }; }; }; class Item73 { side="GUER"; class Vehicles { items=1; class Item0 { position[]={4132.7861,25.067764,11750.873}; special="NONE"; id=160; side="GUER"; vehicle="TK_GUE_Soldier_AR_EP1"; leader=1; skill=0.50150913; init="nul=[this,""area8""] execVM ""scripts\upsmon.sqf"";"; }; }; }; class Item74 { side="GUER"; class Vehicles { items=1; class Item0 { position[]={4126.5596,22.236931,11803.041}; special="NONE"; id=161; side="GUER"; vehicle="TK_GUE_Soldier_EP1"; leader=1; skill=0.30356348; init="nul=[this,""area8""] execVM ""scripts\upsmon.sqf"";"; }; }; }; class Item75 { side="GUER"; class Vehicles { items=1; class Item0 { position[]={4222.623,38.257515,11817.269}; special="NONE"; id=162; side="GUER"; vehicle="TK_GUE_Soldier_AT_EP1"; leader=1; skill=0.48628277; init="nul=[this,""area8""] execVM ""scripts\upsmon.sqf"";"; }; }; }; class Item76 { side="GUER"; class Vehicles { items=1; class Item0 { position[]={4210.9551,35.388187,11777.309}; special="NONE"; id=163; side="GUER"; vehicle="TK_GUE_Soldier_3_EP1"; leader=1; skill=0.34543693; init="nul=[this,""area8""] execVM ""scripts\upsmon.sqf"";"; }; }; }; class Item77 { side="GUER"; class Vehicles { items=1; class Item0 { position[]={4166.5562,27.140772,11752.731}; special="NONE"; id=164; side="GUER"; vehicle="TK_GUE_Soldier_5_EP1"; leader=1; skill=0.28072381; init="nul=[this,""area8""] execVM ""scripts\upsmon.sqf"";"; }; }; }; class Item78 { side="GUER"; class Vehicles { items=1; class Item0 { position[]={4119.5894,20.190264,11817.659}; special="NONE"; id=165; side="GUER"; vehicle="TK_GUE_Soldier_2_EP1"; leader=1; skill=0.30737001; init="nul=[this,""area8""] execVM ""scripts\upsmon.sqf"";"; }; }; }; class Item79 { side="GUER"; class Vehicles { items=4; class Item0 { position[]={6231.1943,60.632076,11347.157}; special="NONE"; id=166; side="GUER"; vehicle="TK_GUE_Soldier_TL_EP1"; leader=1; rank="CORPORAL"; skill=0.46724993; init="nul=[this,""area9""] execVM ""scripts\upsmon.sqf"";"; }; class Item1 { position[]={6223.25,60.646366,11344.22}; special="NONE"; id=184; side="GUER"; vehicle="TK_GUE_Soldier_EP1"; skill=0.4710564; }; class Item2 { position[]={6229.3779,60.604012,11343.126}; special="NONE"; id=185; side="GUER"; vehicle="TK_GUE_Soldier_3_EP1"; skill=0.39492342; }; class Item3 { position[]={6234.9219,60.633259,11344.631}; special="NONE"; id=186; side="GUER"; vehicle="TK_GUE_Soldier_2_EP1"; skill=0.32640377; }; }; }; class Item80 { side="GUER"; class Vehicles { items=4; class Item0 { position[]={6323.1846,60.493141,11289.506}; special="NONE"; id=167; side="GUER"; vehicle="TK_GUE_Soldier_TL_EP1"; leader=1; rank="CORPORAL"; skill=0.46724993; init="nul=[this,""area9""] execVM ""scripts\upsmon.sqf"";"; }; class Item1 { position[]={6321.5264,60.475533,11288.193}; special="NONE"; id=178; side="GUER"; vehicle="TK_GUE_Soldier_4_EP1"; skill=0.52434969; }; class Item2 { position[]={6323.3384,60.477642,11287.809}; special="NONE"; id=179; side="GUER"; vehicle="TK_GUE_Soldier_3_EP1"; skill=0.42537645; }; class Item3 { position[]={6325.2275,60.49213,11288.926}; special="NONE"; id=180; side="GUER"; vehicle="TK_GUE_Soldier_2_EP1"; skill=0.37208313; }; }; }; class Item81 { side="GUER"; class Vehicles { items=4; class Item0 { position[]={6270.4165,59.7313,11206.984}; special="NONE"; id=168; side="GUER"; vehicle="TK_GUE_Soldier_TL_EP1"; leader=1; rank="CORPORAL"; skill=0.46724993; init="nul=[this,""area9""] execVM ""scripts\upsmon.sqf"";"; }; class Item1 { position[]={6266.6577,59.713291,11204.166}; special="NONE"; id=172; side="GUER"; vehicle="TK_GUE_Soldier_AT_EP1"; skill=0.38350296; }; class Item2 { position[]={6270.5386,59.732426,11203.85}; special="NONE"; id=173; side="GUER"; vehicle="TK_GUE_Soldier_HAT_EP1"; skill=0.38350296; }; class Item3 { position[]={6274.1821,59.768269,11205.038}; special="NONE"; id=174; side="GUER"; vehicle="TK_GUE_Soldier_AAT_EP1"; skill=0.29595014; }; }; }; class Item82 { side="GUER"; class Vehicles { items=4; class Item0 { position[]={6170.1572,59.951412,11245.419}; special="NONE"; id=169; side="GUER"; vehicle="TK_GUE_Soldier_TL_EP1"; leader=1; rank="CORPORAL"; skill=0.46724993; init="nul=[this,""area9""] execVM ""scripts\upsmon.sqf"";"; }; class Item1 { position[]={6167.7705,59.968941,11244.585}; special="NONE"; id=181; side="GUER"; vehicle="TK_GUE_Soldier_Sniper_EP1"; skill=0.85552722; }; class Item2 { position[]={6169.6333,59.952003,11243.459}; special="NONE"; id=182; side="GUER"; vehicle="TK_GUE_Soldier_5_EP1"; skill=0.70326155; }; class Item3 { position[]={6173.4077,59.923759,11244.39}; special="NONE"; id=183; side="GUER"; vehicle="TK_GUE_Bonesetter_EP1"; skill=0.70326155; }; }; }; class Item83 { side="GUER"; class Vehicles { items=4; class Item0 { position[]={6118.519,60.171177,11162.521}; special="NONE"; id=170; side="GUER"; vehicle="TK_GUE_Soldier_TL_EP1"; leader=1; rank="CORPORAL"; skill=0.46724993; init="nul=[this,""area9""] execVM ""scripts\upsmon.sqf"";"; }; class Item1 { position[]={6116.1924,60.188942,11161.111}; special="NONE"; id=187; side="GUER"; vehicle="TK_GUE_Soldier_AR_EP1"; skill=0.53576928; }; class Item2 { position[]={6118.79,60.180363,11160.327}; special="NONE"; id=188; side="GUER"; vehicle="TK_GUE_Soldier_AT_EP1"; skill=0.37588966; }; class Item3 { position[]={6120.9956,60.166019,11161.65}; special="NONE"; id=189; side="GUER"; vehicle="TK_GUE_Soldier_AAT_EP1"; skill=0.27311048; }; }; }; class Item84 { side="GUER"; class Vehicles { items=4; class Item0 { position[]={6214.2563,60.711159,11117.304}; special="NONE"; id=171; side="GUER"; vehicle="TK_GUE_Soldier_TL_EP1"; leader=1; rank="CORPORAL"; skill=0.46724993; init="nul=[this,""area9""] execVM ""scripts\upsmon.sqf"";"; }; class Item1 { position[]={6212.2417,60.824203,11116.154}; special="NONE"; id=175; side="GUER"; vehicle="TK_GUE_Soldier_MG_EP1"; skill=0.52434969; }; class Item2 { position[]={6213.9805,60.779213,11115.72}; special="NONE"; id=176; side="GUER"; vehicle="TK_GUE_Soldier_AR_EP1"; skill=0.41776311; }; class Item3 { position[]={6216.0669,60.70681,11116.197}; special="NONE"; id=177; side="GUER"; vehicle="TK_GUE_Bonesetter_EP1"; skill=0.5053156; }; }; }; class Item85 { side="WEST"; class Vehicles { items=1; class Item0 { position[]={5997.8286,96.030525,11544.729}; azimut=45; special="NONE"; id=190; side="WEST"; vehicle="US_Soldier_Officer_EP1"; leader=1; rank="COLONEL"; skill=1; text="general"; init="this setPosATL [5996.36,11545.2,9.11144];this setDir 44.7338;"; }; }; }; class Item86 { side="WEST"; class Vehicles { items=1; class Item0 { position[]={6000.6377,92.161774,11542.294}; azimut=313; special="NONE"; id=191; side="WEST"; vehicle="US_Soldier_Pilot_EP1"; leader=1; rank="SERGEANT"; skill=0.54338259; init="this setPosATL [5993.53,11544.6,9.11144];this setDir 313.232;"; }; }; }; class Item87 { side="WEST"; class Vehicles { items=1; class Item0 { position[]={6002.9038,87.801262,11540.905}; azimut=139; special="NONE"; id=192; side="WEST"; vehicle="US_Soldier_Marksman_EP1"; leader=1; rank="SERGEANT"; skill=0.71848792; init="this setPosATL [5996.87,11542,12.9901];this setDir 138.847; this setUnitPos ""Middle"";"; }; }; }; class Item88 { side="WEST"; class Vehicles { items=1; class Item0 { position[]={6146.5518,79.704063,11450.623}; azimut=137.59476; special="NONE"; id=193; side="WEST"; vehicle="US_Soldier_EP1"; leader=1; skill=0.26169091; init="this setPos ((position this nearestObject 655) buildingPos 1);"; }; }; }; class Item89 { side="WEST"; class Vehicles { items=1; class Item0 { position[]={6089.4902,79.234421,11398.537}; azimut=147.642; special="NONE"; id=194; side="WEST"; vehicle="US_Soldier_EP1"; leader=1; skill=0.26169091; init="this setPos ((position this nearestObject 1214) buildingPos 1);"; }; }; }; class Item90 { side="WEST"; class Vehicles { items=1; class Item0 { position[]={6054.5771,83.022369,11503.027}; azimut=-68.173828; special="NONE"; id=195; side="WEST"; vehicle="US_Soldier_EP1"; leader=1; skill=0.26169091; init="this setPos ((position this nearestObject 1160) buildingPos 1);"; }; }; }; class Item91 { side="WEST"; class Vehicles { items=1; class Item0 { position[]={6120.5664,83.040001,11565.667}; azimut=17.309807; special="NONE"; id=196; side="WEST"; vehicle="US_Soldier_EP1"; leader=1; skill=0.26169091; init="this setPos ((position this nearestObject 218) buildingPos 1);"; }; }; }; class Item92 { side="WEST"; class Vehicles { items=1; class Item0 { position[]={6154.2393,82.776306,11529.905}; azimut=105.46926; special="NONE"; id=197; side="WEST"; vehicle="US_Soldier_EP1"; leader=1; skill=0.26169091; init="this setPos ((position this nearestObject 570) buildingPos 1);"; }; }; }; class Item93 { side="WEST"; class Vehicles { items=1; class Item0 { position[]={5990.1729,82.844048,11333.309}; azimut=55.613674; special="NONE"; id=198; side="WEST"; vehicle="US_Soldier_EP1"; leader=1; skill=0.26169091; init="this setPos ((position this nearestObject 728) buildingPos 1);"; }; }; }; class Item94 { side="WEST"; class Vehicles { items=1; class Item0 { position[]={5983.6548,82.123749,11298.619}; azimut=-206.31697; special="NONE"; id=199; side="WEST"; vehicle="US_Soldier_EP1"; leader=1; skill=0.26169091; init="this setPos ((position this nearestObject 2579) buildingPos 1);"; }; }; }; class Item95 { side="WEST"; class Vehicles { items=1; class Item0 { position[]={5795.4365,81.794853,11157.656}; special="NONE"; id=200; side="WEST"; vehicle="US_Soldier_EP1"; leader=1; skill=0.26169091; init="this setPos ((position this nearestObject 1091) buildingPos 1);"; }; }; }; class Item96 { side="WEST"; class Vehicles { items=4; class Item0 { position[]={6104.2881,83.040001,11535.385}; special="NONE"; id=201; side="WEST"; vehicle="US_Soldier_GL_EP1"; leader=1; rank="CORPORAL"; skill=0.42156962; init="nul=[this,""base"",""fortify""] execVM ""scripts\upsmon.sqf"";"; }; class Item1 { position[]={6102.2051,83.040001,11533.769}; special="NONE"; id=202; side="WEST"; vehicle="US_Soldier_AR_EP1"; skill=0.3416301; }; class Item2 { position[]={6104.6753,83.040001,11533.057}; special="NONE"; id=203; side="WEST"; vehicle="US_Soldier_EP1"; skill=0.3416301; }; class Item3 { position[]={6106.7734,83.040001,11534.308}; special="NONE"; id=204; side="WEST"; vehicle="US_Soldier_Medic_EP1"; skill=0.28072381; }; }; }; class Item97 { side="WEST"; class Vehicles { items=4; class Item0 { position[]={6121.1968,83.038551,11517.845}; special="NONE"; id=205; side="WEST"; vehicle="US_Soldier_GL_EP1"; leader=1; rank="CORPORAL"; skill=0.42156962; init="nul=[this,""base"",""fortify""] execVM ""scripts\upsmon.sqf"";"; }; class Item1 { position[]={6119.1138,83.039421,11516.229}; special="NONE"; id=206; side="WEST"; vehicle="US_Soldier_AR_EP1"; skill=0.3416301; }; class Item2 { position[]={6121.584,83.035469,11515.517}; special="NONE"; id=207; side="WEST"; vehicle="US_Soldier_EP1"; skill=0.3416301; }; class Item3 { position[]={6123.6821,83.036827,11516.768}; special="NONE"; id=208; side="WEST"; vehicle="US_Soldier_Medic_EP1"; skill=0.28072381; }; }; }; class Item98 { side="WEST"; class Vehicles { items=1; class Item0 { position[]={6282.8052,82.32077,11742.775}; azimut=135.043; special="NONE"; id=209; side="WEST"; vehicle="US_Soldier_EP1"; leader=1; skill=0.26169091; init="this setPos ((position this nearestObject 2012) buildingPos 1);"; }; }; }; class Item99 { side="WEST"; class Vehicles { items=7; class Item0 { position[]={5824.0996,82.865044,11222.473}; azimut=43.427849; special="NONE"; id=210; side="WEST"; vehicle="M6_EP1"; skill=0.75274807; }; class Item1 { position[]={5837.6162,82.920959,11227.781}; special="CARGO"; id=211; side="WEST"; vehicle="US_Soldier_SL_EP1"; leader=1; rank="LIEUTENANT"; skill=0.51292896; init="nul=[this,""base"",""onroad""] execVM ""scripts\upsmon.sqf"";"; }; class Item2 { position[]={5834.8438,82.913567,11226.726}; special="CARGO"; id=212; side="WEST"; vehicle="US_Soldier_MG_EP1"; rank="SERGEANT"; skill=0.45582914; }; class Item3 { position[]={5836.5571,82.90155,11225.896}; special="CARGO"; id=213; side="WEST"; vehicle="US_Soldier_GL_EP1"; rank="SERGEANT"; skill=0.45582914; }; class Item4 { position[]={5838.6567,82.897568,11225.842}; special="CARGO"; id=214; side="WEST"; vehicle="US_Soldier_AR_EP1"; rank="CORPORAL"; skill=0.45582914; }; class Item5 { position[]={5839.9468,82.899887,11226.232}; special="CARGO"; id=215; side="WEST"; vehicle="US_Soldier_AMG_EP1"; skill=0.28453031; }; class Item6 { position[]={5840.0303,82.912605,11227.381}; special="CARGO"; id=216; side="WEST"; vehicle="US_Soldier_AAR_EP1"; skill=0.23123701; }; }; }; class Item100 { side="WEST"; class Vehicles { items=3; class Item0 { position[]={6030.647,83.040001,11501.977}; azimut=45.145145; special="NONE"; id=217; side="WEST"; vehicle="HMMWV_M998_crows_M2_DES_EP1"; skill=0.60428894; }; class Item1 { position[]={6033.4512,83.040001,11503.957}; special="CARGO"; id=218; side="WEST"; vehicle="US_Soldier_Engineer_EP1"; leader=1; rank="CORPORAL"; skill=0.48628277; init="nul=[this,""base"",""onroad""] execVM ""scripts\upsmon.sqf"";"; }; class Item2 { position[]={6034.0962,83.040001,11502.988}; special="CARGO"; id=219; side="WEST"; vehicle="US_Soldier_Engineer_EP1"; skill=0.3416301; }; }; }; class Item101 { side="WEST"; class Vehicles { items=3; class Item0 { position[]={6228.2324,83.040001,11722.304}; azimut=-40.771; special="NONE"; id=220; side="WEST"; vehicle="HMMWV_M998_crows_MK19_DES_EP1"; skill=0.60428894; }; class Item1 { position[]={6236.2964,83.040001,11712.898}; special="CARGO"; id=221; side="WEST"; vehicle="US_Soldier_Engineer_EP1"; leader=1; rank="CORPORAL"; skill=0.48628277; init="nul=[this,""base"",""onroad""] execVM ""scripts\upsmon.sqf"";"; }; class Item2 { position[]={6236.9414,83.040001,11711.93}; special="CARGO"; id=222; side="WEST"; vehicle="US_Soldier_Engineer_EP1"; skill=0.3416301; }; }; }; class Item102 { side="WEST"; class Vehicles { items=1; class Item0 { position[]={5265.2041,83.040001,11007.152}; azimut=-45; special="NONE"; id=231; side="WEST"; vehicle="AH64D_EP1"; leader=1; rank="LIEUTENANT"; skill=0.81365466; text="h1"; }; }; }; class Item103 { side="WEST"; class Vehicles { items=1; class Item0 { position[]={6041.0005,83.040001,11785.434}; azimut=-45; special="NONE"; id=232; side="WEST"; vehicle="AH64D_EP1"; leader=1; rank="LIEUTENANT"; skill=0.81365466; text="h2"; }; }; }; class Item104 { side="WEST"; class Vehicles { items=21; class Item0 { position[]={5607.7085,83.040001,11331.724}; special="CARGO"; id=241; side="WEST"; vehicle="US_Soldier_SL_EP1"; leader=1; rank="CAPTAIN"; skill=0.59999996; text="h3"; }; class Item1 { position[]={5610.7085,83.040001,11326.724}; special="CARGO"; id=242; side="WEST"; vehicle="US_Soldier_TL_EP1"; rank="SERGEANT"; skill=0.46666664; }; class Item2 { position[]={5612.7085,83.040001,11326.724}; special="CARGO"; id=243; side="WEST"; vehicle="US_Soldier_GL_EP1"; rank="SERGEANT"; skill=0.46666664; }; class Item3 { position[]={5614.7085,83.040001,11326.724}; special="CARGO"; id=244; side="WEST"; vehicle="US_Soldier_AR_EP1"; rank="CORPORAL"; skill=0.33333331; }; class Item4 { position[]={5616.7085,83.040001,11326.724}; special="CARGO"; id=245; side="WEST"; vehicle="US_Soldier_AT_EP1"; rank="CORPORAL"; skill=0.33333331; }; class Item5 { position[]={5618.7085,83.040001,11326.724}; special="CARGO"; id=246; side="WEST"; vehicle="US_Soldier_TL_EP1"; rank="CORPORAL"; skill=0.33333331; }; class Item6 { position[]={5620.7085,83.040001,11326.724}; special="CARGO"; id=247; side="WEST"; vehicle="US_Soldier_GL_EP1"; skill=0.2; }; class Item7 { position[]={5622.7085,83.040001,11326.724}; special="CARGO"; id=248; side="WEST"; vehicle="US_Soldier_AR_EP1"; skill=0.2; }; class Item8 { position[]={5624.7085,83.040001,11326.724}; special="CARGO"; id=249; side="WEST"; vehicle="US_Soldier_AAR_EP1"; skill=0.2; }; class Item9 { position[]={5626.6602,83.040001,11326.837}; special="CARGO"; id=234; side="WEST"; vehicle="US_Soldier_MG_EP1"; rank="SERGEANT"; skill=0.46666664; }; class Item10 { position[]={5628.6602,83.040001,11326.837}; special="CARGO"; id=235; side="WEST"; vehicle="US_Soldier_GL_EP1"; rank="SERGEANT"; skill=0.46666664; }; class Item11 { position[]={5630.6602,83.040001,11326.837}; special="CARGO"; id=236; side="WEST"; vehicle="US_Soldier_AMG_EP1"; rank="CORPORAL"; skill=0.33333331; }; class Item12 { position[]={5632.6602,83.040001,11326.837}; special="CARGO"; id=237; side="WEST"; vehicle="US_Soldier_MG_EP1"; rank="CORPORAL"; skill=0.33333331; }; class Item13 { position[]={5634.6602,83.040001,11326.837}; special="CARGO"; id=238; side="WEST"; vehicle="US_Soldier_GL_EP1"; rank="CORPORAL"; skill=0.33333331; }; class Item14 { position[]={5636.6602,83.040001,11326.837}; special="CARGO"; id=239; side="WEST"; vehicle="US_Soldier_AMG_EP1"; skill=0.2; }; class Item15 { position[]={5638.6602,83.040001,11326.837}; special="CARGO"; id=240; side="WEST"; vehicle="US_Soldier_LAT_EP1"; skill=0.2; }; class Item16 { position[]={5641.4434,83.040001,11327.095}; special="CARGO"; id=250; side="WEST"; vehicle="US_Soldier_Engineer_EP1"; skill=0.28833711; }; class Item17 { position[]={5644.3447,83.040001,11327.236}; special="CARGO"; id=251; side="WEST"; vehicle="US_Soldier_Engineer_EP1"; skill=0.28833711; }; class Item18 { position[]={5646.4653,83.040001,11327.275}; special="CARGO"; id=252; side="WEST"; vehicle="US_Soldier_Medic_EP1"; skill=0.21981747; }; class Item19 { position[]={5649.4722,83.040001,11327.082}; special="CARGO"; id=253; side="WEST"; vehicle="US_Soldier_EP1"; skill=0.2; }; class Item20 { position[]={5597.2544,83.040001,11340.004}; azimut=-45; special="NONE"; id=233; side="WEST"; vehicle="CH_47F_EP1"; rank="LIEUTENANT"; skill=0.73333329; text="ch1"; }; }; }; class Item105 { side="WEST"; class Vehicles { items=21; class Item0 { position[]={5719.4575,83.040001,11444.38}; special="CARGO"; id=262; side="WEST"; vehicle="US_Soldier_SL_EP1"; leader=1; rank="CAPTAIN"; skill=0.59999996; text="h4"; }; class Item1 { position[]={5722.4575,83.040001,11439.38}; special="CARGO"; id=263; side="WEST"; vehicle="US_Soldier_TL_EP1"; rank="SERGEANT"; skill=0.46666664; }; class Item2 { position[]={5724.4575,83.040001,11439.38}; special="CARGO"; id=264; side="WEST"; vehicle="US_Soldier_GL_EP1"; rank="SERGEANT"; skill=0.46666664; }; class Item3 { position[]={5726.4575,83.040001,11439.38}; special="CARGO"; id=265; side="WEST"; vehicle="US_Soldier_AR_EP1"; rank="CORPORAL"; skill=0.33333331; }; class Item4 { position[]={5728.4575,83.040001,11439.38}; special="CARGO"; id=266; side="WEST"; vehicle="US_Soldier_AT_EP1"; rank="CORPORAL"; skill=0.33333331; }; class Item5 { position[]={5730.4575,83.040001,11439.38}; special="CARGO"; id=267; side="WEST"; vehicle="US_Soldier_TL_EP1"; rank="CORPORAL"; skill=0.33333331; }; class Item6 { position[]={5732.4575,83.040001,11439.38}; special="CARGO"; id=268; side="WEST"; vehicle="US_Soldier_GL_EP1"; skill=0.2; }; class Item7 { position[]={5734.4575,83.040001,11439.38}; special="CARGO"; id=269; side="WEST"; vehicle="US_Soldier_AR_EP1"; skill=0.2; }; class Item8 { position[]={5736.4575,83.040001,11439.38}; special="CARGO"; id=270; side="WEST"; vehicle="US_Soldier_AAR_EP1"; skill=0.2; }; class Item9 { position[]={5738.4092,83.040001,11439.493}; special="CARGO"; id=255; side="WEST"; vehicle="US_Soldier_MG_EP1"; rank="SERGEANT"; skill=0.46666664; }; class Item10 { position[]={5740.4092,83.040001,11439.493}; special="CARGO"; id=256; side="WEST"; vehicle="US_Soldier_GL_EP1"; rank="SERGEANT"; skill=0.46666664; }; class Item11 { position[]={5742.4092,83.040001,11439.493}; special="CARGO"; id=257; side="WEST"; vehicle="US_Soldier_AMG_EP1"; rank="CORPORAL"; skill=0.33333331; }; class Item12 { position[]={5744.4092,83.040001,11439.493}; special="CARGO"; id=258; side="WEST"; vehicle="US_Soldier_MG_EP1"; rank="CORPORAL"; skill=0.33333331; }; class Item13 { position[]={5746.4092,83.040001,11439.493}; special="CARGO"; id=259; side="WEST"; vehicle="US_Soldier_GL_EP1"; rank="CORPORAL"; skill=0.33333331; }; class Item14 { position[]={5748.4092,83.040001,11439.493}; special="CARGO"; id=260; side="WEST"; vehicle="US_Soldier_AMG_EP1"; skill=0.2; }; class Item15 { position[]={5750.4092,83.040001,11439.493}; special="CARGO"; id=261; side="WEST"; vehicle="US_Soldier_LAT_EP1"; skill=0.2; }; class Item16 { position[]={5753.1924,83.040001,11439.751}; special="CARGO"; id=271; side="WEST"; vehicle="US_Soldier_Engineer_EP1"; skill=0.28833711; }; class Item17 { position[]={5756.0938,83.040001,11439.893}; special="CARGO"; id=272; side="WEST"; vehicle="US_Soldier_Engineer_EP1"; skill=0.28833711; }; class Item18 { position[]={5758.2144,83.040001,11439.932}; special="CARGO"; id=273; side="WEST"; vehicle="US_Soldier_Medic_EP1"; skill=0.21981747; }; class Item19 { position[]={5761.2212,83.040001,11439.738}; special="CARGO"; id=274; side="WEST"; vehicle="US_Soldier_EP1"; skill=0.2; }; class Item20 { position[]={5709.0034,83.040001,11452.66}; azimut=-45; special="NONE"; id=254; side="WEST"; vehicle="CH_47F_EP1"; rank="LIEUTENANT"; skill=0.73333329; text="ch2"; }; }; }; class Item106 { side="WEST"; class Vehicles { items=10; class Item0 { position[]={5829.7207,83.040001,11561.67}; special="CARGO"; id=276; side="WEST"; vehicle="US_Soldier_SL_EP1"; leader=1; rank="CAPTAIN"; skill=0.59999996; text="h5"; }; class Item1 { position[]={5832.7207,83.040001,11556.67}; special="CARGO"; id=277; side="WEST"; vehicle="US_Soldier_TL_EP1"; rank="SERGEANT"; skill=0.46666664; }; class Item2 { position[]={5834.7207,83.040001,11556.67}; special="CARGO"; id=278; side="WEST"; vehicle="US_Soldier_GL_EP1"; rank="SERGEANT"; skill=0.46666664; }; class Item3 { position[]={5836.7207,83.040001,11556.67}; special="CARGO"; id=279; side="WEST"; vehicle="US_Soldier_MG_EP1"; rank="CORPORAL"; skill=0.33333331; }; class Item4 { position[]={5838.7207,83.040001,11556.67}; special="CARGO"; id=280; side="WEST"; vehicle="US_Soldier_AT_EP1"; rank="CORPORAL"; skill=0.33333331; }; class Item5 { position[]={5840.7207,83.040001,11556.67}; special="CARGO"; id=281; side="WEST"; vehicle="US_Soldier_TL_EP1"; rank="CORPORAL"; skill=0.33333331; }; class Item6 { position[]={5842.7207,83.040001,11556.67}; special="CARGO"; id=282; side="WEST"; vehicle="US_Soldier_GL_EP1"; skill=0.2; }; class Item7 { position[]={5844.7207,83.040001,11556.67}; special="CARGO"; id=283; side="WEST"; vehicle="US_Soldier_AR_EP1"; skill=0.2; }; class Item8 { position[]={5846.7207,83.040001,11556.67}; special="CARGO"; id=284; side="WEST"; vehicle="US_Soldier_AAR_EP1"; skill=0.2; }; class Item9 { position[]={5823.6157,83.040001,11566.028}; azimut=-45; special="NONE"; id=275; side="WEST"; vehicle="UH60M_EP1"; rank="LIEUTENANT"; skill=0.82126772; text="u3"; }; }; }; class Item107 { side="WEST"; class Vehicles { items=10; class Item0 { position[]={5943.6133,83.040001,11674.328}; special="CARGO"; id=286; side="WEST"; vehicle="US_Soldier_SL_EP1"; leader=1; rank="CAPTAIN"; skill=0.59999996; text="h6"; }; class Item1 { position[]={5946.6133,83.040001,11669.328}; special="CARGO"; id=287; side="WEST"; vehicle="US_Soldier_TL_EP1"; rank="SERGEANT"; skill=0.46666664; }; class Item2 { position[]={5948.6133,83.040001,11669.328}; special="CARGO"; id=288; side="WEST"; vehicle="US_Soldier_GL_EP1"; rank="SERGEANT"; skill=0.46666664; }; class Item3 { position[]={5950.6133,83.040001,11669.328}; special="CARGO"; id=289; side="WEST"; vehicle="US_Soldier_MG_EP1"; rank="CORPORAL"; skill=0.33333331; }; class Item4 { position[]={5952.6133,83.040001,11669.328}; special="CARGO"; id=290; side="WEST"; vehicle="US_Soldier_AT_EP1"; rank="CORPORAL"; skill=0.33333331; }; class Item5 { position[]={5954.6133,83.040001,11669.328}; special="CARGO"; id=291; side="WEST"; vehicle="US_Soldier_TL_EP1"; rank="CORPORAL"; skill=0.33333331; }; class Item6 { position[]={5956.6133,83.040001,11669.328}; special="CARGO"; id=292; side="WEST"; vehicle="US_Soldier_GL_EP1"; skill=0.2; }; class Item7 { position[]={5958.6133,83.040001,11669.328}; special="CARGO"; id=293; side="WEST"; vehicle="US_Soldier_AR_EP1"; skill=0.2; }; class Item8 { position[]={5960.6133,83.040001,11669.328}; special="CARGO"; id=294; side="WEST"; vehicle="US_Soldier_AAR_EP1"; skill=0.2; }; class Item9 { position[]={5937.5083,83.040001,11678.687}; azimut=-45; special="NONE"; id=285; side="WEST"; vehicle="UH60M_EP1"; rank="LIEUTENANT"; skill=0.82126772; text="u4"; }; }; }; class Item108 { side="WEST"; class Vehicles { items=10; class Item0 { position[]={5376.6245,83.040001,11107.951}; special="CARGO"; id=296; side="WEST"; vehicle="US_Soldier_SL_EP1"; leader=1; rank="CAPTAIN"; skill=0.59999996; text="h7"; }; class Item1 { position[]={5379.6245,83.040001,11102.951}; special="CARGO"; id=297; side="WEST"; vehicle="US_Soldier_TL_EP1"; rank="SERGEANT"; skill=0.46666664; }; class Item2 { position[]={5381.6245,83.040001,11102.951}; special="CARGO"; id=298; side="WEST"; vehicle="US_Soldier_GL_EP1"; rank="SERGEANT"; skill=0.46666664; }; class Item3 { position[]={5383.6245,83.040001,11102.951}; special="CARGO"; id=299; side="WEST"; vehicle="US_Soldier_MG_EP1"; rank="CORPORAL"; skill=0.33333331; }; class Item4 { position[]={5385.6245,83.040001,11102.951}; special="CARGO"; id=300; side="WEST"; vehicle="US_Soldier_AT_EP1"; rank="CORPORAL"; skill=0.33333331; }; class Item5 { position[]={5387.6245,83.040001,11102.951}; special="CARGO"; id=301; side="WEST"; vehicle="US_Soldier_TL_EP1"; rank="CORPORAL"; skill=0.33333331; }; class Item6 { position[]={5389.6245,83.040001,11102.951}; special="CARGO"; id=302; side="WEST"; vehicle="US_Soldier_GL_EP1"; skill=0.2; }; class Item7 { position[]={5391.6245,83.040001,11102.951}; special="CARGO"; id=303; side="WEST"; vehicle="US_Soldier_AR_EP1"; skill=0.2; }; class Item8 { position[]={5393.6245,83.040001,11102.951}; special="CARGO"; id=304; side="WEST"; vehicle="US_Soldier_AAR_EP1"; skill=0.2; }; class Item9 { position[]={5370.5195,83.040001,11112.31}; azimut=-45; special="NONE"; id=295; side="WEST"; vehicle="UH60M_EP1"; rank="LIEUTENANT"; skill=0.82126772; text="u1"; }; }; }; class Item109 { side="WEST"; class Vehicles { items=10; class Item0 { position[]={5490.7251,83.040001,11221.188}; special="CARGO"; id=306; side="WEST"; vehicle="US_Soldier_SL_EP1"; leader=1; rank="CAPTAIN"; skill=0.59999996; text="h8"; }; class Item1 { position[]={5493.7251,83.040001,11216.188}; special="CARGO"; id=307; side="WEST"; vehicle="US_Soldier_TL_EP1"; rank="SERGEANT"; skill=0.46666664; }; class Item2 { position[]={5495.7251,83.040001,11216.188}; special="CARGO"; id=308; side="WEST"; vehicle="US_Soldier_GL_EP1"; rank="SERGEANT"; skill=0.46666664; }; class Item3 { position[]={5497.7251,83.040001,11216.188}; special="CARGO"; id=309; side="WEST"; vehicle="US_Soldier_MG_EP1"; rank="CORPORAL"; skill=0.33333331; }; class Item4 { position[]={5499.7251,83.040001,11216.188}; special="CARGO"; id=310; side="WEST"; vehicle="US_Soldier_AT_EP1"; rank="CORPORAL"; skill=0.33333331; }; class Item5 { position[]={5501.7251,83.040001,11216.188}; special="CARGO"; id=311; side="WEST"; vehicle="US_Soldier_TL_EP1"; rank="CORPORAL"; skill=0.33333331; }; class Item6 { position[]={5503.7251,83.040001,11216.188}; special="CARGO"; id=312; side="WEST"; vehicle="US_Soldier_GL_EP1"; skill=0.2; }; class Item7 { position[]={5505.7251,83.040001,11216.188}; special="CARGO"; id=313; side="WEST"; vehicle="US_Soldier_AR_EP1"; skill=0.2; }; class Item8 { position[]={5507.7251,83.040001,11216.188}; special="CARGO"; id=314; side="WEST"; vehicle="US_Soldier_AAR_EP1"; skill=0.2; }; class Item9 { position[]={5484.6201,83.040001,11225.547}; azimut=-45; special="NONE"; id=305; side="WEST"; vehicle="UH60M_EP1"; rank="LIEUTENANT"; skill=0.82126772; text="u2"; }; }; }; class Item110 { side="WEST"; class Vehicles { items=1; class Item0 { position[]={5950.8184,83.040001,11537.745}; azimut=135; special="NONE"; id=315; side="WEST"; vehicle="M1A1_US_DES_EP1"; leader=1; rank="CAPTAIN"; skill=0.71468139; text="t1"; }; }; }; class Item111 { side="WEST"; class Vehicles { items=1; class Item0 { position[]={5936.8442,83.040001,11523.316}; azimut=135; special="NONE"; id=316; side="WEST"; vehicle="M1A2_US_TUSK_MG_EP1"; leader=1; rank="CAPTAIN"; skill=0.71468139; text="t2"; }; }; }; class Item112 { side="WEST"; class Vehicles { items=1; class Item0 { position[]={5922.5864,83.040001,11508.486}; azimut=135; special="NONE"; id=317; side="WEST"; vehicle="M1A1_US_DES_EP1"; leader=1; rank="CAPTAIN"; skill=0.71468139; text="t3"; }; }; }; class Item113 { side="WEST"; class Vehicles { items=1; class Item0 { position[]={5880.3247,83.040001,11467.197}; azimut=135; special="NONE"; id=318; side="WEST"; vehicle="M1A1_US_DES_EP1"; leader=1; rank="CAPTAIN"; skill=0.71468139; text="t4"; }; }; }; class Item114 { side="WEST"; class Vehicles { items=1; class Item0 { position[]={5865.4644,83.040001,11452.891}; azimut=135; special="NONE"; id=319; side="WEST"; vehicle="M1A2_US_TUSK_MG_EP1"; leader=1; rank="CAPTAIN"; skill=0.71468139; text="t5"; }; }; }; class Item115 { side="WEST"; class Vehicles { items=1; class Item0 { position[]={5851.3374,83.040001,11439.502}; azimut=135; special="NONE"; id=320; side="WEST"; vehicle="M1A1_US_DES_EP1"; leader=1; rank="CAPTAIN"; skill=0.71468139; text="t6"; }; }; }; class Item116 { side="WEST"; class Vehicles { items=8; class Item0 { position[]={5726.6484,83.040001,11287.098}; special="CARGO"; id=321; side="WEST"; vehicle="US_Soldier_SL_EP1"; leader=1; rank="LIEUTENANT"; skill=0.59999996; text="s1"; }; class Item1 { position[]={5727.8774,83.040001,11269.488}; azimut=-45; special="NONE"; id=322; side="WEST"; vehicle="HMMWV_M1151_M2_DES_EP1"; rank="SERGEANT"; skill=0.46666664; text="c4"; }; class Item2 { position[]={5741.8101,83.040001,11281.628}; azimut=-45; special="NONE"; id=323; side="WEST"; vehicle="HMMWV_MK19_DES_EP1"; rank="SERGEANT"; skill=0.46666664; text="c3"; }; class Item3 { position[]={5728.6484,83.040001,11282.098}; special="CARGO"; id=324; side="WEST"; vehicle="US_Soldier_AT_EP1"; rank="CORPORAL"; skill=0.33333331; }; class Item4 { position[]={5730.6484,83.040001,11282.098}; special="CARGO"; id=325; side="WEST"; vehicle="US_Soldier_GL_EP1"; rank="CORPORAL"; skill=0.33333331; }; class Item5 { position[]={5732.6484,83.040001,11282.098}; special="CARGO"; id=326; side="WEST"; vehicle="US_Soldier_GL_EP1"; rank="CORPORAL"; skill=0.33333331; }; class Item6 { position[]={5734.6484,83.040001,11282.098}; special="CARGO"; id=327; side="WEST"; vehicle="US_Soldier_AAT_EP1"; skill=0.2; }; class Item7 { position[]={5736.6484,83.040001,11282.098}; special="CARGO"; id=328; side="WEST"; vehicle="US_Soldier_Engineer_EP1"; skill=0.2; }; }; }; class Item117 { side="WEST"; class Vehicles { items=10; class Item0 { position[]={5759.3467,83.040001,11321.843}; special="CARGO"; id=329; side="WEST"; vehicle="US_Soldier_SL_EP1"; leader=1; rank="LIEUTENANT"; skill=0.59999996; text="s3"; }; class Item1 { position[]={5770.1729,83.040001,11309.708}; azimut=-45; special="NONE"; id=330; side="WEST"; vehicle="M1129_MC_EP1"; rank="LIEUTENANT"; skill=0.59999996; text="st2"; }; class Item2 { position[]={5761.3467,83.040001,11316.843}; special="CARGO"; id=331; side="WEST"; vehicle="US_Soldier_TL_EP1"; rank="SERGEANT"; skill=0.46666664; }; class Item3 { position[]={5763.3467,83.040001,11316.843}; special="CARGO"; id=332; side="WEST"; vehicle="US_Soldier_AR_EP1"; rank="SERGEANT"; skill=0.46666664; }; class Item4 { position[]={5765.3467,83.040001,11316.843}; id=333; side="WEST"; vehicle="US_Soldier_AT_EP1"; rank="CORPORAL"; skill=0.33333331; }; class Item5 { position[]={5765.3467,83.040001,11316.843}; id=334; side="WEST"; vehicle="US_Soldier_GL_EP1"; rank="CORPORAL"; skill=0.33333331; }; class Item6 { position[]={5767.3467,83.040001,11316.843}; special="CARGO"; id=335; side="WEST"; vehicle="US_Soldier_TL_EP1"; rank="CORPORAL"; skill=0.33333331; }; class Item7 { position[]={5769.3467,83.040001,11316.843}; special="CARGO"; id=336; side="WEST"; vehicle="US_Soldier_AR_EP1"; skill=0.2; }; class Item8 { position[]={5771.3467,83.040001,11316.843}; special="CARGO"; id=337; side="WEST"; vehicle="US_Soldier_GL_EP1"; skill=0.2; }; class Item9 { position[]={5773.3467,83.040001,11316.843}; special="CARGO"; id=338; side="WEST"; vehicle="US_Soldier_Engineer_EP1"; skill=0.2; }; }; }; class Item118 { side="WEST"; class Vehicles { items=8; class Item0 { position[]={5815.1216,83.040001,11370.347}; special="CARGO"; id=339; side="WEST"; vehicle="US_Soldier_SL_EP1"; leader=1; rank="LIEUTENANT"; skill=0.59999996; text="s2"; }; class Item1 { position[]={5816.3506,83.040001,11352.737}; azimut=-45; special="NONE"; id=340; side="WEST"; vehicle="HMMWV_M1151_M2_DES_EP1"; rank="SERGEANT"; skill=0.45666665; text="c2"; }; class Item2 { position[]={5830.2832,83.040001,11364.877}; azimut=-45; special="NONE"; id=341; side="WEST"; vehicle="HMMWV_MK19_DES_EP1"; rank="SERGEANT"; skill=0.46666664; text="c1"; }; class Item3 { position[]={5817.1216,83.040001,11365.347}; special="CARGO"; id=342; side="WEST"; vehicle="US_Soldier_AT_EP1"; rank="CORPORAL"; skill=0.33333331; }; class Item4 { position[]={5819.1216,83.040001,11365.347}; special="CARGO"; id=343; side="WEST"; vehicle="US_Soldier_GL_EP1"; rank="CORPORAL"; skill=0.33333331; }; class Item5 { position[]={5821.1216,83.040001,11365.347}; special="CARGO"; id=344; side="WEST"; vehicle="US_Soldier_GL_EP1"; rank="CORPORAL"; skill=0.33333331; }; class Item6 { position[]={5823.1216,83.040001,11365.347}; special="CARGO"; id=345; side="WEST"; vehicle="US_Soldier_AAT_EP1"; skill=0.2; }; class Item7 { position[]={5825.1216,83.040001,11365.347}; special="CARGO"; id=346; side="WEST"; vehicle="US_Soldier_Engineer_EP1"; skill=0.2; }; }; }; class Item119 { side="WEST"; class Vehicles { items=10; class Item0 { position[]={5772.126,83.040001,11332.707}; special="CARGO"; id=347; side="WEST"; vehicle="US_Soldier_SL_EP1"; leader=1; rank="LIEUTENANT"; skill=0.59999996; text="s4"; }; class Item1 { position[]={5782.9521,83.040001,11320.572}; azimut=-45; special="NONE"; id=348; side="WEST"; vehicle="M1129_MC_EP1"; rank="LIEUTENANT"; skill=0.59999996; text="st1"; }; class Item2 { position[]={5774.126,83.040001,11327.707}; special="CARGO"; id=349; side="WEST"; vehicle="US_Soldier_TL_EP1"; rank="SERGEANT"; skill=0.46666664; }; class Item3 { position[]={5776.126,83.040001,11327.707}; special="CARGO"; id=350; side="WEST"; vehicle="US_Soldier_AR_EP1"; rank="SERGEANT"; skill=0.46666664; }; class Item4 { position[]={5778.126,83.040001,11327.707}; id=351; side="WEST"; vehicle="US_Soldier_AT_EP1"; rank="CORPORAL"; skill=0.33333331; }; class Item5 { position[]={5778.126,83.040001,11327.707}; id=352; side="WEST"; vehicle="US_Soldier_GL_EP1"; rank="CORPORAL"; skill=0.33333331; }; class Item6 { position[]={5780.126,83.040001,11327.707}; special="CARGO"; id=353; side="WEST"; vehicle="US_Soldier_TL_EP1"; rank="CORPORAL"; skill=0.33333331; }; class Item7 { position[]={5782.126,83.040001,11327.707}; special="CARGO"; id=354; side="WEST"; vehicle="US_Soldier_AR_EP1"; skill=0.2; }; class Item8 { position[]={5784.126,83.040001,11327.707}; special="CARGO"; id=355; side="WEST"; vehicle="US_Soldier_GL_EP1"; skill=0.2; }; class Item9 { position[]={5786.126,83.040001,11327.707}; special="CARGO"; id=356; side="WEST"; vehicle="US_Soldier_Engineer_EP1"; skill=0.2; }; }; }; class Item120 { side="LOGIC"; class Vehicles { items=1; class Item0 { position[]={-11.480236,356.97482,5588.6611}; id=362; side="LOGIC"; vehicle="ACE_Required_Logic"; leader=1; lock="UNLOCKED"; skill=0.60000002; }; }; }; class Item121 { side="LOGIC"; class Vehicles { items=1; class Item0 { position[]={24.168747,348.22028,5588.6626}; id=363; side="LOGIC"; vehicle="ACE_Wounds_Logic"; leader=1; lock="UNLOCKED"; skill=0.60000002; }; }; }; class Item122 { side="LOGIC"; class Vehicles { items=1; class Item0 { position[]={57.400772,342.41663,5589.2656}; id=364; side="LOGIC"; vehicle="ACE_Wounds_EveryoneMedic"; leader=1; lock="UNLOCKED"; skill=0.60000002; }; }; }; class Item123 { side="LOGIC"; class Vehicles { items=1; class Item0 { position[]={88.82019,337.54236,5589.8706}; id=365; side="LOGIC"; vehicle="ACE_Wounds_FullHeal"; leader=1; lock="UNLOCKED"; skill=0.60000002; }; }; }; }; class Vehicles { items=33; class Item0 { position[]={23.753944,334.12582,5503.4966}; azimut=77.991402; special="NONE"; id=10; side="EMPTY"; vehicle="SUV_PMC"; skill=1; text="car1"; init="this addWeaponCargo [""MP5SD"", 1]; this addMagazineCargo [""30Rnd_9x19_MP5SD"", 10]; "; }; class Item1 { position[]={8.8321571,336.13516,5500.0664}; azimut=77.1157; special="NONE"; id=11; side="EMPTY"; vehicle="SUV_PMC"; skill=1; text="car2"; init="this addWeaponCargo [""MP5SD"", 1]; this addMagazineCargo [""30Rnd_9x19_MP5SD"", 10];"; }; class Item2 { position[]={-4.0044842,353.78439,5438.9507}; special="NONE"; id=17; side="EMPTY"; vehicle="HeliHEmpty"; skill=0.60000002; text="win1"; }; class Item3 { position[]={20.087919,352.18277,5439.2139}; special="NONE"; id=18; side="EMPTY"; vehicle="HeliHEmpty"; skill=0.60000002; text="win2"; }; class Item4 { position[]={31.051273,352.17343,5438.3872}; special="NONE"; id=19; side="EMPTY"; vehicle="HeliHEmpty"; skill=0.60000002; text="win3"; }; class Item5 { position[]={41.933254,349.3779,5439.6445}; special="NONE"; id=20; side="EMPTY"; vehicle="HeliHEmpty"; skill=0.60000002; text="win4"; }; class Item6 { position[]={56.010326,346.07059,5439.7578}; special="NONE"; id=21; side="EMPTY"; vehicle="HeliHEmpty"; skill=0.60000002; text="win5"; }; class Item7 { position[]={71.903793,341.79022,5439.9854}; special="NONE"; id=22; side="EMPTY"; vehicle="HeliHEmpty"; skill=0.60000002; text="win6"; }; class Item8 { position[]={84.277977,338.16656,5439.7578}; special="NONE"; id=23; side="EMPTY"; vehicle="HeliHEmpty"; skill=0.60000002; text="win7"; }; class Item9 { position[]={96.425133,334.34528,5440.4395}; special="NONE"; id=24; side="EMPTY"; vehicle="HeliHEmpty"; skill=0.60000002; text="win8"; }; class Item10 { position[]={121.7272,328.88611,5443.373}; special="NONE"; id=25; side="EMPTY"; vehicle="HeliHEmpty"; skill=0.60000002; text="win9"; }; class Item11 { position[]={135.16711,328.23816,5442.2212}; special="NONE"; id=26; side="EMPTY"; vehicle="HeliHEmpty"; skill=0.60000002; text="win10"; }; class Item12 { position[]={6041.0576,83.040001,11785.375}; azimut=-45; special="NONE"; id=223; side="EMPTY"; vehicle="HeliH"; skill=0.60428894; }; class Item13 { position[]={5935.1816,83.040001,11678.668}; azimut=-45; special="NONE"; id=224; side="EMPTY"; vehicle="HeliH"; skill=0.60428894; }; class Item14 { position[]={5821.9834,83.040001,11566.42}; azimut=-45; special="NONE"; id=225; side="EMPTY"; vehicle="HeliH"; skill=0.60428894; }; class Item15 { position[]={5708.8799,83.040001,11452.351}; azimut=-45; special="NONE"; id=226; side="EMPTY"; vehicle="HeliH"; skill=0.60428894; }; class Item16 { position[]={5596.8286,83.040001,11339.464}; azimut=-45; special="NONE"; id=227; side="EMPTY"; vehicle="HeliH"; skill=0.60428894; }; class Item17 { position[]={5482.9712,83.040001,11226.393}; azimut=-45; special="NONE"; id=228; side="EMPTY"; vehicle="HeliH"; skill=0.60428894; }; class Item18 { position[]={5369.7744,83.040001,11113.581}; azimut=-45; special="NONE"; id=229; side="EMPTY"; vehicle="HeliH"; skill=0.60428894; }; class Item19 { position[]={5264.0195,83.040001,11007.137}; azimut=-45; special="NONE"; id=230; side="EMPTY"; vehicle="HeliH"; skill=0.60428894; }; class Item20 { position[]={5025.7603,310.01279,6879.002}; azimut=300; special="NONE"; id=357; side="EMPTY"; vehicle="Ammobox_PMC"; skill=0.59999996; text="ammobox"; init="clearWeaponCargo this; clearMagazineCargo this; this setPosATL [5077.08,6869.31,0.342712];this setDir 301.752;"; }; class Item21 { position[]={5025.1162,308.81503,6896.8184}; azimut=60; special="NONE"; id=358; side="EMPTY"; vehicle="ArmoredSUV_PMC"; lock="LOCKED"; skill=0.59999996; text="suv1"; init="this setPosATL [5023.92,6901.53,0.240967];this setDir 60.8227;"; }; class Item22 { position[]={5022.959,309.05176,6899.8687}; azimut=240; special="NONE"; id=359; side="EMPTY"; vehicle="ArmoredSUV_PMC"; lock="LOCKED"; skill=0.59999996; text="suv2"; init="this setPosATL [5018.62,6893.12,0.240967];this setDir 238.202;"; }; class Item23 { position[]={5069.1001,301.07999,6874.7534}; azimut=300; special="NONE"; id=360; side="EMPTY"; vehicle="Lada2_TK_CIV_EP1"; lock="LOCKED"; skill=0.59999996; text="lada1"; init="this setPosATL [5075.32,6884.19,0.00143433];this setDir 296.301;"; }; class Item24 { position[]={5074.439,301.07999,6881.7759}; azimut=300; special="NONE"; id=361; side="EMPTY"; vehicle="Lada2_TK_CIV_EP1"; lock="LOCKED"; skill=0.59999996; text="lada2"; init="this setPosATL [5072.18,6877.85,0.00143433];this setDir 296.301;"; }; class Item25 { position[]={5090.8501,35.988449,12607.998}; id=366; side="EMPTY"; vehicle="HeliHEmpty"; skill=0.60000002; markers[]= { "spawn", "spawn_1", "spawn_2", "spawn_3", "spawn_4", "spawn_5", "spawn_6", "spawn_7", "spawn_17", "spawn_18", "spawn_19", "spawn_15", "spawn_14", "spawn_13", "spawn_12", "spawn_8", "spawn_9", "spawn_11", "spawn_10" }; }; class Item26 { position[]={5044.752,301.07999,6875.8486}; azimut=388.11932; id=367; side="EMPTY"; vehicle="MASH"; skill=0.60000002; }; class Item27 { position[]={5072.0967,301.07999,6859.772}; azimut=-145.07899; id=368; side="EMPTY"; vehicle="MtvrReammo_DES_EP1"; lock="LOCKED"; skill=0.60000002; text="mtv1"; init="clearWeaponCargo this; clearMagazineCargo this; this addWeaponCargo[""DMR"", 1]; this addMagazineCargo[""20Rnd_762x51_DMR"", 20];"; }; class Item28 { position[]={5076.0684,301.07999,6857.2378}; azimut=-145.07899; id=369; side="EMPTY"; vehicle="MtvrRefuel_DES_EP1"; lock="LOCKED"; skill=0.60000002; text="mtv2"; }; class Item29 { position[]={5080.0986,301.08319,6854.2407}; azimut=-145.07899; id=370; side="EMPTY"; vehicle="MtvrRepair_DES_EP1"; lock="LOCKED"; skill=0.60000002; text="mtv3"; }; class Item30 { position[]={41.019032,331.60751,5502.3447}; azimut=43.158298; id=371; side="EMPTY"; vehicle="FlagCarrierBIS_EP1"; skill=0.60000002; text="teleFlag"; init="ateleport = this addAction[""Быстрое перемещение"", ""teleport_init.sqf""];"; }; class Item31 { position[]={65.214188,326.50223,5518.0068}; azimut=270.16901; special="NONE"; id=372; side="EMPTY"; vehicle="Lada2_TK_CIV_EP1"; lock="UNLOCKED"; skill=0.59999996; }; class Item32 { position[]={60.659569,327.29205,5516.3916}; azimut=419.77499; special="NONE"; id=373; side="EMPTY"; vehicle="VolhaLimo_TK_CIV_EP1"; lock="UNLOCKED"; skill=0.59999996; }; }; class Markers { items=46; class Item0 { position[]={10.132326,335.94089,5501.0059}; name="start"; type="mil_start"; colorName="ColorBlack"; }; class Item1 { position[]={1522.9906,234.62756,5732.3027}; name="area0"; markerType="ELLIPSE"; type="Empty"; colorName="ColorRed"; a=120; b=120; }; class Item2 { position[]={2011.3536,276.15768,7678.853}; name="area1"; markerType="ELLIPSE"; type="Empty"; colorName="ColorRed"; a=200; b=200; }; class Item3 { position[]={2561.9873,197.21681,5092.4473}; name="area2"; markerType="ELLIPSE"; type="Empty"; colorName="ColorRed"; a=150; b=150; }; class Item4 { position[]={3636.8433,152.1113,8576.8438}; name="area3"; markerType="ELLIPSE"; type="Empty"; colorName="ColorRed"; a=150; b=150; }; class Item5 { position[]={5294.6919,145.0943,6128.7285}; name="area4"; markerType="ELLIPSE"; type="Empty"; colorName="ColorRed"; a=250; b=200; angle=-20; }; class Item6 { position[]={5048.8672,301.07999,6881.2686}; name="safe"; text="Safe Haven"; type="mil_pickup"; colorName="ColorGreen"; }; class Item7 { position[]={5973.498,123.33,7233.0703}; name="area5"; markerType="ELLIPSE"; type="Empty"; colorName="ColorRed"; a=120; b=160; }; class Item8 { position[]={5629.0815,89.298431,8923.5322}; name="area6"; markerType="ELLIPSE"; type="Empty"; colorName="ColorRed"; a=150; b=150; }; class Item9 { position[]={3017.2581,60.680325,9934.5508}; name="area7"; markerType="ELLIPSE"; type="Empty"; colorName="ColorRed"; a=250; b=175; }; class Item10 { position[]={4165.8931,26.881771,11770.737}; name="area8"; markerType="ELLIPSE"; type="Empty"; colorName="ColorRed"; a=110; b=110; }; class Item11 { position[]={6297.4697,62.85004,11218.324}; name="area9"; markerType="ELLIPSE"; type="Empty"; colorName="ColorRed"; a=200; b=230; }; class Item12 { position[]={1540.2823,233.93561,5732.4858}; name="khushab"; text="khushab"; type="Empty"; }; class Item13 { position[]={2034.2623,275.76718,7640.6421}; name="mulladost"; text="mulladost"; type="Empty"; }; class Item14 { position[]={2565.7939,197.33363,5111.812}; name="jilavur"; text="jilavur"; type="Empty"; }; class Item15 { position[]={5287.9468,144.67616,6132.6621}; name="feruz"; text="feruz"; type="Empty"; }; class Item16 { position[]={3644.1902,152.31219,8584.5195}; name="gospandi"; text="gospandi"; type="Empty"; }; class Item17 { position[]={5965.6094,123.33,7239.0669}; name="falar"; text="falar"; type="Empty"; }; class Item18 { position[]={5779.6743,83.040001,11355.298}; name="base"; markerType="RECTANGLE"; type="Empty"; fillName="Border"; a=650; b=200; angle=-45; drawBorder=1; }; class Item19 { position[]={5635.3911,81.919998,8920.7012}; name="bastam"; text="bastam"; type="Empty"; }; class Item20 { position[]={3009.4121,60.439999,9915.4502}; name="nagara"; text="nagara"; type="Empty"; }; class Item21 { position[]={4171.147,27.84952,11760.061}; name="shamali"; text="shamali"; type="Empty"; }; class Item22 { position[]={6281.6543,59.814358,11219.81}; name="rasman"; text="rasman"; type="Empty"; }; class Item23 { position[]={6001.5649,87.707802,11540.241}; name="director"; text="director"; type="Empty"; }; class Item24 { position[]={3164.8481,226.57213,8467.7256}; name="world"; markerType="RECTANGLE"; type="Empty"; fillName="Border"; a=4000; b=4000; drawBorder=1; }; class Item25 { position[]={5085.7349,36.924816,12687.932}; name="spawn"; type="Empty"; }; class Item26 { position[]={5181.0859,51.143883,12687.932}; name="spawn_1"; type="Empty"; }; class Item27 { position[]={5265.417,52.695934,12687.932}; name="spawn_2"; type="Empty"; }; class Item28 { position[]={5352.144,52.310452,12687.932}; name="spawn_3"; type="Empty"; }; class Item29 { position[]={5448.9336,43.468754,12687.932}; name="spawn_4"; type="Empty"; }; class Item30 { position[]={5539.5898,44.984913,12687.932}; name="spawn_5"; type="Empty"; }; class Item31 { position[]={5635.7402,47.585354,12687.932}; name="spawn_6"; type="Empty"; }; class Item32 { position[]={5741.5049,43.885651,12687.932}; name="spawn_7"; type="Empty"; }; class Item33 { position[]={5831.7617,50.715324,12683.665}; name="spawn_8"; type="Empty"; }; class Item34 { position[]={5926.5088,65.893486,12682.812}; name="spawn_9"; type="Empty"; }; class Item35 { position[]={6040.1758,87.13195,12673.738}; name="spawn_10"; type="Empty"; }; class Item36 { position[]={6129.0615,98.203407,12672.03}; name="spawn_11"; type="Empty"; }; class Item37 { position[]={6237.8862,114.13177,12674.599}; name="spawn_12"; type="Empty"; }; class Item38 { position[]={6348.688,130.21046,12673.052}; name="spawn_13"; type="Empty"; }; class Item39 { position[]={6462.1509,140.32747,12668.713}; name="spawn_14"; type="Empty"; }; class Item40 { position[]={6574.9912,128.69994,12660.583}; name="spawn_15"; type="Empty"; }; class Item41 { position[]={6670.6289,107.31506,12658.255}; name="spawn_16"; type="Empty"; }; class Item42 { position[]={6772.3086,94.321686,12656.127}; name="spawn_17"; type="Empty"; }; class Item43 { position[]={6849.6899,75.50235,12650.705}; name="spawn_18"; type="Empty"; }; class Item44 { position[]={6958.7261,43.381927,12656.528}; name="spawn_19"; type="Empty"; }; class Item45 { position[]={39.079308,331.53226,5506.4219}; name="respawn1"; type="Empty"; }; }; class Sensors { items=35; class Item0 { position[]={-10.628078,340.70401,5476.187}; a=0; b=0; interruptable=1; type="END3"; age="UNKNOWN"; expCond="!alive p1 && !alive p2 && !alive p3 && !alive p4 && !alive p5 && !alive p6 && !alive p7 && !alive p8 && !alive p9 && !alive p10"; expActiv="forceEnd;"; class Effects { }; }; class Item1 { position[]={1537.1506,234.52185,5747.9365}; a=500; b=500; activationBy="GUER"; activationType="NOT PRESENT"; interruptable=1; age="UNKNOWN"; expActiv="deleteVehicle win1; [""task1"", ""succeeded""] call FHQ_TT_setTaskState;"; class Effects { }; }; class Item2 { position[]={4.3814626,359.82159,5421.5371}; a=0; b=0; timeoutMin=10; timeoutMid=10; timeoutMax=10; interruptable=1; type="END2"; age="UNKNOWN"; expCond="!alive win1 && !alive win2 && !alive win3 && !alive win4 && !alive win5 && !alive win6 && !alive win7 && !alive win8 && !alive win9 && !alive win10 && !alive general"; expActiv="forceEnd;"; class Effects { }; }; class Item3 { position[]={4.9515309,357.19696,5428.7319}; a=0; b=0; interruptable=1; age="UNKNOWN"; expCond="!alive win1 && !alive win2 && !alive win3 && !alive win4 && !alive win5 && !alive win6 && !alive win7 && !alive win8 && !alive win9 && !alive win10 && !alive general"; class Effects { titleType="TEXT"; title="All villagers have been murdered... US peacekeeping force has been successfully terrorized!! MISSION ACCOMPLISHED!!"; }; }; class Item4 { position[]={2056.6689,272.84592,7674.9331}; a=500; b=500; activationBy="GUER"; activationType="NOT PRESENT"; interruptable=1; age="UNKNOWN"; expActiv="deleteVehicle win2; [""task2"", ""succeeded""] call FHQ_TT_setTaskState;"; class Effects { }; }; class Item5 { position[]={2560.3926,197.56534,5139.5156}; a=500; b=500; activationBy="GUER"; activationType="NOT PRESENT"; interruptable=1; age="UNKNOWN"; expActiv="deleteVehicle win3; [""task3"", ""succeeded""] call FHQ_TT_setTaskState;"; class Effects { }; }; class Item6 { position[]={5308.8794,145.83069,6150.2305}; a=500; b=500; activationBy="GUER"; activationType="NOT PRESENT"; interruptable=1; age="UNKNOWN"; expActiv="deleteVehicle win5; [""task5"", ""succeeded""] call FHQ_TT_setTaskState; ""respawn1"" setMarkerPos [5050.59,6874.55,0.00143433]; teleFlag setPosATL [5048.62,6871.53,0.00143433];"; class Effects { }; }; class Item7 { position[]={3644.2273,152.04375,8617.6885}; a=500; b=500; activationBy="GUER"; activationType="NOT PRESENT"; interruptable=1; age="UNKNOWN"; expActiv="deleteVehicle win4; [""task4"", ""succeeded""] call FHQ_TT_setTaskState;"; class Effects { }; }; class Item8 { position[]={5990.0767,123.10409,7265.9165}; a=500; b=500; activationBy="GUER"; activationType="NOT PRESENT"; interruptable=1; age="UNKNOWN"; expActiv="deleteVehicle win6; [""task6"", ""succeeded""] call FHQ_TT_setTaskState;"; class Effects { }; }; class Item9 { position[]={5632.8105,81.93,8936.0576}; a=500; b=500; activationBy="GUER"; activationType="NOT PRESENT"; interruptable=1; age="UNKNOWN"; expActiv="deleteVehicle win7; [""task7"", ""succeeded""] call FHQ_TT_setTaskState;"; class Effects { }; }; class Item10 { position[]={3022.4006,61.956593,9953.1582}; a=500; b=500; activationBy="GUER"; activationType="NOT PRESENT"; interruptable=1; age="UNKNOWN"; expActiv="deleteVehicle win8; [""task8"", ""succeeded""] call FHQ_TT_setTaskState;"; class Effects { }; }; class Item11 { position[]={4161.9448,26.156548,11773.192}; a=500; b=500; activationBy="GUER"; activationType="NOT PRESENT"; interruptable=1; age="UNKNOWN"; expActiv="deleteVehicle win9; [""task9"", ""succeeded""] call FHQ_TT_setTaskState;"; class Effects { }; }; class Item12 { position[]={6295.7036,59.825859,11247.373}; a=500; b=500; activationBy="GUER"; activationType="NOT PRESENT"; interruptable=1; age="UNKNOWN"; expActiv="deleteVehicle win10; [""task10"", ""succeeded""] call FHQ_TT_setTaskState;"; class Effects { }; }; class Item13 { position[]={5979.7212,83.040001,11541.307}; a=0; b=0; activationBy="GUER"; activationType="NOT PRESENT"; interruptable=1; age="UNKNOWN"; expCond="!alive general"; expActiv="[""task11"", ""succeeded""] call FHQ_TT_setTaskState;"; class Effects { }; }; class Item14 { position[]={5087.8638,36.293552,12682.482}; a=20; b=20; activationBy="VEHICLE"; interruptable=1; age="UNKNOWN"; idVehicle=366; text="air only"; expActiv="{deleteVehicle _X} forEach (crew c1)+[c1]; {deleteVehicle _X} forEach (crew c2)+[c2]; {deleteVehicle _X} forEach (crew c3)+[c3]; {deleteVehicle _X} forEach (crew c4)+[c4]; {deleteVehicle _X} forEach (crew t1)+[t1]; {deleteVehicle _X} forEach (crew t2)+[t2]; {deleteVehicle _X} forEach (crew t3)+[t3]; {deleteVehicle _X} forEach (crew t4)+[t4]; {deleteVehicle _X} forEach (crew t5)+[t5]; {deleteVehicle _X} forEach (crew t6)+[t6]; {deleteVehicle _X} forEach (crew st1)+[st1]; {deleteVehicle _X} forEach (crew st2)+[st2]; "; class Effects { }; }; class Item15 { position[]={5179.9243,50.18,12684.032}; a=20; b=20; activationBy="VEHICLE"; interruptable=1; age="UNKNOWN"; idVehicle=366; text="combat air only"; expActiv="{deleteVehicle _X} forEach (crew c1)+[c1]; {deleteVehicle _X} forEach (crew c2)+[c2]; {deleteVehicle _X} forEach (crew c3)+[c3]; {deleteVehicle _X} forEach (crew c4)+[c4]; {deleteVehicle _X} forEach (crew t1)+[t1]; {deleteVehicle _X} forEach (crew t2)+[t2]; {deleteVehicle _X} forEach (crew t3)+[t3]; {deleteVehicle _X} forEach (crew t4)+[t4]; {deleteVehicle _X} forEach (crew t5)+[t5]; {deleteVehicle _X} forEach (crew t6)+[t6]; {deleteVehicle _X} forEach (crew st1)+[st1]; {deleteVehicle _X} forEach (crew st2)+[st2]; {deleteVehicle _X} forEach (crew u1)+[u1]; {deleteVehicle _X} forEach (crew u2)+[u2]; {deleteVehicle _X} forEach (crew u3)+[u3]; {deleteVehicle _X} forEach (crew u4)+[u4]; {deleteVehicle _X} forEach (crew ch1)+[ch1]; {deleteVehicle _X} forEach (crew ch2)+[ch2]; "; class Effects { }; }; class Item16 { position[]={5263.084,52.640987,12688.197}; a=20; b=20; activationBy="VEHICLE"; interruptable=1; age="UNKNOWN"; idVehicle=366; text="no one"; expActiv="{deleteVehicle _X} forEach (crew c1)+[c1]; {deleteVehicle _X} forEach (crew c2)+[c2]; {deleteVehicle _X} forEach (crew c3)+[c3]; {deleteVehicle _X} forEach (crew c4)+[c4]; {deleteVehicle _X} forEach (crew t1)+[t1]; {deleteVehicle _X} forEach (crew t2)+[t2]; {deleteVehicle _X} forEach (crew t3)+[t3]; {deleteVehicle _X} forEach (crew t4)+[t4]; {deleteVehicle _X} forEach (crew t5)+[t5]; {deleteVehicle _X} forEach (crew t6)+[t6]; {deleteVehicle _X} forEach (crew st1)+[st1]; {deleteVehicle _X} forEach (crew st2)+[st2]; {deleteVehicle _X} forEach (crew u1)+[u1]; {deleteVehicle _X} forEach (crew u2)+[u2]; {deleteVehicle _X} forEach (crew u3)+[u3]; {deleteVehicle _X} forEach (crew u4)+[u4]; {deleteVehicle _X} forEach (crew ch1)+[ch1]; {deleteVehicle _X} forEach (crew ch2)+[ch2]; {deleteVehicle _X} forEach (crew h1)+[h1]; {deleteVehicle _X} forEach (crew h2)+[h2]; "; class Effects { }; }; class Item17 { position[]={5353.0957,52.617348,12685.439}; a=20; b=20; activationBy="VEHICLE"; interruptable=1; age="UNKNOWN"; idVehicle=366; text="no combat no tanks"; expActiv="{deleteVehicle _X} forEach (crew t1)+[t1]; {deleteVehicle _X} forEach (crew t2)+[t2]; {deleteVehicle _X} forEach (crew t3)+[t3]; {deleteVehicle _X} forEach (crew t4)+[t4]; {deleteVehicle _X} forEach (crew t5)+[t5]; {deleteVehicle _X} forEach (crew t6)+[t6]; {deleteVehicle _X} forEach (crew h1)+[h1]; {deleteVehicle _X} forEach (crew h2)+[h2]; "; class Effects { }; }; class Item18 { position[]={5449.2988,43.513283,12686.653}; a=20; b=20; activationBy="VEHICLE"; interruptable=1; age="UNKNOWN"; idVehicle=366; text="air transport only"; expActiv="{deleteVehicle _X} forEach (crew c1)+[c1]; {deleteVehicle _X} forEach (crew c2)+[c2]; {deleteVehicle _X} forEach (crew c3)+[c3]; {deleteVehicle _X} forEach (crew c4)+[c4]; {deleteVehicle _X} forEach (crew t1)+[t1]; {deleteVehicle _X} forEach (crew t2)+[t2]; {deleteVehicle _X} forEach (crew t3)+[t3]; {deleteVehicle _X} forEach (crew t4)+[t4]; {deleteVehicle _X} forEach (crew t5)+[t5]; {deleteVehicle _X} forEach (crew t6)+[t6]; {deleteVehicle _X} forEach (crew st1)+[st1]; {deleteVehicle _X} forEach (crew st2)+[st2]; {deleteVehicle _X} forEach (crew h1)+[h1]; {deleteVehicle _X} forEach (crew h2)+[h2]; "; class Effects { }; }; class Item19 { position[]={5540.6797,45.097675,12685.069}; a=20; b=20; activationBy="VEHICLE"; interruptable=1; age="UNKNOWN"; idVehicle=366; text="Air no chinooks"; expActiv="{deleteVehicle _X} forEach (crew ch1)+[ch1]; {deleteVehicle _X} forEach (crew ch2)+[ch2]; {deleteVehicle _X} forEach (crew c1)+[c1]; {deleteVehicle _X} forEach (crew c2)+[c2]; {deleteVehicle _X} forEach (crew c3)+[c3]; {deleteVehicle _X} forEach (crew c4)+[c4]; {deleteVehicle _X} forEach (crew t1)+[t1]; {deleteVehicle _X} forEach (crew t2)+[t2]; {deleteVehicle _X} forEach (crew t3)+[t3]; {deleteVehicle _X} forEach (crew t4)+[t4]; {deleteVehicle _X} forEach (crew t5)+[t5]; {deleteVehicle _X} forEach (crew t6)+[t6]; {deleteVehicle _X} forEach (crew st1)+[st1]; {deleteVehicle _X} forEach (crew st2)+[st2]; "; class Effects { }; }; class Item20 { position[]={5633.1274,47.333939,12684.721}; a=20; b=20; activationBy="VEHICLE"; interruptable=1; age="UNKNOWN"; idVehicle=366; text="air no uh"; expActiv="{deleteVehicle _X} forEach (crew c1)+[c1]; {deleteVehicle _X} forEach (crew c2)+[c2]; {deleteVehicle _X} forEach (crew c3)+[c3]; {deleteVehicle _X} forEach (crew c4)+[c4]; {deleteVehicle _X} forEach (crew t1)+[t1]; {deleteVehicle _X} forEach (crew t2)+[t2]; {deleteVehicle _X} forEach (crew t3)+[t3]; {deleteVehicle _X} forEach (crew t4)+[t4]; {deleteVehicle _X} forEach (crew t5)+[t5]; {deleteVehicle _X} forEach (crew t6)+[t6]; {deleteVehicle _X} forEach (crew st1)+[st1]; {deleteVehicle _X} forEach (crew st2)+[st2]; {deleteVehicle _X} forEach (crew u1)+[u1]; {deleteVehicle _X} forEach (crew u2)+[u2]; {deleteVehicle _X} forEach (crew u3)+[u3]; {deleteVehicle _X} forEach (crew u4)+[u4]; "; class Effects { }; }; class Item21 { position[]={5729.7422,43.202045,12684.252}; a=20; b=20; activationBy="VEHICLE"; interruptable=1; age="UNKNOWN"; idVehicle=366; text="air uh only"; expActiv="{deleteVehicle _X} forEach (crew ch1)+[ch1]; {deleteVehicle _X} forEach (crew ch2)+[ch2]; {deleteVehicle _X} forEach (crew h1)+[h1]; {deleteVehicle _X} forEach (crew h2)+[h2]; {deleteVehicle _X} forEach (crew c1)+[c1]; {deleteVehicle _X} forEach (crew c2)+[c2]; {deleteVehicle _X} forEach (crew c3)+[c3]; {deleteVehicle _X} forEach (crew c4)+[c4]; {deleteVehicle _X} forEach (crew t1)+[t1]; {deleteVehicle _X} forEach (crew t2)+[t2]; {deleteVehicle _X} forEach (crew t3)+[t3]; {deleteVehicle _X} forEach (crew t4)+[t4]; {deleteVehicle _X} forEach (crew t5)+[t5]; {deleteVehicle _X} forEach (crew t6)+[t6]; {deleteVehicle _X} forEach (crew st1)+[st1]; {deleteVehicle _X} forEach (crew st2)+[st2]; "; class Effects { }; }; class Item22 { position[]={5829.0469,50.618984,12682.847}; a=20; b=20; activationBy="VEHICLE"; interruptable=1; age="UNKNOWN"; idVehicle=366; text="air chinooks only"; expActiv="{deleteVehicle _X} forEach (crew c1)+[c1]; {deleteVehicle _X} forEach (crew c2)+[c2]; {deleteVehicle _X} forEach (crew c3)+[c3]; {deleteVehicle _X} forEach (crew c4)+[c4]; {deleteVehicle _X} forEach (crew t1)+[t1]; {deleteVehicle _X} forEach (crew t2)+[t2]; {deleteVehicle _X} forEach (crew t3)+[t3]; {deleteVehicle _X} forEach (crew t4)+[t4]; {deleteVehicle _X} forEach (crew t5)+[t5]; {deleteVehicle _X} forEach (crew t6)+[t6]; {deleteVehicle _X} forEach (crew st1)+[st1]; {deleteVehicle _X} forEach (crew st2)+[st2]; {deleteVehicle _X} forEach (crew u1)+[u1]; {deleteVehicle _X} forEach (crew u2)+[u2]; {deleteVehicle _X} forEach (crew u3)+[u3]; {deleteVehicle _X} forEach (crew u4)+[u4]; {deleteVehicle _X} forEach (crew h1)+[h1]; {deleteVehicle _X} forEach (crew h2)+[h2]; "; class Effects { }; }; class Item23 { position[]={5926.1553,65.821877,12679.422}; a=20; b=20; activationBy="VEHICLE"; interruptable=1; age="UNKNOWN"; idVehicle=366; text="land only"; expActiv="{deleteVehicle _X} forEach (crew u1)+[u1]; {deleteVehicle _X} forEach (crew u2)+[u2]; {deleteVehicle _X} forEach (crew u3)+[u3]; {deleteVehicle _X} forEach (crew u4)+[u4]; {deleteVehicle _X} forEach (crew ch1)+[ch1]; {deleteVehicle _X} forEach (crew ch2)+[ch2]; {deleteVehicle _X} forEach (crew h1)+[h1]; {deleteVehicle _X} forEach (crew h2)+[h2]; "; class Effects { }; }; class Item24 { position[]={6034.3984,86.818794,12675.354}; a=20; b=20; activationBy="VEHICLE"; interruptable=1; age="UNKNOWN"; idVehicle=366; text="tank only"; expActiv="{deleteVehicle _X} forEach (crew st1)+[st1]; {deleteVehicle _X} forEach (crew st2)+[st2]; {deleteVehicle _X} forEach (crew u1)+[u1]; {deleteVehicle _X} forEach (crew u2)+[u2]; {deleteVehicle _X} forEach (crew u3)+[u3]; {deleteVehicle _X} forEach (crew u4)+[u4]; {deleteVehicle _X} forEach (crew ch1)+[ch1]; {deleteVehicle _X} forEach (crew ch2)+[ch2]; {deleteVehicle _X} forEach (crew h1)+[h1]; {deleteVehicle _X} forEach (crew h2)+[h2]; {deleteVehicle _X} forEach (crew c1)+[c1]; {deleteVehicle _X} forEach (crew c2)+[c2]; {deleteVehicle _X} forEach (crew c3)+[c3]; {deleteVehicle _X} forEach (crew c4)+[c4]; "; class Effects { }; }; class Item25 { position[]={6125.1235,97.727898,12671.756}; a=20; b=20; activationBy="VEHICLE"; interruptable=1; age="UNKNOWN"; idVehicle=366; text="land transport only"; expActiv="{deleteVehicle _X} forEach (crew u1)+[u1]; {deleteVehicle _X} forEach (crew u2)+[u2]; {deleteVehicle _X} forEach (crew u3)+[u3]; {deleteVehicle _X} forEach (crew u4)+[u4]; {deleteVehicle _X} forEach (crew ch1)+[ch1]; {deleteVehicle _X} forEach (crew ch2)+[ch2]; {deleteVehicle _X} forEach (crew h1)+[h1]; {deleteVehicle _X} forEach (crew h2)+[h2]; {deleteVehicle _X} forEach (crew t1)+[t1]; {deleteVehicle _X} forEach (crew t2)+[t2]; {deleteVehicle _X} forEach (crew t3)+[t3]; {deleteVehicle _X} forEach (crew t4)+[t4]; {deleteVehicle _X} forEach (crew t5)+[t5]; {deleteVehicle _X} forEach (crew t6)+[t6]; "; class Effects { }; }; class Item26 { position[]={6237.4868,114.24149,12676.094}; a=20; b=20; activationBy="VEHICLE"; interruptable=1; age="UNKNOWN"; idVehicle=366; text="humvee only"; expActiv="{deleteVehicle _X} forEach (crew t1)+[t1]; {deleteVehicle _X} forEach (crew t2)+[t2]; {deleteVehicle _X} forEach (crew t3)+[t3]; {deleteVehicle _X} forEach (crew t4)+[t4]; {deleteVehicle _X} forEach (crew t5)+[t5]; {deleteVehicle _X} forEach (crew t6)+[t6]; {deleteVehicle _X} forEach (crew st1)+[st1]; {deleteVehicle _X} forEach (crew st2)+[st2]; {deleteVehicle _X} forEach (crew u1)+[u1]; {deleteVehicle _X} forEach (crew u2)+[u2]; {deleteVehicle _X} forEach (crew u3)+[u3]; {deleteVehicle _X} forEach (crew u4)+[u4]; {deleteVehicle _X} forEach (crew ch1)+[ch1]; {deleteVehicle _X} forEach (crew ch2)+[ch2]; {deleteVehicle _X} forEach (crew h1)+[h1]; {deleteVehicle _X} forEach (crew h2)+[h2]; "; class Effects { }; }; class Item27 { position[]={6347.1167,129.96709,12672.114}; a=20; b=20; activationBy="VEHICLE"; interruptable=1; age="UNKNOWN"; idVehicle=366; text="stryker only"; expActiv="{deleteVehicle _X} forEach (crew u1)+[u1]; {deleteVehicle _X} forEach (crew u2)+[u2]; {deleteVehicle _X} forEach (crew u3)+[u3]; {deleteVehicle _X} forEach (crew u4)+[u4]; {deleteVehicle _X} forEach (crew ch1)+[ch1]; {deleteVehicle _X} forEach (crew ch2)+[ch2]; {deleteVehicle _X} forEach (crew h1)+[h1]; {deleteVehicle _X} forEach (crew h2)+[h2]; "; class Effects { }; }; class Item28 { position[]={6461.2583,140.23796,12667.415}; a=20; b=20; activationBy="VEHICLE"; interruptable=1; age="UNKNOWN"; idVehicle=366; text="humvee and tank"; expActiv="{deleteVehicle _X} forEach (crew st1)+[st1]; {deleteVehicle _X} forEach (crew st2)+[st2]; {deleteVehicle _X} forEach (crew u1)+[u1]; {deleteVehicle _X} forEach (crew u2)+[u2]; {deleteVehicle _X} forEach (crew u3)+[u3]; {deleteVehicle _X} forEach (crew u4)+[u4]; {deleteVehicle _X} forEach (crew ch1)+[ch1]; {deleteVehicle _X} forEach (crew ch2)+[ch2]; {deleteVehicle _X} forEach (crew h1)+[h1]; {deleteVehicle _X} forEach (crew h2)+[h2]; "; class Effects { }; }; class Item29 { position[]={6573.7397,129.26938,12663.712}; a=20; b=20; activationBy="VEHICLE"; interruptable=1; age="UNKNOWN"; idVehicle=366; text="stryker and tank"; expActiv="{deleteVehicle _X} forEach (crew u1)+[u1]; {deleteVehicle _X} forEach (crew u2)+[u2]; {deleteVehicle _X} forEach (crew u3)+[u3]; {deleteVehicle _X} forEach (crew u4)+[u4]; {deleteVehicle _X} forEach (crew ch1)+[ch1]; {deleteVehicle _X} forEach (crew ch2)+[ch2]; {deleteVehicle _X} forEach (crew h1)+[h1]; {deleteVehicle _X} forEach (crew h2)+[h2]; {deleteVehicle _X} forEach (crew c1)+[c1]; {deleteVehicle _X} forEach (crew c2)+[c2]; {deleteVehicle _X} forEach (crew c3)+[c3]; {deleteVehicle _X} forEach (crew c4)+[c4]; "; class Effects { }; }; class Item30 { position[]={6761.6416,95.74305,12654.783}; a=20; b=20; activationBy="VEHICLE"; interruptable=1; age="UNKNOWN"; idVehicle=366; text="stryker half tank"; expActiv="{deleteVehicle _X} forEach (crew u1)+[u1]; {deleteVehicle _X} forEach (crew u2)+[u2]; {deleteVehicle _X} forEach (crew u3)+[u3]; {deleteVehicle _X} forEach (crew u4)+[u4]; {deleteVehicle _X} forEach (crew ch1)+[ch1]; {deleteVehicle _X} forEach (crew ch2)+[ch2]; {deleteVehicle _X} forEach (crew h1)+[h1]; {deleteVehicle _X} forEach (crew h2)+[h2]; {deleteVehicle _X} forEach (crew c1)+[c1]; {deleteVehicle _X} forEach (crew c2)+[c2]; {deleteVehicle _X} forEach (crew c3)+[c3]; {deleteVehicle _X} forEach (crew c4)+[c4]; {deleteVehicle _X} forEach (crew t1)+[t1]; {deleteVehicle _X} forEach (crew t2)+[t2]; {deleteVehicle _X} forEach (crew t3)+[t3]; "; class Effects { }; }; class Item31 { position[]={6850.5918,75.217232,12651.212}; a=20; b=20; activationBy="VEHICLE"; interruptable=1; age="UNKNOWN"; idVehicle=366; text="transport half tank"; expActiv="{deleteVehicle _X} forEach (crew u1)+[u1]; {deleteVehicle _X} forEach (crew u2)+[u2]; {deleteVehicle _X} forEach (crew u3)+[u3]; {deleteVehicle _X} forEach (crew u4)+[u4]; {deleteVehicle _X} forEach (crew ch1)+[ch1]; {deleteVehicle _X} forEach (crew ch2)+[ch2]; {deleteVehicle _X} forEach (crew h1)+[h1]; {deleteVehicle _X} forEach (crew h2)+[h2]; {deleteVehicle _X} forEach (crew t1)+[t1]; {deleteVehicle _X} forEach (crew t2)+[t2]; {deleteVehicle _X} forEach (crew t3)+[t3]; "; class Effects { }; }; class Item32 { position[]={6669.75,107.94472,12660.33}; a=20; b=20; activationBy="VEHICLE"; interruptable=1; age="UNKNOWN"; idVehicle=366; text="humvee and half tank"; expActiv="{deleteVehicle _X} forEach (crew t4)+[t4]; {deleteVehicle _X} forEach (crew t5)+[t5]; {deleteVehicle _X} forEach (crew t6)+[t6]; {deleteVehicle _X} forEach (crew st1)+[st1]; {deleteVehicle _X} forEach (crew st2)+[st2]; {deleteVehicle _X} forEach (crew u1)+[u1]; {deleteVehicle _X} forEach (crew u2)+[u2]; {deleteVehicle _X} forEach (crew u3)+[u3]; {deleteVehicle _X} forEach (crew u4)+[u4]; {deleteVehicle _X} forEach (crew ch1)+[ch1]; {deleteVehicle _X} forEach (crew ch2)+[ch2]; {deleteVehicle _X} forEach (crew h1)+[h1]; {deleteVehicle _X} forEach (crew h2)+[h2]; "; class Effects { }; }; class Item33 { position[]={6957.8525,43.408207,12655.357}; a=20; b=20; activationBy="VEHICLE"; interruptable=1; age="UNKNOWN"; idVehicle=366; text="infantry only"; expActiv="{deleteVehicle _X} forEach (crew t1)+[t1]; {deleteVehicle _X} forEach (crew t2)+[t2]; {deleteVehicle _X} forEach (crew t3)+[t3]; {deleteVehicle _X} forEach (crew t4)+[t4]; {deleteVehicle _X} forEach (crew t5)+[t5]; {deleteVehicle _X} forEach (crew t6)+[t6]; {deleteVehicle _X} forEach (crew h1)+[h1]; {deleteVehicle _X} forEach (crew h2)+[h2]; deleteVehicle c1; deleteVehicle c2; deleteVehicle c3; deleteVehicle c4; deleteVehicle u1; deleteVehicle u2; deleteVehicle u3; deleteVehicle u4; deleteVehicle ch1; deleteVehicle ch2; deleteVehicle st1; deleteVehicle st2;"; class Effects { }; }; class Item34 { position[]={3006.2861,243.50017,8388.3408}; a=5000; b=5000; rectangular=1; activationBy="EAST"; activationType="GUER D"; timeoutMin=300; timeoutMid=360; timeoutMax=420; age="UNKNOWN"; expActiv="nul=[h1,""world"",""reinforcement""] execVM ""scripts\upsmon.sqf""; nul=[h2,""world"",""reinforcement""] execVM ""scripts\upsmon.sqf""; nul=[h3,""world"",""reinforcement""] execVM ""scripts\upsmon.sqf""; nul=[h4,""world"",""reinforcement""] execVM ""scripts\upsmon.sqf""; nul=[h5,""world"",""reinforcement""] execVM ""scripts\upsmon.sqf""; nul=[h6,""world"",""reinforcement""] execVM ""scripts\upsmon.sqf""; nul=[h7,""world"",""reinforcement""] execVM ""scripts\upsmon.sqf""; nul=[h8,""world"",""reinforcement""] execVM ""scripts\upsmon.sqf""; nul=[t1,""world"",""reinforcement""] execVM ""scripts\upsmon.sqf""; nul=[t2,""world"",""reinforcement""] execVM ""scripts\upsmon.sqf""; nul=[t3,""world"",""reinforcement""] execVM ""scripts\upsmon.sqf""; nul=[t4,""world"",""reinforcement""] execVM ""scripts\upsmon.sqf""; nul=[t5,""world"",""reinforcement""] execVM ""scripts\upsmon.sqf""; nul=[t6,""world"",""reinforcement""] execVM ""scripts\upsmon.sqf""; nul=[s1,""world"",""reinforcement""] execVM ""scripts\upsmon.sqf""; nul=[s2,""world"",""reinforcement""] execVM ""scripts\upsmon.sqf""; nul=[s3,""world"",""reinforcement""] execVM ""scripts\upsmon.sqf""; nul=[s4,""world"",""reinforcement""] execVM ""scripts\upsmon.sqf""; suv1 setVehicleLock ""UNLOCKED""; suv2 setVehicleLock ""UNLOCKED""; lada1 setVehicleLock ""UNLOCKED""; lada2 setVehicleLock ""UNLOCKED""; null = ammobox execVM ""scripts\ammo.sqf""; mtv1 setVehicleLock ""UNLOCKED""; mtv2 setVehicleLock ""UNLOCKED""; mtv3 setVehicleLock ""UNLOCKED""; "; class Effects { track="EP1_Track15"; titleType="TEXT"; titleEffect="PLAIN DOWN"; title="The US Peacekeeping force are now aware of our presence. Do not worry, our top secret weapons and vehicles back at the safe house is ready and activated."; }; }; }; }; class Intro { addOns[]= { "takistan" }; addOnsAuto[]= { "takistan" }; randomSeed=13153323; class Intel { startWeather=0.40000001; forecastWeather=0.40000001; year=2009; day=28; hour=16; minute=20; }; }; class OutroWin { addOns[]= { "takistan" }; addOnsAuto[]= { "takistan" }; randomSeed=2233503; class Intel { startWeather=0.40000001; forecastWeather=0.40000001; year=2009; day=28; hour=16; minute=20; }; }; class OutroLoose { addOns[]= { "takistan" }; addOnsAuto[]= { "takistan" }; randomSeed=3274725; class Intel { startWeather=0.40000001; forecastWeather=0.40000001; year=2009; day=28; hour=16; minute=20; }; }; Overview

Drive around villages in Takistan and murder the locals there with silence weapons. Oh how fair it is to kill poorly armed peasants in the night where they don't see us.

by Phantom Six

/***********************************************************************************************************************************/ /*************************************************Seccion de configuracion***********************************************************/ /***********************************************************************************************************************************/ //Nº of lifes. Minimum number is 1( doesn't make much sense tought since you will directly die when killed), use 1000 for unlimited //NOTE: this value will be OVERWRITED if you pass parameters to the execVM on the mision init.sqf. So use: execVM "revive\ReviveAceWounds.sqf"; Colum_revive_Conf_Lifes= 1000; //Disable IA wounding system for IA, seems to cause more desync. ace_sys_wounds_noai= true; //Total time that units remains uncon before die, in seconds ace_wounds_prevtime = 800; //shows Revive time counter . If false it will be replaced by visual feedback about your time left.(needs @ACE Build 584+) ace_wounds_prevtimeshow = true; //If true, spectator will be activated while uncons, if false you will see a black screen while uncons. ace_sys_wounds_withSpect = true; //Start spectator after you run out of lifes. If false, once you are out of lives you are kicked ( you get the end mission screen, just for you) Colum_revive_AfterDeadSpect=true; //Show enemy units when you are totally death, true= show all, false = only your side. Colum_revive_VerEnemigos= true; //Pvp enabled, markers and uncons mesages only will be seen by your teammates Colum_revive_PvP=true; //Show team kill mesages Colum_revive_TKcheck= true; //Heaiyly wound and enemy player would give the attacker +1 score, and -1 if he wound and ally. This is intented to be used on PvP games to have a better stat tracking, because without this feature enabled, you will only be credited when you kill a player that had no lifes left. Colum_revive_WoundScoring=true; //Medic rucksack. "" for disabled any other rucksack classname to enable Colum_revive_MochilaMedico="ACE_VTAC_RUSH72_TT_MEDIC"; //Contents for the rucksack // the contents are: [nº compress, nº morphine, nº ephinifrine, nº green smoke grenades] Colum_revive_MochilaMedico_Contenido=[10,20,15,2,12]; //Uncoment(remove the // afther the line) any line bellow to enable specific side backpack or contents. //Colum_revive_MochilaMedico_WEST = "ACE_VTAC_RUSH72_TT_MEDIC"; //Colum_revive_MochilaMedico_EAST = "ACE_VTAC_RUSH72_TT_MEDIC"; //Colum_revive_MochilaMedico_GUER = "ACE_VTAC_RUSH72_TT_MEDIC"; //Colum_revive_MochilaMedico_CIV = "ACE_VTAC_RUSH72_TT_MEDIC"; //Colum_revive_MochilaMedico_Contenido_WEST =[10,20,15,2,10]; //Colum_revive_MochilaMedico_Contenido_EAST = [10,20,15,2,10]; //Colum_revive_MochilaMedico_Contenido_GUER = [10,20,15,2,10]; //Colum_revive_MochilaMedico_Contenido_CIV =[10,20,15,2,10]; //Jip players wil have an option to teleport to his squadmates when conected. True = allow, False = not allow Colum_revive_JIPTelep=true; //The gear, heal status and position are stored on player disconnect and restored on conect. =true Enabled = false disabled. KNOWN ISUE: backpack contents and weapon on back are not saved because are local to the client :(.( that excludes the medical gear of the backpack that its added again for medics). //NOTE: this feature is stil experimental, but should work Colum_revive_DisconectSave=true; //Each X seconds player data. May generate extra traffic if combined with the next one, so use it wisely. -1 == disabled Colum_revive_DisconectSave_Time=-1; //Save backpack contents. Colum_revive_Save_Ruck=false; //allow respawn . false= if uncons time runs out you will DIE PERMANENTLY, EVEN IF YOU HAD LIFES LEFT. true= if you get out of time you will respawn on the designated respawn if you had lives left Colum_revive_Respawn=true; //If the life timer runs out with respawn active you will auto respawn on the first available respawn point. If set to false, you will get a black screen with the spawn buttons till you hit some of them Colum_revive_TimeoutAutoRespawn=true; //If enabled, allows respawn in waves instead of based on the time from your last death //params: [ first wave delay , time between waves] . all in seconds. //IMPORTANT this overrides ace_sys_spectator_RevShowButtonTime Colum_revive_WaveTime_Respawn=[-1,-1]; //Side respawns . false= everybody has the same respawn. true= each side has his own respawn points Colum_revive_Respawn_Side=false; //Side lifes . false=everybody has the same number of lifes. true= each side has his own number of lifes Colum_revive_Vidas_Side= false; //Death map Markers, false= no markers, true= wounded units would be shown on the map. Colum_revive_Death_Markers= true; //Death Messages . false=no mesages. true= a mesage will be shown when someone falls uncons. Colum_revive_Death_Messages= true; //death people leave group . Recomended true, only false if you use a stupid script that uses the leader unit to get the group in the middle of the game. Colum_revive_Death_LeaveGroup= true; //Minimun damage left after been healed with the medkit. 0 disabled. Values recomended 0.01-0.08 ace_sys_wounds_leftdam=0; //On medic revive make full heal( so you don't need to use medkit after revive, only for normal healing). True enabled, false (Default) disabled Colum_revive_Levanta_Heal=false; //Penalice Respawn button with Death. If true, if you press the respawn button you are out of the game, if false, you will only lose a life Colum_revive_RespawnButtonPunish=false; //If server fails to send the number of lifes, set it to 0. If set to false, if fails, you will get all the lifes Colum_revive_KillOnConnectFail=true; //If the player disconects while unconscious or heavy wounded, he will lose one life. This may avoid some posible exploits.= true enabled, =false disabled. Colum_revive_DisconectPunish=false; //This parameter determines wath to do if someone dies in the water, the posible options are: //0 : Do nothing . if deep water, it will be no chance to save him, escept if there is respawn :P, if not, you may be able to drag out of the water //1 : Direct death ( lifes=0 if respawn not enabled, and -1 life if respawn enabled) if the player dies and sinks in deep water //2 : The dead player floats over the water, there is 2 ways to save him. Go with a vehicle really close to him and he will get onboard automaticaly, also you can swing to him to grab him and carry him to the coast. //3 : The player is moved to the nearest coast, using norrin script. Colum_revive_WaterAction=3; //life persistance: //-1 : always persistent. Lifes will only be reseted on mision restart or using Colum_Revive_Funcion_Reset_Data function(default) //0 : non persistan lifes, players that JIP will have the max number of lifes //>1 :The lifes of the players will be reseted after some amount of time(seconds). For example if you set it to (30*60) a player that runs out of lifes when 30 mins have passed after his death, if he reconnects he will have max lifes Colum_revive_LifesPersist=-1; //Been inside or near medical vehicles/structures grants extra time to the revive counter colum_revive_medicalExtraTime=true; // Fixes some errors that may end you stuck on spectator. Added as an option because its hardcoded nature can cause troubles in future ACE spectator script changes Colum_spect_workaround=true; //Mission ends if all the players on one of the indicated sides die(no lives left or all uncons). Be aware that even if its disabled( [] ) you can use the variables : Colum_revive_AlivePlayers == 0 (all players dead) or //Colum_revive_AlivePlayers_WEST ==0(all bluefor players dead), Colum_revive_AlivePlayers_EAST,Colum_revive_AlivePlayers_GUER, Colum_revive_AlivePlayers_CIV // Its also available: Colum_revive_AliveMedics y Colum_revive_AliveMedics_SIDE with the number of alive medics/people able to revive Colum_revive_EndGameIfAllDie=[]; //example value: [west,east] //If there is no alive persons able to revive you( including AI medic from this script) players will die/respawn(if enabled) directly ( their countdown timer would be switch to 10 secs :) ) Colum_Revive_KillIfNoMedic=false; if (Colum_revive_Respawn) then { //Text of the respawn buttons, a text must be defined for each respawn point. There is no limit for the number of respawn points. Colum_revive_RespawnButton_text = ["Respawn"]; //other example : Colum_revive_RespawnButton_text = ["respawn1"]; //Name of the markers for the respawn( could be diferent from the button text, used the same just for this example) //NOTE: you can easy create a movile respawn by creating a marker and updating its position Colum_revive_RespawnMarkers= ["respawn1"]; //offset for the respawn point. Usefull for example to define respawn inside buildings or in the carrier. Colum_revive_RespawnOffset= [0,0,0,0]; //Time to appear the respawn buttons when you are wounded, in seconds ace_sys_spectator_RevShowButtonTime = 20; if (Colum_revive_Respawn_Side) then { // Side respawns if you use Colum_revive_Respawn_Side and you comment the respawn buttons markers and offsets( by placing // before them) of a side, that side will have respawn disabled. //So that way you can enable respawn only to one side //Bluefor Colum_revive_RevButtons_WEST = ["respawn1_WEST", "respawn2_WEST", "respawn3_WEST", "respawn4_WEST"]; Colum_revive_RespawnMarkers_WEST= ["respawn1_WEST", "respawn2_WEST", "respawn3_WEST", "respawn4_WEST"]; Colum_revive_RespawnOffset_WEST=[0,0,0,0]; Colum_revive_RevShowButtonTime_WEST = 80; Colum_revive_WaveTime_Respawn_WEST=[-1,-1]; //oppfor Colum_revive_RevButtons_EAST = ["respawn1_EAST", "respawn2_EAST", "respawn3_EAST", "respawn4_EAST"]; Colum_revive_RespawnMarkers_EAST= ["respawn1_EAST", "respawn2_EAST", "respawn3_EAST", "respawn4_EAST"]; Colum_revive_RespawnOffset_EAST=[0,0,0,0]; Colum_revive_RevShowButtonTime_EAST = 80; Colum_revive_WaveTime_Respawn_EAST=[-1,-1]; //Independ Colum_revive_RevButtons_GUER = ["respawn1_GUER", "respawn2_GUER", "respawn3_GUER", "respawn4_GUER"]; Colum_revive_RespawnMarkers_GUER= ["respawn1_GUER", "respawn2_GUER", "respawn3_GUER", "respawn4_GUER"]; Colum_revive_RespawnOffset_GUER=[0,0,0,0]; Colum_revive_RevShowButtonTime_GUER = 80; Colum_revive_WaveTime_Respawn_GUER=[-1,-1]; //Civil Colum_revive_RevButtons_CIV = ["respawn1_CIV", "respawn2_CIV", "respawn3_CIV", "respawn4_CIV"]; Colum_revive_RespawnMarkers_CIV= ["respawn1_CIV", "respawn2_CIV", "respawn3_CIV", "respawn4_CIV"]; Colum_revive_RespawnOffset_CIV=[0,0,0,0]; Colum_revive_RevShowButtonTime_CIV = 80; Colum_revive_WaveTime_Respawn_CIV=[-1,-1]; }; }; if (Colum_revive_Vidas_Side) then { // life number if Colum_revive_Vidas_Side= true; //lifes for bluefor team / west side Colum_revive_VidasMax_WEST=2; //lifes for opfor team / east side Colum_revive_VidasMax_EAST=3; //lifes for indepen team / guer side Colum_revive_VidasMax_GUER=4; //lifes for civilian team / CIV side Colum_revive_VidasMax_CIV=10; }; /***********************************************************************************************************************************/ /****************************************************FIN configuracion**************************************************************/ /***********************************************************************************************************************************/private["_parametro","_lanzador","_Activador"]; _parametro= _this select 3; _lanzador= _this select 0; _Activador= _this select 1; switch (_parametro) do { case 0: {[0,{[_this] spawn Colum_revive_HeliEvac}, getpos player ] call CBA_fnc_globalExecute}; case 1: {[0,{_this spawn Colum_revive_HeliEvac_VueltaBase}, _lanzador ] call CBA_fnc_globalExecute}; };private ["_Asesino","_parametros","_idJugador"]; if (Colum_revive_VidasLocal !=1000) then { //One live less Colum_revive_VidasLocal=Colum_revive_VidasLocal-1; _idJugador = getPlayerUID player; if (!isNil 'ACE_fnc_clientToServerEvent') then { ['colum_revive_UPL', [_idJugador,Colum_revive_VidasLocal]] call ACE_fnc_clientToServerEvent; } else { ['colum_revive_UPL', [_idJugador,Colum_revive_VidasLocal]] call CBA_fnc_globalEvent; // TODO: remove after stable 1.14 release }; }; if (Colum_revive_VidasLocal <= 0) exitwith {}; if ((Colum_revive_WaveTime_Respawn select 0) >=0 and (Colum_revive_WaveTime_Respawn select 1) > 0) then { _initialWave=(Colum_revive_WaveTime_Respawn select 0); _WaveDelay=(Colum_revive_WaveTime_Respawn select 1); if (time > _initialWave) then { ace_sys_spectator_RevShowButtonTime=(_WaveDelay -((time - _initialWave) % _WaveDelay)); } else { ace_sys_spectator_RevShowButtonTime=(_initialWave -time); }; }; Colum_revive_Count_Start_Time=time; Colum_revive_PlayerStatusWounded=true; Colum_Revive_Funcion_CantBeRevived_msg=false; Colum_Revive_last_respawn_msg=time+30; player setvariable["Colum_revive_isOnPMR",Colum_revive_PlayerStatusWounded,true]; sleep 0.5;// Wait for hit event ( sometimes this event was faster than hit event so no propper attacker was detected) //Count down while uncons ace_sys_spectator_can_exit_spectator=false; //[] spawn { sleep ace_sys_spectator_RevShowButtonTime; BotonesRevive=true; call Colum_Revive_CambiarBotones }; _parametros=[player,playerside]; _Asesino = [] call Colum_revive_JugadorComprobarTK; if (!isnil "_Asesino") then { _parametros=_parametros +[_Asesino]}; //Turn off the vehicle engine if this player was the driver, this will avoid "ghost choppers"( death pilot and auto-hover ON)^^. if ((vehicle player!=player)&&((driver(vehicle player))== player)) then {[] spawn {sleep 10;player action ["engineOff",(vehicle player)]}}; ['colum_revive_DeadP', _parametros] call CBA_fnc_globalEvent; While { ((player getVariable "ace_w_revive") > 0) && (alive player)} do { call Colum_Revive_NuevoLider; call Colum_revive_CheckRespawn; call colum_Revive_checkMedical; if (!(call Colum_Revive_Funcion_CanBeStillRevived)) then {call Colum_Revive_Funcion_CantBeRevived}; [] spawn Colum_Revive_Funcion_WaterAction; sleep 9; }; //Restore mapclick event(spectator removes it) if (!isnil"EventoMapClick") then { [] spawn { if (ace_sys_spectator_SPECTATINGON) then { waitUntil {!ace_sys_spectator_SPECTATINGON}}; sleep 2; waitUntil {!isNull player}; onMapSingleClick EventoMapClick; }; }; if (!alive player) then {waitUntil {alive player}}; call Colum_Revive_RenombraLider; if (Colum_revive_Levanta_Heal) then {-1 spawn Colum_Revive_Acciones}; [1,0] call Colum_Revive_Funcion_Message; if (Colum_revive_VidasLocal <= 1) then{ ace_wounds_prevtime = 0; }; // ToDo: check if this new method for last life can cause conflicts with ACE wounds. if (isnil 'ace_sys_wounds_withSpect') then { if(dialog) then{closedialog 0}; } else{ if (Colum_spect_workaround) then { //TODO: remove spectator workarounds :P if (ace_sys_spectator_SPECTATINGON) then { _timeout =time+30; waituntil{(_timeout< time) || (!(player getVariable ["ace_w_bout", false]) && ((player getVariable ["ace_w_fsm", 0])==0))}; sleep 5; call Colum_Revive_terminateSpectator; }; }; }; sleep 1; Colum_revive_PlayerStatusWounded=false; player setvariable["Colum_revive_isOnPMR",Colum_revive_PlayerStatusWounded,true]; //restore normal resp button time if was temporally changed if (!isnil "old_ace_sys_spectator_RevShowButtonTime") then { ace_sys_spectator_RevShowButtonTime=old_ace_sys_spectator_RevShowButtonTime; old_ace_sys_spectator_RevShowButtonTime=nil; }; //Funciones de la evacuacion en heli Colum_revive_AcVueltaHeli= { private ["_Heli","_Accion"]; _Heli= _this; _Accion=_Heli addAction [format["%1",8 call Colum_revive_HeliMSG], format["%1Data\accion.sqf",Colum_revive_Path], 1,0, false, true,'', '_this in (crew _target)']; _Heli setvariable ["revive_accion_Casa",_Accion]; }; Colum_revive_RMAcVueltaHeli= { private ["_Heli","_Accion"]; _Heli= _this; _Accion=_Heli getVariable "revive_accion_Casa"; _Heli removeaction _Accion; 4 spawn Colum_revive_HeliMSG; //vuelve a casa( ahorramos broadcast 1 msg) _Heli setvariable ["revive_accion_Casa",nil]; }; Colum_revive_HeliAutoExtracc= { private ["_Heli","_Accion"]; _Heli= _this; if (player in _heli) then { if (player call ace_sys_wounds_fnc_isUncon) then { { if (_x distance player < 200) then { _tmppos=_x modelToWorld [(-5 + (random 10)),(-5 + (random 10)),0]; player action ["eject", vehicle player]; waituntil {(vehicle player == player)}; sleep 5; player setpos _tmppos; }; } foreach Colum_Revive_MedicoList; }; }; }; if (!isServer) exitwith {}; /************************************************************************************************************/ /*******************************************Funciones server***************************************************/ /************************************************************************************************************/ Colum_revive_HeliEvac= { private ["_Heli","_HeliCount","_posicion","_piloto","_GrupoEvac","_playerside"]; _posicion=getpos (_this select 0); _playerside=side (group (_this select 0)); { if ((!isnull _x) && ( _x getVariable 'Colum_Revive_HeliOcupado') == 0 && (((_x getVariable "colum_heli_HeliSide") == _playerside) || !Colum_revive_PvP) )exitwith { _Heli = _x; _HeliCount= _x getVariable 'Colum_Revive_HeliNum'; } } foreach Colum_Revive_HeliList; if (isnil "_Heli") exitwith { [-1,{ 0 spawn Colum_revive_HeliMSG}, []] call CBA_fnc_globalExecute}; // No hay helis if ((_Heli distance _posicion)< 400)exitwith {[-1,{ 6 spawn Colum_revive_HeliMSG}, []] call CBA_fnc_globalExecute}; // esta demasiado cerca de la base [-1,{ 3 spawn Colum_revive_HeliMSG}, []] call CBA_fnc_globalExecute; // heli en camino _Heli setVariable ["Colum_Revive_HeliOcupado",1]; _Heli setVariable ["colum_revive_tmpInvH",objnull]; _piloto= driver _Heli; _GrupoEvac= group _piloto; _Heli engineOn true; _Heli flyInHeight 35; _GrupoEvac setBehaviour "CARELESS"; _way_count = waypoints _GrupoEvac; { deleteWaypoint _x } forEach _way_count; if(alive _Heli && isEngineOn _Heli) then{ _wpreinsert = _GrupoEvac addWaypoint [_posicion, 0]; _wpreinsert setWaypointType "MOVE"; _wpreinsert setWaypointSpeed "FULL"; _GrupoEvac setCurrentWaypoint _wpreinsert; }; _timeout = time + 120; // _timeout < time _lastpos= getpos _heli; while {((alive _piloto) && ((_heli distance _posicion) > 2000)) || ((getPosATL _Heli) select 2 < 1)} do { if (((getpos _heli distance _lastpos) < 20) &&( _timeout < time)) exitwith {}; //quieto??? ummm algo fallo _lastpos= getpos _heli; sleep 10; }; if (!alive _piloto) exitwith{}; [-1,{ 5 spawn Colum_revive_HeliMSG}, []] call CBA_fnc_globalExecute;//esperando humo _timeout = time + 120; _EncontradoHumo=false; while {(alive _piloto) && _timeout > time && !(_EncontradoHumo) && ((_heli distance _posicion) > 200)} do { //_list= nearestObjects [_posicion, ["G_40mm_SmokeGreen","SMOKESHELLGREEN"], 200]; _list=_posicion nearObjects ["SMOKESHELLGREEN",150]; if (count _list > 0) exitwith{_posicion=getpos (_list select 0); _EncontradoHumo=true}; sleep 1; _list=_posicion nearObjects ["G_40mm_SmokeGreen",150]; if (count _list > 0) exitwith{_posicion=getpos (_list select 0); _EncontradoHumo=true}; sleep 10; }; if (!alive _piloto) exitwith{}; if ( _EncontradoHumo) then { _tmpInvH= "HeliHEmpty" createvehiclelocal _posicion; _tmpInvH setpos _posicion; _Heli setVariable ["colum_revive_tmpInvH",_tmpInvH]; [-1,{ 1 spawn Colum_revive_HeliMSG}, []] call CBA_fnc_globalExecute;//Humo avistado [_Heli,_posicion] call Colum_revive_HeliEvac_Aterri; [-1,{ _this spawn Colum_revive_AcVueltaHeli}, _Heli] call CBA_fnc_globalExecute; } else { [_Heli,_posicion] call Colum_revive_HeliEvac_Aterri2; [-1,{ _this spawn Colum_revive_AcVueltaHeli}, _Heli] call CBA_fnc_globalExecute; }; }; Colum_revive_HeliEvac_Aterri= { private ["_Heli","_HeliCount","_posicion","_piloto","_GrupoEvac"]; _Heli= _this select 0; _posicion= _this select 1; _piloto= driver _Heli; _GrupoEvac= group _piloto; _HeliCount= _Heli getVariable 'Colum_Revive_HeliNum'; _Heli setVariable ["Colum_Revive_HeliOcupado",2]; // estado heli 2, aterrizando if (!alive _Heli) exitwith{}; _wpreinsert = _GrupoEvac addWaypoint [_posicion, 0]; _wpreinsert setWaypointType "MOVE"; _wpreinsert setWaypointSpeed "FULL"; _wpreinsert setWaypointStatements ["true", format["(Colum_Revive_HeliList select %1) land 'LAND';(Colum_Revive_HeliList select %1) flyInHeight 4; (Colum_Revive_HeliList select %1) setVariable ['Colum_Revive_HeliOcupado',3];",_HeliCount]]; _GrupoEvac setCurrentWaypoint _wpreinsert; _timeout = time + 80; while {(alive _Heli)&&(_timeout > time) && ((getPosATL _Heli) select 2 > 0.5)&& ((_Heli getVariable "Colum_Revive_HeliOcupado")==2)} do { sleep 10; }; if (!alive _Heli) exitwith{}; _timeout = time + 180; while {(alive _Heli)&&(_timeout > time) && ((getPosATL _Heli) select 2 > 0.5)} do { _Heli land "LAND"; sleep 10; }; if ((alive _Heli)&&(getPosATL _Heli) select 2 > 0.5) exitwith{ _heli spawn Colum_revive_HeliEvac_VueltaBase };//Si no aterriza que intente volver a base _Heli engineOn false; _way_count = waypoints _GrupoEvac; { deleteWaypoint _x } forEach _way_count; }; Colum_revive_HeliEvac_Aterri2= { private ["_Heli","_HeliCount","_posicion","_piloto","_GrupoEvac"]; _Heli= _this select 0; _posicion= _this select 1; _piloto= driver _Heli; _GrupoEvac= group _piloto; _HeliCount= _Heli getVariable 'Colum_Revive_HeliNum'; _Heli setVariable ["Colum_Revive_HeliOcupado",2]; // estado heli 2, aterrizando if (!alive _Heli || !alive _piloto) exitwith{}; _wpreinsert = _GrupoEvac addWaypoint [_posicion, 0]; _wpreinsert setWaypointType "MOVE"; _wpreinsert setWaypointSpeed "FULL"; _wpreinsert setWaypointStatements ["true", format["(Colum_Revive_HeliList select %1) land 'GET IN';(Colum_Revive_HeliList select %1) flyInHeight 4; (Colum_Revive_HeliList select %1) setVariable ['Colum_Revive_HeliOcupado',3];",_HeliCount]]; _GrupoEvac setCurrentWaypoint _wpreinsert; _timeout = time + 80; while {(alive _Heli)&&(_timeout > time) && ((getPosATL _Heli) select 2 > 3)&& ((_Heli getVariable "Colum_Revive_HeliOcupado")==2)} do { sleep 10; }; if (!alive _Heli) exitwith{}; _timeout = time + 180; while {(alive _Heli)&&(_timeout > time) && ((getPosATL _Heli) select 2 > 3)} do { _Heli land 'GET IN'; sleep 10; }; if (!alive _Heli) exitwith{}; if ((alive _Heli)&&(getPosATL _Heli) select 2 > 3) exitwith{ _heli spawn Colum_revive_HeliEvac_VueltaBase };//Si no aterriza que intente volver a base _way_count = waypoints _GrupoEvac; { deleteWaypoint _x } forEach _way_count; }; Colum_revive_HeliEvac_VueltaBase= { private ["_Heli","_HeliCount","_posicion","_piloto","_GrupoEvac","_iswater"]; _Heli= _this; _posicion=_Heli getVariable "Colum_Revive_HeliBase"; _iswater= surfaceiswater _posicion; _piloto= driver _Heli; _GrupoEvac= group _piloto; _Heli engineOn true; _Heli flyInHeight 35; _HeliCount= _Heli getVariable 'Colum_Revive_HeliNum'; _GrupoEvac setBehaviour "CARELESS"; [-1,{ _this call Colum_revive_RMAcVueltaHeli}, _Heli] call CBA_fnc_globalExecute; _Heli setVariable ["Colum_Revive_HeliOcupado",4]; // estado heli 4, vuelve a casa vueeelve if(!alive _piloto) exitwith{}; _way_count = waypoints _GrupoEvac; { deleteWaypoint _x } forEach _way_count; if (_iswater) then { _Heli setVariable ["mando_heliroute", "init"]; [_Heli,[_posicion],35, true] spawn Colum_revive_Mando_heli_Route; }else{ _wpreinsert = _GrupoEvac addWaypoint [_posicion, 0]; _wpreinsert setWaypointType "MOVE"; _wpreinsert setWaypointSpeed "FULL"; _wpreinsert setWaypointStatements ["true", format["(Colum_Revive_HeliList select %1) land 'LAND';(Colum_Revive_HeliList select %1) flyInHeight 4; (Colum_Revive_HeliList select %1) setVariable ['Colum_Revive_HeliOcupado',5];",_HeliCount]]; _GrupoEvac setCurrentWaypoint _wpreinsert; }; _timeout = time + 120; _lastpos= getpos _heli; //Esperamos a que llegue while {(alive _piloto) && ((_heli distance _posicion) > 300)} do { if (((getpos _heli distance _lastpos) < 20) &&( _timeout < time)) exitwith {}; //quieto??? ummm algo fallo _lastpos= getpos _heli; sleep 10; }; if(!alive _piloto) exitwith{}; _GrupoEvac setSpeedMode "LIMITED";// Esta cerca, vamos frenando _Heli limitSpeed 60; _timeout = time + 120; while {(alive _piloto)&&(_timeout > time) && ((getPosATL _Heli) select 2 > 0.5)&& ((_Heli getVariable "Colum_Revive_HeliOcupado")==4)&& ((_Heli getVariable "mando_heliroute")!='waiting')} do { sleep 10; }; if(!alive _piloto) exitwith{}; if (!_iswater) then { //if not is water, manual landing, softer than mando heli route :P _timeout = time + 50; while {(_timeout > time) && ((getPosATL _Heli) select 2 > 0.5)} do { _Heli land "LAND"; sleep 10; }; }; if (alive _Heli && (Alive (driver _Heli))) then { _Heli setVariable ["Colum_Revive_HeliOcupado",0]; _Heli engineOn false; if (!_iswater) then {_Heli setpos _posicion}; _Heli setdamage 0; _Heli setfuel 1; [-1,{ _this spawn Colum_revive_HeliAutoExtracc}, _Heli] call CBA_fnc_globalExecute;//autoextraemos los incoscientes }; if (!isnull (_Heli getVariable ["colum_revive_tmpInvH",objnull])) then {deletevehicle (_Heli getVariable ["colum_revive_tmpInvH",objnull])}; }; Colum_revive_Helidestruido={ private ["_Heli","_typeName","_newHelo","_crewhelo","_grouphelo","_helorespawnTime","_posHelo","_dirHelo"]; _Heli= _this select 0; _position=_this select 1; _piloto=_this select 2; if(_position !="driver" )exitwith{}; _piloto removeEventHandler ["killed",(_piloto getvariable ["colum_revive_pilotoEH",0])]; [_piloto] call Colum_revive_HeliPilotoMuerto; }; Colum_revive_HeliPilotoMuerto= { private ["_Pilot","_Heli","_typeName","_newHelo","_crewhelo","_grouphelo","_helorespawnTime","_posHelo","_dirHelo"]; _Pilot=_this select 0; _Heli =Colum_Revive_HeliList select (_Pilot getVariable "Colum_Revive_HeliNum"); _Heli removeEventHandler ["GetOut",(_Heli getvariable ["colum_revive_heliEH",0])]; _typeName=typeof _Heli; _Heli setfuel 0;//quitamos gasofa si matan al piloto, para evitar cabroncetes xD if ((_heli getVariable ["colum_heli_respawn",0])>0 ) then { _grouphelo= group _Pilot; _way_count = waypoints _grouphelo; {deleteWaypoint _x} forEach _way_count; _helorespawnTime=(_heli getVariable ["colum_heli_respawn",0]); _posHelo=(_Heli getVariable "Colum_Revive_HeliBase"); _dirHelo=(_Heli getVariable "Colum_Revive_HeliBaseDir"); _crewhelo=_Heli getVariable "colum_heli_crew"; sleep (_heli getVariable ["colum_heli_respawn",0]); { if (!isplayer _x) then { _x setdamage 1; deletevehicle _x; }; } foreach units _grouphelo; deletevehicle _Heli; _sideGroup= side _grouphelo; deletegroup _grouphelo; // workaround, delete and create group. Seems that the AI always try to reach last waypoint even after deleting them.. _grouphelo=creategroup _sideGroup; _newHelo= createVehicle [_typeName,_posHelo,[], 0, "CAN_COLLIDE"]; { _unit= _grouphelo createUnit [(_x select 0), _posHelo, [], 0, "NONE"]; [_unit, [_newHelo,(_x select 1)]] call colum_revive_GetInVeh; } foreach _crewhelo; //[(_Heli getVariable "Colum_Revive_HeliBase"),(_Heli getVariable "Colum_Revive_HeliBaseDir"),_typeName,(_Heli getVariable "colum_heli_HeliSide")] call BIS_fnc_spawnVehicle; _newHelo engineOn false; [-2, {_this call colum_revive_fnc_respawn_helo}, [_newHelo,Colum_revive_Accion_condicion,_helorespawnTime]] call CBA_fnc_globalExecute; }; }; colum_revive_fnc_respawn_helo={ _this execVM format["%1MedEvac\Helicoptero.sqf",Colum_revive_Path]; (_this select 0) lock false; }; Colum_revive_Mando_heli_Route= { //Based on Mando heli route. http://www.armaholic.com/page.php?id=6959 //All credits to Mandoble for this function. It has some modifications from the base one to adapt it to my medevac script, but most of the script is still intact //Used only for the base return, to get the IA land on the carrier ^^ private["_heli", "_route", "_endpos", "_height", "_landing ", "_pilot", "_i", "_j", "_pos", "_dist", "_distold", "_angh", "_dir", "_accel", "_speed", "_steps", "_inipos", "_offset"]; _heli = _this select 0; _route = _this select 1; _height = _this select 2; _landing = _this select 3; // First of all chopper gets its indicated flying height for the route _pilot = driver _heli; _heli setVariable ["mando_heliroute", "busy"]; _heli flyinHeight _height; _pilot doMove [getPos _heli select 0, getPos _heli select 1, _height]; Sleep 2; while {(!unitReady _pilot)&&(alive _pilot)&&(damage _heli < 0.5)} do { Sleep 2; }; if (!(alive _pilot) || (damage _heli >= 0.5)) exitWith {_heli setVariable ["mando_heliroute", "damaged"];}; // The chopper moves through the route positions for [{_j = 0},{_j < count _route},{_j = _j + 1}] do { _endpos = _route select _j; _inipos = getPos _heli; _dist = sqrt(((_endpos select 0) - (_inipos select 0))^2 + ((_endpos select 1) - (_inipos select 1))^2); _steps = _dist / 3000; _steps = _steps - (_steps % 1); _ang = ((_endpos select 0) - (_inipos select 0)) atan2 ((_endpos select 1) - (_inipos select 1)); // Each route position is reached in steps no larger than 3Km for [{_i = 0},{_i < _steps},{_i = _i + 1}] do { _pos = [(_inipos select 0) + sin(_ang)*3000*_i,(_inipos select 1) + cos(_ang)*3000*_i]; _pilot doMove _pos; Sleep 2; if (_i < (_steps - 1)) then { _offset = 5; } else { _offset = 1; }; while {((sqrt(((_pos select 0) - (getPos _heli select 0))^2 + ((_pos select 1) - (getPos _heli select 1))^2))>500)&&(alive _pilot)&&(damage _heli < 0.5)} do { Sleep 2; }; if (!(alive _pilot) || (damage _heli >= 0.5)) exitWith {}; }; if (!(alive _pilot) || (damage _heli >= 0.5)) exitWith {}; _pilot doMove _endpos; Sleep 2; while {((!unitReady _pilot) || (abs(speed _heli) > 1))&&(alive _pilot)&&(damage _heli < 0.5)} do { Sleep 0.2; }; if (!(alive _pilot) || (damage _heli >= 0.5)) exitWith {}; }; while {(abs(vectorUp _heli select 2) < 0.996)&&(alive _pilot)&&(damage _heli < 0.5)} do { Sleep 0.2; }; if (!(alive _pilot) || (damage _heli >= 0.5)) exitWith { _heli setVariable ["mando_heliroute", "damaged"]; }; _pilot doMove [getPos _heli select 0, getPos _heli select 1]; // If chopper is not closer than 2m to final route point, it aligns with it and moves towards it _dist = sqrt(((_endpos select 0) - (getPos _heli select 0))^2 + ((_endpos select 1) - (getPos _heli select 1))^2); _dir = getDir _heli; if (_dist > 2) then { _pos = _heli worldToModel _endpos; _angh = (_pos select 0) atan2 (_pos select 1); _dist = sqrt((_pos select 0)^2+(_pos select 1)^2); for [{_i = 0},{_i < abs(_angh)},{_i = _i + 1}] do { if (!(alive _pilot) || (damage _heli >= 0.5)) exitWith {}; _heli setDir ((getDir _heli)+abs(_angh)/_angh); _heli setVelocity [0,0,0]; Sleep 0.05; }; }; _heli setDir (_dir + _angh); _dir = getDir _heli; _distold = 99999; _dist = 99998; _speed = 0; while {(_distold >= _dist) && (alive _pilot) && (damage _heli < 0.5)} do { if (_speed < 7) then { _speed = _speed + 0.1; }; _distold = _dist; _dist = sqrt(((_endpos select 0) - (getPos _heli select 0))^2 + ((_endpos select 1) - (getPos _heli select 1))^2); _heli setVelocity [sin(_dir)*_speed, cos(_dir)*_speed, 0]; _heli setDir _dir; Sleep 0.005; }; if (!(alive _pilot) || (damage _heli >= 0.5)) exitWith { _heli setVariable ["mando_heliroute", "damaged"]; }; // Do we need to land? if (_landing) then { while {(isEngineOn _heli) && (alive _pilot) && (damage _heli < 0.5)} do { if ((getPos _heli select 2) > ((_endpos select 2) + 1)) then { _heli setDir _dir; if ((getPos _heli select 2) > ((_endpos select 2) + 5)) then { _heli setVelocity [0,0,-7]; } else { _heli setVelocity [0,0,7*((getPos _heli select 2)-(_endpos select 2))/-5 min -1]; }; } else { _pilot action ["ENGINEOFF", _heli]; _heli setVelocity [0,0,0]; }; Sleep 0.01; }; for [{_i = 0},{_i < 100},{_i = _i + 1}] do { _heli setVelocity [0,0,-0.1]; Sleep 0.05; }; if (!(alive _pilot) || (damage _heli >= 0.5)) exitWith {}; _heli setVariable ["mando_heliroute", "waiting"]; while {(alive _pilot) && (damage _heli < 0.5) && ((_heli getVariable "mando_heliroute") == "waiting")} do { _pilot action ["ENGINEOFF", _heli]; Sleep 0.01; }; } else { _heli setVariable ["mando_heliroute", "waiting"]; }; if (!(alive _pilot) || (damage _heli >= 0.5)) exitWith { _heli setVariable ["mando_heliroute", "damaged"]; }; };Colum_revive_JugadorHit= { Private['_jugador','_causante','_dano']; _jugador=_this select 0; _causante=_this select 1; _dano=_this select 2; if ((!isplayer _causante)||(!local _jugador)) exitwith{}; _jugador setvariable ['UltAtack', [time,_causante]]; }; Colum_revive_JugadorComprobarTK= { Private['_datos','_causante','_tiempo']; _datos= player getVariable 'UltAtack'; if (!isnil "_datos") then { _tiempo=_datos select 0; _causante=_datos select 1; if ((time -_tiempo ) < 20) then { //Fue hace poco asique se supone que el lo mato , cabronazo xD. if (_causante != player) then { if ((side _causante ) == playerSide) then { [3,_causante] call Colum_Revive_Funcion_Message; } else { [4,0] call Colum_Revive_Funcion_Message; }; _causante } else { [5,0] call Colum_Revive_Funcion_Message; }; }; }; }; Player addEventHandler ['Hit', {_this spawn Colum_revive_JugadorHit}];///Easier translations, all messages here Colum_Revive_Funcion_Message = { private ["_MessageID","_Params"]; _MessageID= _this select 0; _Params= _this select 1; switch (_MessageID) do { case 1: {hint format["Lifes: %1 of %2",Colum_revive_VidasLocal-1,Colum_revive_VidasMax-1];}; case 2: {"You are death"}; case 3: {10 cutText [format["You are heavily wounded: You where wounded by %1. FRIENDLY FIRE",name _Params],"PLAIN",1];}; case 4: {10 cutText ["You are heavily wounded","PLAIN",1];}; case 5: {10 cutText ["You are heavily wounded:You committed suicide","PLAIN",1];}; case 6: {10005 cutText ["You have entered a medic zone. Wait to be healed...","PLAIN",2];}; case 7: {10 cutText ["Please, ONLY use respawn button in needed situations","BLACK"];}; case 8: {10 cutText ["Respawning...","PLAIN DOWN"];}; case 9: {10 cutText ["Press F12 within the next 5 minutes to teleport with your squad/allies","PLAIN",2];}; case 10: {[playerSide, "HQ"] sideChat format["%1 Friendly Fire!!, you have wounded %2",name (_Params select 0),name (_Params select 1)];}; case 11: {format["%1 is heavily wounded", name _Params] call CBA_fnc_systemChat;}; case 12: {Hint 'JIP failure to retrieve lifes, please report this error';diag_log['Revive failed to retrieve lifes from server, may be cause by extreme script lag'];}; case 13: {titlecut ["Your body is washing ashore please wait","BLACK FADED",5]}; case 14: {format["%1 wounded",(name _Params)];}; case 15: {format["(%1)More...",Colum_revive_RespawnButton_Pos+1];}; case 16: {10 cutText ["There is no medics left alive, so you won't be able to be revived","PLAIN",3];}; case 17: {10013 cutText [format["Respawn available in: %1",_Params],"PLAIN DOWN",2];}; default {}; }; }; Colum_revive_HeliMSG= { switch(_this) do { case 0: { [playerside,"HQ"] sidechat "There is no medevac avaliable at the moment"}; case 1: { [playerside,"HQ"] sidechat "Smoke in sight"}; case 2: { [playerside,"HQ"] sidechat "We can't locate the smoke, we are low of fuel, returning to base"}; case 3: { [playerside,"HQ"] sidechat "HQ understood, sending medevac. Get ready to throw green smoke"}; case 4: { [playerside,"HQ"] sidechat "Roger, medevac returnig base"}; case 5: { [playerside,"HQ"] sidechat "Medevac aproaching landing zone, mark a safe zone with green smoke"}; case 6: { [playerside,"HQ"] sidechat "Negative, you are almost in the base."}; case 7: {"Call medevac"}; case 8: {"Everybody in, GO GO GO!."}; }; };#include "\x\ace\addons\main\script_mod.hpp" #include "\x\ace\addons\main\script_macros.hpp" #include "\ca\editor\Data\Scripts\dikCodes.h" private ["_menuDef", "_target", "_params", "_menuName", "_menuRsc", "_menus"]; PARAMS_2(_target,_params); _menuName = ""; _menuRsc = "buttonList"; if (typeName _params == typeName []) then { if (count _params < 1) exitWith {diag_log format["Error: Invalid params: %1, %2", _this]}; _menuName = _params select 0; _menuRsc = if (count _params > 1) then {_params select 1} else {_menuRsc}; } else { _menuName = _params; }; _puedeLLamar= call compile Colum_revive_Accion_condicion; _menus = [ [ ["main", localize "STR_ACE_MENU_EQUIPPLAYER", _menuRsc], [ ["MedEvac >", "", "", "", [format["%1Data\menu\fnc_menuDef_Self.sqf",Colum_revive_Path], "Revive_medevac", 1], -1, -1, ACE_SELFINTERACTION_RESTRICTED] ] ] ]; if (_menuName == "Revive_medevac") then { _menus set [count _menus, [ ["Revive_medevac", "MedEvac", _menuRsc, "\ca\air\Data\map_ico\"], [ [7 call Colum_revive_HeliMSG, { [0,{[_this] spawn Colum_revive_HeliEvac}, player] call CBA_fnc_globalExecute }, "icomap_mh60mg_ca.paa","","", -1, _puedeLLamar && ACE_SELFINTERACTION_RESTRICTED] ] ] ]; }; _menuDef = []; { if (_x select 0 select 0 == _menuName) exitWith {_menuDef = _x}; } forEach _menus; if (count _menuDef == 0) then { hintC format ["Error: Menu not found: %1\n%2\n%3", str _menuName, if (_menuName == "") then {_this} else {""}, __FILE__]; diag_log format ["Error: Menu not found: %1, %2, %3", str _menuName, _this, __FILE__]; }; _menuDef//Script que se ejecuta cuando al jugador no le quedan mas vidas private ["_Escuadra","_uncon","_timeout","_idJugador"]; //vidas del jugador a 0 Colum_revive_VidasLocal=0; _idJugador = getPlayerUID player; if ((_this select 0) ==0) then { //No need to udpate if connected with already 0 lifes if (!isNil 'ACE_fnc_clientToServerEvent') then { ['colum_revive_UPL', [_idJugador,Colum_revive_VidasLocal]] call ACE_fnc_clientToServerEvent; } else { ['colum_revive_UPL', [_idJugador,Colum_revive_VidasLocal]] call CBA_fnc_globalEvent; // TODO: remove after stable 1.14 release }; }; //Esto pasa si pulsan respawn mientras tan con cuenta atras if ((player getVariable "ace_w_revive") > 0) then { player setVariable ["ace_w_revive",0]; sleep 1}; //esperamos q haga respawn si esta muerto if (!(alive player)) then { waitUntil {alive player}}; player setPos getMarkerPos "Boot_hill"; //player SetVariable ["ace_sys_wounds_uncon",true,true]; // can cause problems with ACRE detecting unit wounded? player SetVariable ["ace_sys_spectator_exclude",true,true]; // Changed to public setvar instead of using ace_sys_wounds_uncon //cambio de lider if (Colum_revive_Death_LeaveGroup) then { [player] joinsilent grpnull; } else { call Colum_Revive_NuevoLider; if (isnil 'Revive_bucle_Control_Lider') then { Revive_bucle_Control_Lider=true; [] spawn { While {true} do { sleep 30; call Colum_Revive_NuevoLider}}; }; }; titleText [([2,0] call Colum_Revive_Funcion_Message),"BLACK"]; titlecut [([2,0] call Colum_Revive_Funcion_Message),"PLAIN",2]; if (Colum_revive_PlayerStatusWounded) then {waituntil {!Colum_revive_PlayerStatusWounded}}; sleep 0.5; if (!Colum_revive_AfterDeadSpect) exitwith{ sleep 6; failMission "LOSER"; forceEnd; }; if (Colum_spect_workaround) then { //TODO: remove spectator workarounds :P call Colum_Revive_terminateSpectator; }else{ ace_sys_spectator_exit_spectator = true; _timeout =time+4; waituntil {(_timeout< time) || !ace_sys_spectator_SPECTATINGON}; }; if (!isnil "acre_api_fnc_setSpectator") then {[true] call acre_api_fnc_setSpectator}; titleText ["","BLACK IN"]; sleep .1; ace_sys_spectator_ShownSides=nil;ace_sys_spectator_maxDistance=nil; ace_sys_spectator_CheckDist=nil; ace_sys_spectator_CheckUncon = true; ace_sys_spectator_no_butterfly_mode = true; ace_sys_spectator_can_exit_spectator=false; ace_sys_spectator_playable_only = not Colum_revive_VerEnemigos; if (!Colum_revive_VerEnemigos) then {ace_sys_spectator_ShownSides=[playerside]}; ace_sys_spectator_RevButtons= nil; ace_sys_spectator_RevShowButtonTime= nil; [player, player, ''] spawn ace_fnc_startSpectator; sleep .1; player setPos getMarkerPos "Boot_hill"; player setCaptive true; sleep .1; player playMoveNow "AdthPercMstpSrasWrflDb_16"; sleep .1; player switchmove "AdthPercMstpSrasWrflDb_16"; titlecut [([2,0] call Colum_Revive_Funcion_Message),"PLAIN",2]; //Script que controla al medico del medevac private['_Helicoptero','_HelipuertoBase','_Helinum','_condicion']; _Helicoptero=_this select 0; _HeliRespawnTime=if (count _this > 2) then {_this select 2} else {0}; _HeliSide=if (count _this > 3) then {_this select 3} else {side (group (driver _Helicoptero))}; if (_HeliSide== sideUnknown) then {_HeliSide=side (group (driver _Helicoptero))}; waituntil {!isnil 'Colum_revive_Path'}; if (!isDedicated) then { waituntil {!isnull player}; if (playerside == _HeliSide) then { _condicion ='[player] call ACE_fnc_HasRadio'; Colum_revive_Accion_condicion=if (count _this > 1) then {_this select 1} else {_condicion}; if (Colum_revive_Accion_condicion == "") then {Colum_revive_Accion_condicion = 'true'}; if (isnil { player getvariable 'Colum_revive_Accion_evacSan'}) then { _accion=true; ["player", [ace_sys_interaction_key_self], 4, [format['%1Data\menu\fnc_menuDef_Self.sqf',Colum_revive_Path], "main"]] call CBA_ui_fnc_add; //_accion=player addAction ["Pedir evacuacion medica", "revive\Data\accion.sqf", 0, 0, false, true,'', _condicion]; player setvariable ['Colum_revive_Accion_evacSan',_accion]; }; }; }; execVM format['%1Data\Fun_Heli.sqf',Colum_revive_Path]; _Helicoptero lockDriver true; _Helicoptero setVariable ["ace_w_heal", true];//vehiculo medico if (!isserver) exitwith{}; //Solo el servidor a partir de aqui if (isnil "Colum_Revive_HeliList") then {Colum_Revive_HeliList=[]}; _Helinum= count Colum_Revive_HeliList; Colum_Revive_HeliList=Colum_Revive_HeliList+[_Helicoptero]; _list= nearestObjects [_Helicoptero, ["HeliH"], 15]; if ((count _list) > 0) then { _HelipuertoBase=_list select 0; } else { if ((getposATL _Helicoptero select 2) < 5) then { _HelipuertoBase = createVehicle ["HeliHRescue", getpos _Helicoptero, [], 0, "CAN_COLLIDE"]; }; }; _Helicoptero setVariable ["Colum_Revive_HeliBase",getpos _Helicoptero]; _Helicoptero setVariable ["Colum_Revive_HeliBaseDir",getdir _Helicoptero]; _Helicoptero setVariable ["Colum_Revive_HeliNum",_Helinum]; (driver _Helicoptero) setVariable ["Colum_Revive_HeliNum",_Helinum]; _Helicoptero setVariable ["Colum_Revive_HeliOcupado",0]; _Helicoptero setVariable ["colum_heli_respawn",_HeliRespawnTime]; _Helicoptero setVariable ["colum_heli_HeliSide",_HeliSide]; _Helicrew=[]; { _tmparr=[typeof _x,assignedVehicleRole _x]; _Helicrew=_Helicrew+[_tmparr]; }foreach crew _Helicoptero; _Helicoptero setVariable ["colum_heli_crew",_Helicrew]; _ehID=(driver _Helicoptero) addEventHandler["killed", {_this spawn Colum_revive_HeliPilotoMuerto}]; _piloto setvariable ["colum_revive_pilotoEH",_ehID]; _ehID=_Helicoptero addEventHandler["GetOut", {_this spawn Colum_revive_Helidestruido}]; _Helicoptero setvariable ["colum_revive_heliEH",_ehID];//Script que controla al medico del medevac private['_Medico','_RadioAccion']; _Medico=_this select 0; _RadioAccion=_this select 1; _tmpBando=if ((count _this) > 2) then {_this select 2;} else {playerside}; _bando=_tmpBando; if (isnil "Colum_Revive_MedicoList") then {Colum_Revive_MedicoList=[]}; Colum_Revive_MedicoList=Colum_Revive_MedicoList+[_Medico]; if (typename _tmpBando == "SIDE") then {_bando=[_tmpBando]}; _medico setvariable ["colum_revive_side",_bando]; if ( ! isDedicated) then { [_Medico,_RadioAccion,_bando] spawn { private ["_Medico","_RadioAccion","_ORGpos","_bando"]; _Medico= _this select 0; _RadioAccion= _this select 1; _bando= _this select 2; _ORGpos= getPos _medico; while {alive _medico} do { if (playerside in _bando) then { if (((player distance _ORGpos)< _RadioAccion)&& (vehicle player == player)) then { _Medico call Colum_revive_LLamar_Medico}; sleep 15; }; }; }; }; if (isServer) then { _Medico setVariable ["Colum_Revive_RadioAccion",_RadioAccion]; _Medico setvariable ["Posicion_originall",getpos _Medico]; Colum_revive_AtencionMedica= { private ["_Medico","_PacienteActual","_RadioAccion","_timeout","_intentos"]; _Medico= _this select 0; _PacienteActual= _this select 1; if (alive _medico) then { _RadioAccion= _Medico getVariable "Colum_Revive_RadioAccion"; if ((_PacienteActual distance _Medico) <= (_RadioAccion *2)) then // Esta cerca? { _intentos=0; while {_intentos < 5} do { (group _Medico) setSpeedMode "FULL"; _Medico domove (getPos _PacienteActual); (group _Medico) setSpeedMode "FULL"; _timeout = time + 10; waitUntil {moveToCompleted _Medico || moveToFailed _Medico || !alive _Medico || !canmove _Medico || _timeout < time}; if ((_PacienteActual distance _Medico) < 5) then { _Medico playMove "AinvPknlMstpSlayWrflDnon_medic"; [-1,{ if (player==_this) then {sleep 5; call Colum_Revive_PlayerTotalHeal;}}, _PacienteActual] call CBA_fnc_globalExecute; _intentos=5; }; _intentos=_intentos+1; sleep 0.1; }; }; _Medico setVariable ["Colum_Revive_Paciente",nil]; (group _Medico) setSpeedMode "LIMITED"; _Medico domove (_Medico getVariable "Posicion_originall"); (group _Medico) setSpeedMode "LIMITED"; }; }; }; //Script simple de revive usando el A.C.E. Wounding module //Version 2.0 Diag_log['Initializing Revive ACE wounds 2.0']; if (!isnil 'Colum_revive_Initialized') exitwith{Diag_log['WARNING Revive ACE wounds, multiple instances detected!'];}; Colum_revive_Initialized=true; Colum_revive_Path='revive\'; call compile preprocessFileLineNumbers format['%1Configuracion.sqf',Colum_revive_Path]; call compile preprocessFileLineNumbers format['%1Data\language.sqf',Colum_revive_Path]; /*******************************************************Config Check*******************************************************/ /*******************************************************============*******************************************************/ if (isnil 'Colum_revive_Conf_Lifes') then {Colum_revive_Conf_Lifes=2}; if (isnil 'ace_sys_wounds_noai') then {ace_sys_wounds_noai= true}; if (isnil 'ace_wounds_prevtime') then {ace_wounds_prevtime=400}; if (isnil 'ace_sys_wounds_withSpect') then {ace_sys_wounds_withSpect=true}; if (isnil 'Colum_revive_TKcheck') then {Colum_revive_TKcheck=true}; if (isnil 'Colum_revive_AfterDeadSpect') then {Colum_revive_AfterDeadSpect=true}; if (isnil 'Colum_revive_VerEnemigos') then {Colum_revive_VerEnemigos=true}; if (isnil 'Colum_revive_PvP') then {Colum_revive_PvP=false}; if (isnil 'Colum_revive_MochilaMedico') then {Colum_revive_MochilaMedico="ACE_VTAC_RUSH72_TT_MEDIC";}; if (isnil 'Colum_revive_MochilaMedico_Contenido') then {Colum_revive_MochilaMedico_Contenido=[10,20,15,2,12]}; if (isnil 'Colum_revive_JIPTelep') then {Colum_revive_JIPTelep=true}; if (isnil 'Colum_revive_Respawn') then {Colum_revive_Respawn=false}; if (isnil 'Colum_revive_TimeoutAutoRespawn') then {Colum_revive_TimeoutAutoRespawn=true}; if (isnil 'Colum_revive_Respawn_Side') then {Colum_revive_Respawn_Side=false}; if (isnil 'Colum_revive_Vidas_Side') then {Colum_revive_Vidas_Side=false}; if (isnil 'Colum_revive_Death_Markers') then {Colum_revive_Death_Markers=true}; if (isnil 'Colum_revive_Death_Messages') then {Colum_revive_Death_Messages=true}; if (isnil 'Colum_revive_Death_LeaveGroup') then {Colum_revive_Death_LeaveGroup=true}; if (isnil 'Colum_revive_Levanta_Heal') then {Colum_revive_Levanta_Heal=false}; if (isnil 'Colum_revive_KillOnConnectfail') then {Colum_revive_KillOnConnectfail=true}; if (isnil 'Colum_revive_RespawnButtonPunish') then {Colum_revive_RespawnButtonPunish=true}; if (isnil 'Colum_revive_WaterAction') then {Colum_revive_WaterAction=0}; if (isnil 'Colum_revive_DisconectSave') then {Colum_revive_DisconectSave=false}; if (isnil 'Colum_revive_DisconectSave_Time') then {Colum_revive_DisconectSave_Time=-1}; if (isnil 'Colum_revive_DisconectPunish') then {Colum_revive_DisconectPunish=false}; if (isnil 'Colum_revive_WoundScoring') then {Colum_revive_WoundScoring=true}; if (isnil 'Colum_revive_LifesPersist') then {Colum_revive_LifesPersist=-1}; if (isnil 'Colum_spect_workaround') then {Colum_spect_workaround=true}; if (isnil 'colum_revive_medicalExtraTime') then {colum_revive_medicalExtraTime=true}; if (isnil 'Colum_revive_EndGameIfAllDie') then {Colum_revive_EndGameIfAllDie=[]}; if (isnil 'Colum_Revive_KillIfNoMedic') then {Colum_Revive_KillIfNoMedic=false}; if (isnil 'Colum_revive_WaveTime_Respawn') then {Colum_revive_WaveTime_Respawn=[-1,-1]}; if (isnil 'Colum_revive_Save_Ruck') then {Colum_revive_Save_Ruck=false}; Colum_Revive_ID_list=[]; ace_sys_wounds_no_rpunish=true;//no need to punish already handled by the revive script ace_sys_spectator_fnc_rbutton1={0 spawn Colum_Revive_Acciones}; ace_sys_spectator_fnc_rbutton2={1 spawn Colum_Revive_Acciones}; ace_sys_spectator_fnc_rbutton3={2 spawn Colum_Revive_Acciones}; ace_sys_spectator_fnc_rbutton4={3 spawn Colum_Revive_Acciones}; Colum_revive_RespawnButton_Pos=0; //button index Colum_revive_PlayerStatusWounded=false; //player in wounded status( countdown) colum_revive_telepEnabled=false; // already teleported colum_revive_lastSavedRuck=[[],[]]; //last saved ruck contents colum_revive_lastRuckChanged=false; //ruck changed event Colum_revive_enLimbo=false; //player timer run out Colum_revive_extraTime=false; _posbothil=getMarkerPos "Boot_hill"; if (((_posbothil select 0) == 0)&&((_posbothil select 1) == 0)) then // if doesn't exists we create a new one { //Default positions if Boot_hill marker not found. Some islands skiped( like takistan) because doesn't need a custom location, [0,0,0] is valid for them. _Posbothil = switch toLower(worldName) do { case 'isoladicapraia': {[2849.75,4524.65,0]}; case 'everon2010': {[-1350.59,6261.12,0]}; case 'queshkibrul': {[2798.63,4431.92,0]}; case 'chernarus': {[-6032.46,19052.2,0]}; case 'utes': {[1901.67,4361.25,0]}; case 'fallujah': {[9207.25,-1499.34,0]}; case 'sbrodj': {[6501.62,18996.1,0]}; case 'spritzisland': {[7069.92,9650.15,0]}; case 'namalsk': {[8263.72,7723.37,0]}; case 'kolgujev2010': {[6902.75,16710.5,0]}; case 'isladuala': {[1562.01,9274.87,0]}; case 'lingor': {[11675.51,4783.38,0]}; case 'tropica': {[13383.4,2598.89,0]}; case 'vostok': {[3734.43,3813.38,0]}; case 'villa_afgana': {[-842.853,-660.164,0]}; case 'i44_omaha': {[4691.02,404.848,0]}; case 'csj_sea': {[175.11,106.138,0]}; case 'uns_dong_ha': {[4749.26,5208.86,0]}; case 'vte_7m': {[12651.6,6749.55,0]}; case 'vte_25km_demo': {[20865.3,25423.2,0]}; case 'vte_ashau': {[4000.83,11724.2,0]}; case 'vte_australianao': {[691.541,5851.64,0]}; case 'vte_bra': {[199.314,9448.85,0]}; case 'vte_iadrang': {[1239.95,692.014,0]}; case 'vte_iiictza': {[11350.2,65.8973,0]}; case 'vte_khesanh': {[11351.2,6950.75,0]}; case 'vte_mdsz': {[8237.09,8495.96,0]}; case 'vte_meekong': {[8926.51,1196.67,0]}; case 'nam_12': {[123.736,4143.98,0]}; case 'nam_25': {[25445.6,66.6589,0]}; case 'vte_poleikleng': {[10797.2,4600.74,0]}; case 'vte_quanbinhson': {[11234,4198.08,0]}; case 'vte_rssz': {[551.878,404.413,0]}; case 'vte_vinhthanh': {[12496.4,3692.37,0]}; default {[0,0,0]}; }; createMarkerLocal ["Boot_hill", _Posbothil]; }; _poscenter=getMarkerPos "center"; if (((_poscenter select 0) == 0)&&((_poscenter select 1) == 0)) then // if doesn't exists we create it { _Poscenter = getArray(configFile >> "CfgWorlds" >> worldName >> "centerPosition"); createMarkerLocal ["center", _Poscenter]; }; { _posrespawn=getMarkerPos _x; if (((_posrespawn select 0) == 0)&&((_posrespawn select 1) == 0)) then // if doesn't exists we create it { createMarkerLocal [_x, getMarkerPos "Boot_hill"]; }; }foreach["respawn_west","respawn_east","respawn_guerrila","respawn_civilian"]; if (!ace_sys_wounds_withSpect) then {ace_sys_wounds_withSpect=nil}; if (Colum_revive_DisconectSave_Time > 0) then {Colum_revive_DisconectSave=true}; if (isNil "ace_sys_wounds_enabled") then {ace_sys_wounds_enabled=true};//If not enabled, enable ace W. sys. colum_revive_LastSave=time+60; //Life loss event script Colum_revive_evento_HeridoGrave= compile preprocessFileLineNumbers format['%1Data\Evento_herido.sqf',Colum_revive_Path]; /***********************************************************************************************/ //Init number of lifes Colum_revive_VidasLocal=nil; //Old param read, only left here for retrocompatibility. if (! isNil "_this" ) then { if (count _this > 0) then { Colum_revive_VidasMax= _this select 0 }; if (count _this > 1) then { ace_wounds_prevtime= _this select 1 }; if (count _this > 2) then { ace_sys_wounds_noai= _this select 2 }; if (count _this > 3) then { ace_sys_wounds_withSpect= _this select 3 }; }; if (isnil 'Colum_revive_VidasMax') then { Colum_revive_VidasMax=Colum_revive_Conf_Lifes}; if (Colum_revive_VidasMax <= 0) then { Colum_revive_VidasMax=1 }; // At least one life //Asignacion de vidas //Esperamos a que se sincronice el jugador T_INIT = false; T_Server = false; T_Client = false; T_JIP = false; T_MP = (if (playersNumber east + playersNumber west + playersNumber resistance + playersNumber civilian > 0) then {true} else {false}); if (isServer) then { T_Server = true; if (!isNull player) then {T_Client = true}; T_INIT = true; } else { T_Client = true; if (isNull player) then { T_JIP = true; [] spawn {waitUntil {!isNull player};T_INIT = true}; } else { T_INIT = true; }; }; waitUntil {T_INIT}; if (T_Server) then { [] spawn {Colum_revive_Iniciado = false; PublicVariable 'Colum_revive_Iniciado'; sleep 60; Colum_revive_Iniciado = true; PublicVariable 'Colum_revive_Iniciado'; if (Colum_revive_DisconectSave||Colum_revive_DisconectPunish) then{ onPlayerDisconnected "[_id, _name, _uid] spawn Colum_revive_Fnc_Disconect" }; }; }; /************************************************CBA EVENT HANDLERS ************************************************************************/ if (!isnil "ACE_fnc_addClientToServerEventhandler") then { ['colum_revive_UPL', {_this spawn Colum_revive_Update_vidas}] call ACE_fnc_addClientToServerEventhandler; ['colum_revive_MedCall', {_this spawn Colum_revive_LLamada_Medica}] call ACE_fnc_addClientToServerEventhandler; ['colum_revive_REQL', {_this spawn Colum_revive_Consulta_Vidas}] call ACE_fnc_addClientToServerEventhandler; ['colum_revive_Save', {_this spawn Colum_revive_fcn_Save_PJ}] call ACE_fnc_addClientToServerEventhandler; ['colum_revive_FIJV', {_this spawn Colum_revive_FijarVidas}] call ACE_fnc_addReceiverOnlyEventhandler; ['colum_revive_WResp', {ace_sys_spectator_RevShowButtonTime=(_this select 1)}] call ACE_fnc_addReceiverOnlyEventhandler; } else { // TODO: remove after ACE stable 1.14 //old ACE version retro compact: ['colum_revive_UPL', {if (isServer) then{_this spawn Colum_revive_Update_vidas}}] call CBA_fnc_addEventHandler; ['colum_revive_MedCall', {if (isServer) then{_this spawn Colum_revive_LLamada_Medica}}] call CBA_fnc_addEventHandler; ['colum_revive_REQL', {if (isServer) then{_this spawn Colum_revive_Consulta_Vidas}}] call CBA_fnc_addEventHandler; ['colum_revive_Save', {if (isServer) then{_this spawn Colum_revive_fcn_Save_PJ}}] call CBA_fnc_addEventhandler; }; ['colum_revive_FIJV', {if (!isDedicated) then {_this spawn Colum_revive_FijarVidas}}] call CBA_fnc_addEventHandler; ['colum_revive_DeadP', {_this spawn Colum_Revive_Muerte_PJ}] call CBA_fnc_addEventHandler; ["ace_sys_wounds_rev", {player spawn Colum_revive_evento_HeridoGrave}] call CBA_fnc_addEventhandler; ["ace_sys_ruck_changed", {colum_revive_lastRuckChanged=true;}] call CBA_fnc_addEventhandler; /********************************************** GENERAL USE FUNCTIONS ***********************************************************************/ Colum_revive_Consulta_Vidas = { private ["_UserID","_Vidas","_Data","_tmpVidas","_tmpTime","_UserObj"]; _UserID= _this select 0; _UserObj= _this select 1; _UserTryNumber=if(count _this > 2) then { _this select 2} else {99}; if (isNil ("Vidas"+ _UserID) ) then { _Vidas= [-10,0]} else { call compile format ["_Vidas=Vidas%1;",_UserID]}; _tmpVidas= _Vidas select 0; _tmpTime=_Vidas select 1; if ((Colum_revive_LifesPersist >0) && ((time-_tmpTime) > Colum_revive_LifesPersist)||(Colum_revive_LifesPersist==0)) then {_tmpVidas=-10}; _Data=[_UserObj,_UserID,_tmpVidas]; if (_UserTryNumber > 0) then {diag_log[format["colum_revive: posible script lag deteted, try to log-in nº (%1) of player : %2, UID: %3, lifes: %4",_UserTryNumber,name _UserObj,_UserID,_tmpVidas]]}; if (Colum_revive_DisconectSave && (_tmpVidas!=0)) then { // Only send data if the player have lifes, to avoid unneeded net-traffic if (!isNil ("Colum_revive_Data"+ _UserID)) then{ call compile format ["_Data=_Data+[Colum_revive_Data%1]",_UserID]; Diag_log[format['Revive logging. Player ID: %1. DATA: %2',_UserID,str _Data]]; }; }; if (!isnil 'ACE_fnc_receiverOnlyEvent' && _UserTryNumber <2) then { ['colum_revive_FIJV', _Data] call ACE_fnc_receiverOnlyEvent; } else { ['colum_revive_FIJV', _Data] call CBA_fnc_globalEvent; }; [_UserID] spawn colum_rev_unitInit; }; Colum_revive_Update_vidas = { private ["_UserID","_Vidas"]; _UserID= _this select 0; _Vidas= _this select 1; call compile format ["Vidas%1=[%2,%3];",_UserID,_Vidas,time]; if (_Vidas == 0) then {call compile format ["Colum_revive_Data%1=nil;",_UserID];}; if (!(_UserID in Colum_Revive_ID_list)) then {Colum_Revive_ID_list=Colum_Revive_ID_list+[_UserID]}; }; Colum_revive_FijarVidas = { private ["_UserObj","_Vidas","_Data","_TmpStatus","_deadTimer"]; _UserObj= _this select 0; _UserID= _this select 1; _Vidas= _this select 2; if (count _this >3) then {_Data= _this select 3}; If (_UserID == (getPlayerUID player)) then { if ((!isnil '_Data')&&(isnil 'colum_revive_reasigned')) then { _TmpStatus=(_Data select 1); if (_TmpStatus select 1) then { //he was unconscious _Vidas=_Vidas+1; Colum_revive_VidasLocal=_Vidas; waituntil{time >3}; player setvariable ['UltAtack', [-1000,player]]; //[player,1,false,1] call ace_w_setunitdam; [player, 1] call ace_sys_wounds_fnc_addDamage; waituntil{(player getVariable "ace_w_revive") >0}; if ((_TmpStatus select 3) > 0) then { player setVariable ["ace_w_revive",time+(_TmpStatus select 3)]; } else{ if ((_TmpStatus select 3) ==-10) then { [] spawn Colum_revive_fnc_LimboStatus }else{ Diag_log["Revive, player was wounded but revive time recived was invalid",(_TmpStatus select 3)]; }; }; //if no wave respawn also adjust the respawn button timer if (!isnil "ace_sys_spectator_RevShowButtonTime") then { if ((Colum_revive_WaveTime_Respawn select 0) <0 || (Colum_revive_WaveTime_Respawn select 1) <= 0) then { _deadTimer=ace_wounds_prevtime-(_TmpStatus select 3); old_ace_sys_spectator_RevShowButtonTime=ace_sys_spectator_RevShowButtonTime; ace_sys_spectator_RevShowButtonTime=old_ace_sys_spectator_RevShowButtonTime -_deadTimer; if ((_TmpStatus select 3) <0 || ace_sys_spectator_RevShowButtonTime<0) then {ace_sys_spectator_RevShowButtonTime=2}; }; }; }else{ //he was alive if ((_TmpStatus select 0)>0) then {[player,(_TmpStatus select 0)] call ace_sys_wounds_fnc_setdamage}; if (!(_TmpStatus select 2)) then {[player,3,1] call ace_sys_wounds_fnc_setHit;}; player call ace_sys_wounds_fnc_unitInit; // Remove bleeding and pain, we can't know how he was before disconect, so just restore damage. }; //move to pos or to vehicle if (count (_Data select 2)>0) then { [player, (_Data select 2)] call colum_revive_GetInVeh; } else {player setPosATL (_Data select 0)}; removeallweapons player;removeAllItems player; {player addweapon _x} foreach (_Data select 3); {player addmagazine _x} foreach (_Data select 4); player setVariable ["ACE_weapononback", (_Data select 5), true]; if (Colum_revive_Save_Ruck) then { if (count (_Data select 6) > 0) then { player setVariable ["ACE_RuckWepContents", ((_Data select 6) select 0)]; player setVariable ["ACE_RuckMagContents", ((_Data select 6) select 1)]; }; }; _hasMg=false;_hasvector=false;_hasSoflan=false; { _wType = getNumber(configFile >> "cfgWeapons" >> _x >> "ace_sys_weapons_type"); _wmags = getArray(configFile >> "cfgWeapons" >> _x >> "magazines"); if (_wType >=3 && _wType <=6) then{_hasMg=true}; if ("ACE_Battery_Rangefinder" in _wmags) then{_hasvector=true}; if ("Laserbatteries" in _wmags) then{_hasSoflan=true}; } foreach weapons player; if (_hasMg) then {if(!(player hasWeapon "ACE_Earplugs"))then {player addWeapon "ACE_Earplugs"}}; //Earplugs for heavy weapons :S. On disconect they would lose them if (_hasvector) then {if(!([player,"ACE_Battery_Rangefinder"] call colum_rev_hasMag))then {player addmagazine "ACE_Battery_Rangefinder"}}; //batery also would lose it if (_hasSoflan) then {if(!([player,"Laserbatteries"] call colum_rev_hasMag))then {player addmagazine "Laserbatteries"}}; //same as above colum_revive_reasigned=true; }; if(_Vidas!=-10) then {Colum_revive_VidasLocal=_Vidas} else {Colum_revive_VidasLocal=Colum_revive_VidasMax}; }; }; colum_rev_unitInit= { private ["_UserObjt","_UID","_result"]; _UID=_this select 0; _UserObjt=objnull; {if (getPlayerUID _x== _UID) exitwith{_UserObjt=_x}}foreach allunits; if (isnull _UserObjt) exitwith{}; sleep 60; if (isnull _UserObjt) exitwith{}; _UserObjt setvariable ["colum_revive_init",true]; }; colum_rev_hasMag = { private ["_unit","_Mag","_result"]; _unit=_this select 0; _Mag=_this select 1; _result=false; { if(_Mag==_x) exitwith{_result=true}; } foreach magazines _unit; _result; }; Colum_revive_LLamada_Medica = { private ["_Paciente","_Medico","_Pacientes"]; _Medico= _this select 0; _Paciente= _this select 1; while {!isnil {_Medico getVariable "Colum_Revive_Paciente"}} do { sleep 2}; //Si esta atendiendo a alguien esperamos en vez de añadirlo al array _Medico setVariable ["Colum_Revive_Paciente",_Paciente]; // Cambiado array por 1 solo, asi evitamos bucle continuo en el server mientras no hay pacientes [_Medico,_Paciente] spawn Colum_revive_AtencionMedica; }; Colum_revive_Fnc_Disconect = { private ["_name","_UserID","_UserObjt","_UserVidas","_TmpUncon"]; _name= _this select 1; _UserID= _this select 2; _UserObjt= objnull; _UserVidas= if (!isNil ("Vidas"+ _UserID) ) then { call compile format ["(Vidas%1 select 0)",_UserID]} else {-10}; {if ((getPlayerUID _x) == _UserID) exitwith{_UserObjt=_x}}foreach playableunits; if (isnull _UserObjt) then { {if (name _x == _name) exitwith{_UserObjt=_x}}foreach playableunits; }; if (isnull _UserObjt) then { {if ((name _x) == _name) exitwith{_UserObjt=_x}}foreach allunits; }; if (isnull _UserObjt) exitwith {if (_name != "__SERVER__") then {diag_log[Format["Colum revive error: User %1 (%2) not found",_name,_UserID,playableunits]]}};//no unit found if (!(_UserID in Colum_Revive_ID_list)) then {Colum_Revive_ID_list=Colum_Revive_ID_list+[_UserID]}; _TmpUncon=_UserObjt call ace_sys_wounds_fnc_isUncon; if (Colum_revive_DisconectPunish && _TmpUncon) then{ //- 1 life for disconect while unconscius if (!isNil ("Vidas"+ _UserID) ) then { call compile format ["if (_UserVidas > 0) then{Vidas%1=[(_UserVidas -1),time]};",_UserID]}; }; if (Colum_revive_DisconectSave&& (_UserVidas >0 ||_UserVidas ==-10)) then { [_UserObjt,_UserID] call Colum_revive_fcn_Save_PJ; }; }; Colum_revive_fcn_Save_PJ= { private ["_UserObjt","_TmpPOs","_TmpArmas","_TmpStatus","_TmpMunicion","_UserVidas","_oldRuck","_UserRuck","_UserRevTime", "_TmpVehiculo","_TmpData","_TmpUncon","_TmpweaponBack","_TmpRuckData","_TmpOldData","_checkOldData","_saveData","_oldRevTime"]; _UserObjt=_this select 0; _UserID=_this select 1; _UserRevTime=if((count _this)>2) then{_this select 2} else {-2}; _UserRuck=if((count _this)>3) then{_this select 3} else {[]}; _TmpUncon=_UserObjt call ace_sys_wounds_fnc_isUncon; //Check old data, this avoids posible exploits when disconecting before the unit was totally init. _checkOldData=true; _oldRuck=[]; _TmpOldData=call compile format ["Colum_revive_Data%1",_UserID]; if (!isnil "_TmpOldData") then { if ((_TmpOldData select 1) select 1) then { //he was unconscious last time mmmm check further _checkOldData=false; }else{ //he was alive if (((_TmpOldData select 1) select 0)>0.1) then {_checkOldData=false;}; // wounded if (!((_TmpOldData select 1) select 2)) then {_checkOldData=false;}; // hit legs }; if (_UserObjt distance (_TmpOldData select 0) > 600) then{_checkOldData=false;};//check if he is already moved to last pos _oldRuck=_TmpOldData select 6; _oldRevTim=((_TmpOldData select 1) select 3); if(_UserRevTime==-2) then{_UserRevTime=_oldRevTim}; }; _saveData=_checkOldData ||(_UserObjt getvariable ["colum_revive_init",false]);//if unit init or old state ok save data if (_saveData) then { //only save if first time or unit initialiced // Save user data: _TmpPOs=getposATL _UserObjt; _TmpVehiculo=if(_UserObjt!=vehicle _UserObjt) then { [(vehicle _UserObjt),assignedVehicleRole _UserObjt]; } else {[]}; _TmpArmas=weapons _UserObjt;_TmpMunicion = magazines _UserObjt; _TmpStatus=[damage _UserObjt,_TmpUncon,canStand _UserObjt,_UserRevTime]; _TmpweaponBack=_UserObjt getVariable ["ACE_weapononback",""]; _TmpRuckData=if ((count _UserRuck) > 0) then {_UserRuck} else {_oldRuck}; if (isnil '_TmpweaponBack') then {_TmpweaponBack=""}; _TmpData=[_TmpPOs,_TmpStatus,_TmpVehiculo,_TmpArmas,_TmpMunicion,_TmpweaponBack,_TmpRuckData]; call compile format ["Colum_revive_Data%1=_TmpData;",_UserID]; diag_log[format["Colum_revive_Save: %1. %2",name _UserObjt,(if(count _this ==2) then {"(diconnect)"}else{"(playing)"})]]; }; }; Colum_Revive_Scoring = { private ["_Muerto","_MuertoSide","_Asesino","_ScoreAdd"]; _Muerto= _this select 0; _MuertoSide= _this select 1; if (count _this <= 2) exitwith {}; _Asesino= _this select 2; if (isnil '_Asesino') exitwith {}; if ((isnull _Asesino) || (_Asesino==_Muerto) ) exitwith {}; _ScoreAdd =if ((_MuertoSide ==(side _Asesino))||(_MuertoSide == civilian)) then {-1} else {1}; _Asesino addScore _ScoreAdd; }; Colum_Revive_Funcion_Reset_Data = { [] spawn { if (isServer) then { { if (!isNil ("Vidas"+ _x) ) then {call compile format ["Vidas%1=nil;",_x]}; if (!isNil ("Colum_revive_Data"+ _x)) then{call compile format ["Colum_revive_Data%1=nil",_x];}; sleep 0.01; } foreach Colum_Revive_ID_list; { if (isplayer _x) then { if (!isnil 'ACE_fnc_receiverOnlyEvent') then { ['colum_revive_FIJV', [_x,(getPlayerUID _x),-10]] call ACE_fnc_receiverOnlyEvent; } else { ['colum_revive_FIJV', [_x,(getPlayerUID _x),-10]] call CBA_fnc_globalEvent; }; }; sleep 0.1; } foreach playableUnits; Colum_Revive_ID_list=[]; } else { [0, {call Colum_Revive_Funcion_Reset_Data}, []] call CBA_fnc_globalExecute; }; }; }; Colum_Revive_Funcion_CanBeStillRevived={ private ["_return","_medics","_allmedics"]; _return=true; _medics=0; _allmedics=true; if(!isnil 'ace_sys_wounds_medics_only') then {_allmedics= !ace_sys_wounds_medics_only}; if (Colum_revive_PvP) then { _medics={(playerside in (_x getVariable ["colum_revive_side",[sideUnknown]])) && alive _x} count Colum_Revive_MedicoList; // IA script medics on player side if (_allmedics) then { _medics=_medics+ (call compile format["Colum_revive_AlivePlayers_%1",playerside]); //IA+ players on player side } else { _medics=_medics+ (call compile format["Colum_revive_AliveMedics_%1",playerside]); //IA+ player medics on player side }; } else { _medics=({alive _x} count Colum_Revive_MedicoList); //IA if (_allmedics) then { _medics=_medics+ Colum_revive_AlivePlayers; //IA+ all player } else { _medics=_medics+ Colum_revive_AliveMedics; //IA+ player medics }; }; if (_medics == 0) then { _return=false; //no medics alive }; _return; }; Colum_Revive_Funcion_CheckPlayerCount={ private ["_playerlist","_aliveTotal","_aliveTotal_WEST","_aliveTotal_EAST","_aliveTotal_GUER","_aliveTotal_CIV"]; _aliveTotal=0; _aliveTotalMedic=0; _aliveTotal_WEST=0; _aliveTotalMedic_WEST=0; _aliveTotal_EAST=0; _aliveTotalMedic_EAST=0; _aliveTotal_GUER=0; _aliveTotalMedic_GUER=0; _aliveTotal_CIV=0; _aliveTotalMedic_CIV=0; _playerlist=if(count playableunits>0) then {playableunits} else {[player]}; { //not in PMR nor totally death(in spectator) _IsAlive=alive _x && !(_x getvariable["Colum_revive_isOnPMR",false])&& !(_x getvariable["ace_sys_spectator_exclude",false]); _IsMedic=[_x] call ace_sys_wounds_fnc_isMedic; if (_IsAlive) then { switch (side (group _x)) do { case west: {_aliveTotal_WEST = _aliveTotal_WEST+1; if(_IsMedic) then {_aliveTotalMedic_WEST=_aliveTotalMedic_WEST+1};}; case east: {_aliveTotal_EAST = _aliveTotal_EAST+1; if(_IsMedic) then {_aliveTotalMedic_EAST=_aliveTotalMedic_EAST+1};}; case resistance: {_aliveTotal_GUER = _aliveTotal_GUER+1; if(_IsMedic) then {_aliveTotalMedic_GUER=_aliveTotalMedic_GUER+1};}; case civilian: {_aliveTotal_CIV = _aliveTotal_CIV+1; if(_IsMedic) then {_aliveTotalMedic_CIV=_aliveTotalMedic_CIV+1};}; }; _aliveTotal = _aliveTotal+1; if(_IsMedic) then {_aliveTotalMedic=_aliveTotalMedic+1}; } } foreach _playerlist; Colum_revive_AlivePlayers=_aliveTotal; Colum_revive_AliveMedics=_aliveTotalMedic; Colum_revive_AlivePlayers_WEST=_aliveTotal_WEST; Colum_revive_AliveMedics_WEST=_aliveTotalMedic_WEST; Colum_revive_AlivePlayers_EAST=_aliveTotal_EAST; Colum_revive_AliveMedics_EAST=_aliveTotalMedic_EAST; Colum_revive_AlivePlayers_GUER=_aliveTotal_GUER; Colum_revive_AliveMedics_GUER=_aliveTotalMedic_GUER; Colum_revive_AlivePlayers_CIV=_aliveTotal_CIV; Colum_revive_AliveMedics_CIV=_aliveTotalMedic_CIV; }; Colum_Revive_Funcion_CreateTrigger = { _trg=createTrigger["EmptyDetector",[0,0,0]]; _trg setTriggerArea[0,0,0,false]; _trg setTriggerType "END1"; _trg setTriggerActivation["NONE","PRESENT",true]; _trg setTriggerStatements[format["Colum_revive_AlivePlayers_%1 <=0",_this], "endMission 'END1';forceEnd", ""]; }; Colum_Revive_Funcion_SendWaveTime = { private ["_tmpWaveData","_initialWave","_WaveDelay","_respTimer","_Muerto","_MuertoSide"]; //Server calculated resp time send to clients so its more accurate( if client fail to recibe this, it would just use their own calculated time that should be similar) _Muerto=_this select 0; _MuertoSide=_this select 1; _initialWave=(Colum_revive_WaveTime_Respawn select 0); _WaveDelay=(Colum_revive_WaveTime_Respawn select 1); _respTimer=0; if (!isnil format["Colum_revive_WaveTime_Respawn_%1",_MuertoSide]) then { _tmpWaveData= call compile format["Colum_revive_WaveTime_Respawn_%1",_MuertoSide]; _initialWave=_tmpWaveData select 0; _WaveDelay=_tmpWaveData select 1; }; if ((_initialWave < 0) || (_WaveDelay <= 0)) exitwith{}; if (time > _initialWave) then { _respTimer=(_WaveDelay -((time - _initialWave) % _WaveDelay)); } else { _respTimer=(_initialWave -time); }; if (!isnil 'ACE_fnc_receiverOnlyEvent') then { ['colum_revive_WResp', [_Muerto,_respTimer]] call ACE_fnc_receiverOnlyEvent; } }; Colum_Revive_Muerte_PJ = { private ["_Muerto","_MuertoSide","_Asesino","_NuevoMarcador","_TmpNombre","_ShowStuff"]; _Muerto= _this select 0; _MuertoSide= _this select 1; _ShowStuff=true; if (count _this > 2) then {_Asesino= _this select 2} else {_Asesino=nil}; if (Colum_revive_PvP) then {if (_MuertoSide != playerside)then {_ShowStuff=false}}; if (Colum_revive_WoundScoring && isServer && (_Muerto!=_Asesino)) then {_this call Colum_Revive_Scoring}; waituntil {sleep 2;(_Muerto call ace_sys_wounds_fnc_isUncon)}; //TODO: 2 seconds loop server side, its more acurate, but could be also changed to clientside-only... needs testing call Colum_Revive_Funcion_CheckPlayerCount; if (isServer) then {[_Muerto,_MuertoSide] call Colum_Revive_Funcion_SendWaveTime}; if (isDedicated) exitwith{}; if (Colum_revive_Death_Markers && _ShowStuff) then { _NuevoMarcador = createMarkerlocal [format["muer%1", name _Muerto],getPos _Muerto]; _NuevoMarcador setMarkerShapelocal "ICON"; _NuevoMarcador setMarkerTypelocal "hd_destroy"; _NuevoMarcador setMarkerTextlocal ([14,_Muerto] call Colum_Revive_Funcion_Message); _NuevoMarcador setMarkerColorlocal "ColorBlue"; }; if (Colum_revive_Death_Messages && _ShowStuff) then {[11,_Muerto] call Colum_Revive_Funcion_Message;}; if (!isnil "_Asesino" && _ShowStuff) then { if (Colum_revive_TKcheck &&(_MuertoSide == side _Asesino)) then {[10,[_Asesino,_Muerto]] call Colum_Revive_Funcion_Message}; }; if (Colum_revive_Death_Markers && _ShowStuff) then { while {(!isnull _Muerto) && (alive _Muerto) && (_Muerto call ace_sys_wounds_fnc_isUncon)} do { _NuevoMarcador SetMarkerPoslocal (getPos _Muerto);sleep 7; }; deleteMarkerlocal _NuevoMarcador; } else { waituntil {sleep 7; ((isnull _Muerto) || !(alive _Muerto) || !(_Muerto call ace_sys_wounds_fnc_isUncon))}; }; call Colum_Revive_Funcion_CheckPlayerCount; }; colum_revive_GetInVeh={ private["_vehicle","_tmpData",'_posVeh','_turretNumb','_assigned','_Turrets','_subturret']; //Move unit into a vehicle, if its alive and there is room _unit= _this select 0; _tmpData=_this select 1; _vehicle=_tmpData select 0; _posVeh=if (count (_tmpData select 1) >0) then {(_tmpData select 1) select 0}else {""}; _turretNumb=if (count (_tmpData select 1) >1) then {(_tmpData select 1) select 1} else {[0]}; _assigned=false; if (!alive _vehicle) exitwith {}; switch _posVeh do { case "Driver": { if ((_vehicle emptyPositions "Driver") >0) then {_unit moveindriver _vehicle; _assigned=true;}; }; case "Cargo": { if ((_vehicle emptyPositions "Cargo") >0) then {_unit moveincargo _vehicle;_assigned=true;}; }; case "Turret": { if (isnull (_vehicle turretUnit _turretNumb)) then {_unit moveinTurret [_vehicle,_turretNumb];_assigned=true;}; }; }; if (_assigned) exitwith {}; // already in vehicle, exit //search for an empty spot on the vehicle if ((_vehicle emptyPositions "Gunner") >0) exitwith {_unit moveingunner _vehicle}; _Turrets = (configFile >> "CfgVehicles" >> (typeof _vehicle) >> "Turrets"); if ((count _Turrets) > 0) then { // search turrets for [{_x=0},{_x<(count _Turrets)},{_x=_x+1}] do { if ((getNumber((_Turrets select _x) >> "hasGunner")) > 0) then { if (isnull(_vehicle turretUnit [_x])) exitwith {_unit moveinTurret [_vehicle,[_x]];_assigned =true;}; }else{ _subturret=(_Turrets select _x) >> "Turrets"; if ((count _subturret) > 0) then { for [{_y=0},{_y<(count _subturret)},{_y=_y+1}] do { if (isnull(_vehicle turretUnit [_x,_y])) exitwith {_unit moveinTurret [_vehicle,[_x,_y]];_assigned =true;}; }; }; }; }; }; if (_assigned) exitwith {}; // already in vehicle exit if ((_vehicle emptyPositions "Commander") >0)exitwith {_unit moveInCommander _vehicle}; if ((_vehicle emptyPositions "Cargo") >0) exitwith {_unit moveincargo _vehicle}; if ((_vehicle emptyPositions "Driver") >0) exitwith {_unit moveindriver _vehicle}; }; call Colum_Revive_Funcion_CheckPlayerCount; {_x call Colum_Revive_Funcion_CreateTrigger}foreach Colum_revive_EndGameIfAllDie; if (!T_Client) exitwith {}; // Nothing more to do for the server. /********************************************** CLIENT FUNCTIONS ***********************************************************************/ Colum_revive_LLamar_Medico = { private ["_Medico"]; _Medico= _this; if (((player getVariable "ace_w_bleed") > 0)||((player getVariable "ace_w_pain") > 0) || ((player getVariable "ace_w_epi") != 0)||((damage player) > 0)) then { if ((player getVariable "ace_w_revive") > 0) then {player setVariable ["ace_w_revive",time+1000]}; [6,0] call Colum_Revive_Funcion_Message; if (!isNil 'ACE_fnc_clientToServerEvent') then { ['colum_revive_MedCall', [_Medico,player]] call ACE_fnc_clientToServerEvent; } else { ['colum_revive_MedCall', [_Medico,player]] call CBA_fnc_globalEvent; // TODO: remove after stable 1.14 release }; sleep 60;//Espera al medico, evita multiples llamadas }; }; if (Colum_revive_Respawn_Side) then { if (!isnil format["Colum_revive_RevButtons_%1",playerside]) then { Colum_revive_RespawnButton_text= call compile format["Colum_revive_RevButtons_%1",playerside]; Colum_revive_RespawnMarkers= call compile format["Colum_revive_RespawnMarkers_%1",playerside]; Colum_revive_RespawnOffset= call compile format["Colum_revive_RespawnOffset_%1",playerside]; } else { Colum_revive_Respawn= false; // este bando no tiene respawns definidos ace_sys_spectator_RevShowButtonTime = nil; }; }; if (!isnil format["Colum_revive_RevShowButtonTime_%1",playerside]) then { ace_sys_spectator_RevShowButtonTime = call compile format["Colum_revive_RevShowButtonTime_%1",playerside]; }; if (!isnil format["Colum_revive_WaveTime_Respawn_%1",playerside]) then { Colum_revive_WaveTime_Respawn= call compile format["Colum_revive_WaveTime_Respawn_%1",playerside]; }; if (!isnil format["Colum_revive_MochilaMedico_Contenido_%1",playerside]) then { Colum_revive_MochilaMedico_Contenido= call compile format["Colum_revive_MochilaMedico_Contenido_%1",playerside]; }; if (!isnil format["Colum_revive_MochilaMedico_%1",playerside]) then { Colum_revive_MochilaMedico= call compile format["Colum_revive_MochilaMedico_%1",playerside]; }; if (!isnil 'Colum_revive_RespawnButton_text') then { if ((count Colum_revive_RespawnButton_text) > 4) then { ace_sys_spectator_RevButtons=[]; for [{_x=0},{_x<=2},{_x=_x+1}] do {ace_sys_spectator_RevButtons=ace_sys_spectator_RevButtons + [Colum_revive_RespawnButton_text select _x];}; ace_sys_spectator_RevButtons=ace_sys_spectator_RevButtons + [[15,0] call Colum_Revive_Funcion_Message]; } else { ace_sys_spectator_RevButtons=Colum_revive_RespawnButton_text; }; }; if (Colum_revive_Vidas_Side) then { Colum_revive_VidasMax= call compile format["Colum_revive_VidasMax_%1",playerside]}; Colum_Revive_CambiarBotones = { //Revive button actions, change page Disableserialization; private["_disp","_Tmpnum","_tmpText","_lastBut"]; _disp = uiNamespace getVariable 'ace_sys_spectator_rscSpectate'; if (isnil "_disp") then {_disp=(findDisplay 55001)}; if (isnil "_disp" || isnull _disp) exitwith{diag_log["revive, respawn buttons wherent detected"]}; Colum_revive_RespawnButton_Pos =Colum_revive_RespawnButton_Pos+1; _Tmpnum=(ceil ((count Colum_revive_RespawnButton_text) /3)) -1; if (Colum_revive_RespawnButton_Pos > _Tmpnum) then { // overflow check Colum_revive_RespawnButton_Pos=0; }; ace_sys_spectator_RevButtons=[]; _lastBut=2; if ((count Colum_revive_RespawnButton_text) <= 4) then {Colum_revive_RespawnButton_Pos=0;_lastBut=3;}; //change buttons for [{_x=0},{_x<=_lastBut},{_x=_x+1}] do { _tmpText= if ((_x + (Colum_revive_RespawnButton_Pos*3)) < (count Colum_revive_RespawnButton_text)) then {Colum_revive_RespawnButton_text select (_x + (Colum_revive_RespawnButton_Pos*3))} else {' '}; ace_sys_spectator_RevButtons=ace_sys_spectator_RevButtons + [_tmpText]; (_disp displayctrl (50018 + _x)) ctrlSetStructuredText parseText _tmpText; ctrlShow [50018 + _x, _tmpText!=' ']; }; //Last button its always more. if (_lastBut ==2) then { ace_sys_spectator_RevButtons=ace_sys_spectator_RevButtons + [[15,(Colum_revive_RespawnButton_Pos+1)] call Colum_Revive_Funcion_Message]; (_disp displayctrl (50018 + 3)) ctrlSetStructuredText parseText (ace_sys_spectator_RevButtons select 3); }; }; Colum_Revive_HideBotones = { Disableserialization; private["_disp","_Tmpnum","_tmpText","_lastBut"]; _disp = uiNamespace getVariable 'ace_sys_spectator_rscSpectate'; if (isnil "_disp") then {_disp=(findDisplay 55001)}; // gervariable returns nill not the default if that variable was setvariable to nil ¬¬ if (isnil "_disp" || isnull _disp) exitwith{diag_log["revive, respawn buttons wherent detected"]}; Colum_revive_RespawnButton_Pos=-1; call Colum_Revive_CambiarBotones; for [{_x=0},{_x<=3},{_x=_x+1}] do {ctrlShow [50018 + _x, false];}; }; Colum_Revive_PlayerTotalHeal = { if ([player] call ACE_fnc_isBurning) then { ['ace_sys_wounds_burnoff', player] call CBA_fnc_globalEvent;}; player call ace_sys_wounds_fnc_unitInit; [player,0] call ace_sys_wounds_fnc_heal; player setdamage 0; }; Colum_Revive_Acciones = { private["_posicion",'_num','_offset','_curRespawn',"_enabledRespawn"]; _num= _this; _enabledRespawn=true; _return=false; if ((count Colum_revive_RespawnButton_text) > 4 &&_num == 3) exitwith {call Colum_Revive_CambiarBotones;};//button more _num = _num + (Colum_revive_RespawnButton_Pos*3); if (_num > ((count Colum_revive_RespawnMarkers) -1)) exitwith{_return}; //exit if overflow if (!Colum_revive_Respawn) exitwith{}; if (_num >= 0) then { _curRespawn=(Colum_revive_RespawnMarkers select _num); if ((typename _curRespawn) == "OBJECT")then { _enabledRespawn =(alive _curRespawn) && !(_curRespawn getvariable ["colum_revive_disableRespawn",false]); }; }; if (!_enabledRespawn) exitwith{_return}; // Respawn disabled or destroyed //Heal and reset all wound status call Colum_Revive_PlayerTotalHeal; [8,0] call Colum_Revive_Funcion_Message; call Colum_Revive_HideBotones; if (_num >= 0) then { _offset=if (count Colum_revive_RespawnOffset >_num) then{Colum_revive_RespawnOffset select _num} else{0}; if ((typename _curRespawn) == "STRING")then { _posicion = getmarkerpos _curRespawn; _posicion set [2,_offset]; }else{ if ((typename _curRespawn) == "OBJECT")then { _posicion = getpos _curRespawn; _posicion =[((_posicion select 0) + (random 6) -3),((_posicion select 1) + (random 6) -3),((_posicion select 2) + _offset)]; _tmpPos = _posicion findEmptyPosition[ 1, 50, typeof player]; _posicion=_tmpPos; }; }; if (vehicle player != player) then {moveOut player}; player setpos _posicion; _return=true; }; _return }; Colum_revive_CheckRespawn= { if (!Colum_revive_Respawn) exitwith{}; if (isnil 'ace_sys_wounds_withSpect' && !isnil 'ace_sys_spectator_RevShowButtonTime') then { if ((Colum_revive_Count_Start_Time + ace_sys_spectator_RevShowButtonTime) < time) then { disableserialization; _disp = uiNamespace getVariable 'ace_sys_spectator_rscSpectate'; if (isnil "_disp") then {_disp=(findDisplay 55001)}; // gervariable returns nill if that variable was setvariable to nil ¬¬ if (isnil "_disp" || isnull _disp) then { createDialog "ACE_rscSpectate"; _cRButton1 = 50018;_cRButton2 = 50019;_cRButton3 = 50020;_cRButton4 = 50021; _disp = uiNamespace getVariable 'ace_sys_spectator_rscSpectate'; if (isnil "_disp") then {_disp=(findDisplay 55001)}; // gervariable returns nill if that variable was setvariable to nil ¬¬ if (isnil "_disp" || isnull _disp) exitwith{diag_log["revive, respawn buttons wherent detected"]}; for [{_x=0},{_x<=13},{_x=_x+1}] do {ctrlShow [(55002 + _x),false];}; (_disp displayCtrl _cRButton1) ctrlSetPosition [(safeZoneX + safeZoneW) - 0.25, (safeZoneY + safeZoneH) - 0.6, 0.23, 0.104575];(_disp displayCtrl _cRButton1) ctrlCommit 0; (_disp displayCtrl _cRButton2) ctrlSetPosition [(safeZoneX + safeZoneW) - 0.25, (safeZoneY + safeZoneH) - 0.54, 0.23, 0.104575];(_disp displayCtrl _cRButton2) ctrlCommit 0; (_disp displayCtrl _cRButton3) ctrlSetPosition [(safeZoneX + safeZoneW) - 0.25, (safeZoneY + safeZoneH) - 0.48, 0.23, 0.104575];(_disp displayCtrl _cRButton3) ctrlCommit 0; (_disp displayCtrl _cRButton4) ctrlSetPosition [(safeZoneX + safeZoneW) - 0.25, (safeZoneY + safeZoneH) - 0.42, 0.23, 0.104575];(_disp displayCtrl _cRButton4) ctrlCommit 0; Colum_revive_RespawnButton_Pos=-1; call Colum_Revive_CambiarBotones; }; }; }; if (!isnil 'ace_sys_spectator_RevShowButtonTime' && Colum_Revive_last_respawn_msg < time) then { if ((Colum_revive_Count_Start_Time + ace_sys_spectator_RevShowButtonTime) > time) then { Colum_Revive_last_respawn_msg=time+20; _nextRespawnIn=ace_sys_spectator_RevShowButtonTime + Colum_revive_Count_Start_Time -time; [17,format["%1m:%2s",floor(_nextRespawnIn /60),round(_nextRespawnIn % 60)]] call Colum_Revive_Funcion_Message; }; }; if (((player getVariable "ace_w_revive") -time) < 15 && ((player getVariable "ace_w_revive") -time) > 0) then { //He is going to die!, avoid death to not lose equip if respawn enabled [] spawn { player setVariable ["ace_w_revive",time+1000]; Colum_revive_extraTime=true; sleep 16; // extra time, maybe he was been healed if (player call ace_sys_wounds_fnc_isUncon) then { if (Colum_revive_TimeoutAutoRespawn) then { 1 spawn Colum_Revive_Acciones; } else { call Colum_revive_fnc_LimboStatus; }; }; Colum_revive_extraTime=false; }; }; }; Revive_Boton_Respawn_pulsado= { private["_unit","_corpose","_idJugador"]; _unit = _this select 0; _corpose = _this select 1; if (!Colum_revive_Respawn || Colum_revive_RespawnButtonPunish) exitwith {[0] spawn Colum_revive_evento_Muerte}; if (Colum_revive_VidasLocal > 1) then { if (!Colum_revive_PlayerStatusWounded) then { Colum_revive_VidasLocal=Colum_revive_VidasLocal-1; _idJugador = getPlayerUID player; if (!isNil 'ACE_fnc_clientToServerEvent') then { ['colum_revive_UPL', [_idJugador,Colum_revive_VidasLocal]] call ACE_fnc_clientToServerEvent; } else { ['colum_revive_UPL', [_idJugador,Colum_revive_VidasLocal]] call CBA_fnc_globalEvent; // TODO: remove after stable 1.14 release }; if (Colum_revive_VidasLocal <= 1) then{ ace_wounds_prevtime = 0; }; }; 10 cutText [" ", "black out", 1]; sleep 5; _armas= weapons _corpose; _municion= magazines _corpose; deletevehicle _corpose; removeallweapons _unit; removeBackpack _unit; sleep 1; {_unit addmagazine _x} foreach _municion; {_unit addweapon _x} foreach _armas; [7,0] call Colum_Revive_Funcion_Message; sleep 10; [8,0] call Colum_Revive_Funcion_Message; 0 spawn Colum_Revive_Acciones; sleep 3; 10 cutText [" ","PLAIN DOWN"]; cutText [" ", "black in", 0]; [1,0] call Colum_Revive_Funcion_Message; } else {[0] spawn Colum_revive_evento_Muerte}; }; Colum_Revive_Keypressedcode={ Private["_target","_Escuadra","_Lider","_tmpos","_tmposALT","_tmposX","_tmposY","_tmposZ"]; _dikCode = _this select 1; if ((_dikCode == 88) && colum_revive_telepEnabled) then{ if (player call ace_sys_wounds_fnc_isUncon) exitwith{}; _Lider =(leader player); _target= objnull; // Not valid leader if ((_Lider == player)||( _Lider call ace_sys_wounds_fnc_isUncon)) then { _Escuadra = units (group player); { if ((alive _x)&&(_x!=player)) then { if (!(_x call ace_sys_wounds_fnc_isUncon)) exitwith { _target= _x }; }; } foreach _Escuadra; if (isnull _target) then { _Escuadra = allunits; { if ((alive _x) && (isplayer _x)&&(_x!=player)) then { if ((side _x) == playerside) then { if (!(_x call ace_sys_wounds_fnc_isUncon)) exitwith { _target= _x }; }; }; } foreach _Escuadra; }; } else { _target= _Lider}; if (!isnull _target) then { _tmpos= getPosATL _target; _tmposX=_tmpos select 0; _tmposY=_tmpos select 1; _tmposZ=_tmpos select 2; _tmpos set[0,(_tmposX+ (random 2) -1)]; _tmpos set[1,(_tmposY+ (random 2) -1)]; if (_tmposZ > 1) then { //Detect buildings _tmposALT=_tmpos findEmptyPosition [1,30, typeof player]; if ((count _tmposALT) > 1) then {_tmpos=_tmposALT}; }; if (vehicle player != player) then {moveOut player}; player setPosATL _tmpos; if (vehicle _target != _target) then { [player,[(vehicle _target)]] call colum_revive_GetInVeh; }; colum_revive_telepEnabled=false; }; }; if (Colum_revive_DisconectSave && {_dikCode in actionKeys "IngamePause"} ) then{ call Colum_revive_fnc_SaveClient; }; false; }; Colum_Revive_TelepSquad= { sleep 5; waitUntil {!isNil "Colum_revive_VidasLocal"}; if (Colum_revive_VidasLocal > 0 && (!(player call ace_sys_wounds_fnc_isUncon))) then { colum_revive_telepEnabled=true; [9,0] call Colum_Revive_Funcion_Message; Sleep 400; // en realidad algo mas de 5 mins pero para que se den prisa :P colum_revive_telepEnabled=false; }; }; Colum_Revive_NuevoLider = { private ["_Escuadra"]; if ((leader player) == player) then { _Escuadra = units (group player); { if (alive _x && (!(_x call ace_sys_wounds_fnc_isUncon))) exitwith { (group player) selectleader _x; }; } foreach _Escuadra; }; }; Colum_Revive_RenombraLider = { private ["_Escuadra","_lider","_liderORG"]; _lider=(leader player); _liderORG=_lider; if (_lider != player) then { _Escuadra = units (group player); { if (alive _x && (!(_x call ace_sys_wounds_fnc_isUncon))) then {if ((rankId _x) > (rankId _lider)) then { _lider= _x }}} foreach _Escuadra; if( _liderORG != _lider) then { (group player) selectleader _lider}; }; }; Colum_Revive_Funcion_CantBeRevived = { if (Colum_Revive_Funcion_CantBeRevived_msg) exitwith{}; [16,0] call Colum_Revive_Funcion_Message; if (Colum_Revive_KillIfNoMedic) then { player setVariable ["ace_w_revive",16+time]; // let the respawn react if he have lives left. If not he will have at least time to read the msg to know why he got out of time }; Colum_Revive_Funcion_CantBeRevived_msg=true; }; Colum_Revive_MochilaMedica = { private ["_Secundaria","_cantidad"]; if (isnil "Colum_revive_MochilaMedico") exitwith{}; if (Colum_revive_MochilaMedico=='') exitwith{}; if (!([player] call ace_sys_wounds_fnc_isMedic)) exitwith{}; sleep 8; if (!isnull (unitBackpack player)) then {removeBackpack player}; // remove BIS backpack if detected if (Colum_revive_Save_Ruck && !isnil 'colum_revive_reasigned') exitwith{}; // already has a restored backpack from a previous disconnect. if (!([player] call ACE_fnc_HasRuck)) then { _Secundaria= secondaryWeapon player; if (_Secundaria != '') then { // if secondary weapon, add backpack "on back" slot player removeweapon _Secundaria;sleep .3; player addweapon Colum_revive_MochilaMedico;sleep .2; [player, Colum_revive_MochilaMedico] call ACE_fnc_PutWeaponOnBack;sleep .2; player addweapon _Secundaria; } else { player addweapon Colum_revive_MochilaMedico; }; }; sleep .5; _cantidad= Colum_revive_MochilaMedico_Contenido select 0; if (_cantidad > 0) then{ [player, "ACE_Bandage",_cantidad ] call ACE_fnc_PackMagazine}; _cantidad= Colum_revive_MochilaMedico_Contenido select 1; if (_cantidad > 0) then{[player, "ACE_Morphine",_cantidad ] call ACE_fnc_PackMagazine}; _cantidad= Colum_revive_MochilaMedico_Contenido select 2; if (_cantidad > 0) then{[player, "ACE_Epinephrine",_cantidad ] call ACE_fnc_PackMagazine}; _cantidad= Colum_revive_MochilaMedico_Contenido select 3; if (_cantidad > 0) then{[player, "SmokeShellGreen",_cantidad ] call ACE_fnc_PackMagazine}; _cantidad= Colum_revive_MochilaMedico_Contenido select 4; if (_cantidad > 0) then{[player, "ACE_Medkit",_cantidad ] call ACE_fnc_PackMagazine}; }; Colum_Revive_SeaRescue = { private ["_ObjetosRescate", "_rescatando", "_rescatador","_tmpobj"]; if (((getposASL player) select 2)<-1) then {player setpos [getpos player select 0,getpos player select 1,0]}; _tmpobj='Sign_sphere10cm_EP1' createvehicle [getpos player select 0,getpos player select 1,0]; //TODO: create the vehicle only local? may cause bumping , test player attachto [_tmpobj, [0,0,0]]; _rescatando=false; while{(surfaceIsWater (getPos player))&& alive player && (player call ace_sys_wounds_fnc_isUncon)} do { if (!_rescatando) then{ // if not been rescued search for posible rescuers if (((getposASL player) select 2)<-1) then {_tmpobj setpos [getpos player select 0,getpos player select 1,0]}; _ObjetosRescate=nearestObjects [player, ["Man","Land","Helicopter","Ship"], 7]; _ObjetosRescate= _ObjetosRescate - [player]; if (count _ObjetosRescate > 0) then{ { if (alive _x && (side _x == playerside)) then { if (_x iskindof "Man") then { if (!(_x call ace_sys_wounds_fnc_isUncon)) then { _tmpobj attachto [_x, [0,-1, 0]]; //attach the tempobject( and the player with it) to the rescuer _rescatando=true; _rescatador=_x; }; } else { detach player; player moveincargo _x; if (vehicle player != player) then { _rescatando=true; _rescatador=_x;_tmpobj setpos [0,0,-500];//if enters the vehicle, hide the tempo object }else { player attachto [_tmpobj, [0,0,0]]; //no room into the vehicle, back to floating }; }; }; if (_rescatando) exitwith{}; }foreach _ObjetosRescate; }; } else { //if been rescued , check if they are alive if (_rescatador iskindof "Man") then{ // the rescuer died :( if (_rescatador call ace_sys_wounds_fnc_isUncon || !alive _rescatador) then{ detach _tmpobj;_rescatando=false;player attachto [_tmpobj, [0,0,0]]; //no room into the vehicle, back to floating }; } else { if (vehicle player == player || !alive _rescatador) then{ // the player have exit the vehicle, may be destroyed. _tmpobj setpos [getpos player select 0,getpos player select 1,0]; _rescatando=false; player attachto [_tmpobj, [0,0,0]]; //no room into the vehicle, back to floating }; }; }; sleep 5; }; detach player; deletevehicle _tmpobj; }; Colum_Revive_NearCoast = { //Function By Norrin, used on his revive script, all credits for him private ["_downed_x","_downed_y","_center_x","_center_y","_zzzz"]; if (((getposASL player) select 2)>-0.2) exitwith{}; //only if he is under the water while{surfaceIsWater (getPos player)} do { _downed_x = getPos player select 0; _downed_y = getPos player select 1; _center_x = getMarkerPos "center" select 0; _center_y = getMarkerPos "center" select 1; while {surfaceIsWater [_downed_x, _downed_y]} do { if (_zzzz == 0) then {[13,0] call Colum_Revive_Funcion_Message;}; sleep 0.01; if (_downed_x > _center_x) then { _downed_x = _downed_x - 25; sleep 0.01; player setPos [_downed_x, _downed_y]; sleep 0.01; }; if (_downed_y > _center_y) then { _downed_y = _downed_y - 25; sleep 0.01; player setPos [_downed_x, _downed_y]; sleep 0.01; }; if (_downed_x < _center_x) then { _downed_x = _downed_x + 25; sleep 0.01; player setPos [_downed_x, _downed_y]; sleep 0.01; }; if (_downed_y < _center_y) then { _downed_y = _downed_y + 25; sleep 0.01; player setPos [_downed_x, _downed_y]; sleep 0.01; }; _zzzz = _zzzz + 1; sleep 0.1; }; }; }; Colum_Revive_Funcion_WaterAction = { if ((((getposASL player) select 2)<0)&& (Colum_revive_WaterAction !=0) && (vehicle player == player)) then { //check if he is really under water, and outside vehicle if (!isnil 'Colum_Revive_executing_WaterRescue') exitwith {}; //already executed? TODO: create other metod to execute this? Colum_Revive_executing_WaterRescue = true; switch Colum_revive_WaterAction do { case 1: {if (((getposASL player) select 2)<-2) then {player setdamage 1}}; case 2: {call Colum_Revive_SeaRescue}; case 3: {call Colum_Revive_NearCoast}; default {}; }; Colum_Revive_executing_WaterRescue=nil; }; }; Colum_Revive_terminateSpectator={ if (!ace_sys_spectator_SPECTATINGON) exitwith {}; ace_sys_spectator_exit_spectator=nil; ace_sys_spectator_NeedUpdateLB=true;//no harm on this since it just updates the lists with names and may solve some init issues :P if (ace_sys_spectator_exit_the_frame) then { //spectator temporally closed( esc pressed or init-finish) _timeout =time+5; waituntil {(_timeout< time) || !ace_sys_spectator_exit_the_frame}; // wait till spectator window inits again }; _timeout =time+4; ace_sys_spectator_exit_spectator=true;ace_sys_spectator_NeedUpdateLB=true; waituntil {(_timeout< time) || !ace_sys_spectator_SPECTATINGON}; if (!ace_sys_spectator_SPECTATINGON) exitwith {}; disableserialization; _disp = uiNamespace getVariable 'ace_sys_spectator_rscSpectate'; if (isnil "_disp") then {_disp=(findDisplay 55001)}; if (isnull _disp && !ace_sys_spectator_exit_the_frame) then { createDialog "ACE_rscSpectate"; _timeout =time+4; waituntil {(_timeout< time) || !ace_sys_spectator_SPECTATINGON}; }; if (!ace_sys_spectator_exit_the_frame) then { _timeout =time+4; ace_sys_spectator_exit_the_frame=true; waituntil {(_timeout< time) || !ace_sys_spectator_SPECTATINGON}; sleep 0.1; }; _disp = uiNamespace getVariable 'ace_sys_spectator_rscSpectate'; if (isnil "_disp") then {_disp=(findDisplay 55001)}; if (ace_sys_spectator_exit_the_frame && !isnull _disp && !ace_sys_spectator_SPECTATINGON) then {closedialog 0;}; if (ace_sys_spectator_SPECTATINGON) then {diag_log["revive terminateSpectator failed"]}; }; colum_Revive_checkMedical={ if (!colum_revive_medicalExtraTime) exitwith{}; if (((player getVariable "ace_w_revive") -time) < 500) then { if([player] call ace_sys_wounds_fnc_nearMedicalFacility) then { player setVariable ["ace_w_revive",(player getVariable "ace_w_revive") + 4]; //4 seconds each 9, means double time more or less }; }; }; Colum_revive_fnc_SaveClient= { private["_minimumSaveTime","_ruckMags","_ruckWeap","_ruckdata","_revtime"]; _minimumSaveTime=7; if (colum_revive_LastSave> time) exitwith {}; colum_revive_LastSave=time+_minimumSaveTime; _ruckMags=player getvariable ["ACE_RuckMagContents",[]]; _ruckWeap=player getvariable ["ACE_RuckWepContents",[]]; _revtime=if (Colum_revive_enLimbo || Colum_revive_extraTime) then {-10} else {((player getVariable "ace_w_revive") -time)}; _savedata=[player,getplayerUID player,_revtime]; if (Colum_revive_Save_Ruck) then { _ruckdata= [_ruckWeap,_ruckMags]; if ((count (colum_revive_lastSavedRuck select 0) != count _ruckWeap) || (count (colum_revive_lastSavedRuck select 1) != count _ruckMags) || colum_revive_lastRuckChanged) then { _savedata=_savedata + [_ruckdata]; colum_revive_lastRuckChanged=false; }; colum_revive_lastSavedRuck=_ruckdata; }; if (!isNil 'ACE_fnc_clientToServerEvent') then { ['colum_revive_Save', _savedata] call ACE_fnc_clientToServerEvent; } else { ['colum_revive_Save', _savedata] call CBA_fnc_globalEvent; // TODO: remove after stable 1.14 release }; }; Colum_revive_fnc_LimboStatus= { //Player its dead and rivive counter run out. Move to boot_hill and wait for respawn button press private["_minimumSaveTime","_ruckMags","_ruckWeap","_ruckdata","_tmpRText"]; if (Colum_revive_enLimbo) exitwith{}; Colum_revive_enLimbo=true; titleText ["","BLACK"]; if (vehicle player != player) then {moveOut player}; player setPos getMarkerPos "Boot_hill"; while {Colum_revive_PlayerStatusWounded} do { if ((player getVariable "ace_w_revive") > 0) then {player setVariable ["ace_w_revive",time+1000]}; _tmpRText=if (!Colum_revive_TimeoutAutoRespawn && ((Colum_revive_Count_Start_Time + ace_sys_spectator_RevShowButtonTime) > time)) then { _nextRespawnIn=ace_sys_spectator_RevShowButtonTime + Colum_revive_Count_Start_Time -time; format["%1m:%2s",floor(_nextRespawnIn /60),round(_nextRespawnIn % 60)]; }else { "" }; titleText [_tmpRText,"BLACK FADED",0]; sleep 2; }; titleText ["","BLACK IN"]; Colum_revive_enLimbo=false; }; Colum_revive_fnc_SaveCheck= { private["_oldMag","_oldWeapons","_oldCurrWeapon","_oldPos","_save","_nextSaveTime"]; _oldMag=magazines player; _oldWeapons=weapons player; _oldCurrWeapon=currentweapon player; _oldPos=getposATL player; _save=false; _nextSaveTime=0; sleep 60; while {true} do { _curMag=magazines player; _curWeapons=weapons player; _curCurrWeapon=currentweapon player; _curPos=getposATL player; //Mags changed? if ((count _curMag) != (count _oldMag)) then{ _save=true; }; //Weapons changed? if ((count _curWeapons) != (count _oldWeapons)) then{ _save=true; }; //Equiped weapon changed? if ((_curCurrWeapon) != (_oldCurrWeapon)) then{ _save=true; }; //Player moved more than 100m? if ((_oldPos distance _curPos) > 100) then{ _save=true; }; // if ruck save enabled, ruck contents changed? if (Colum_revive_Save_Ruck) then { _ruckMags=player getvariable ["ACE_RuckMagContents",[]]; _ruckWeap=player getvariable ["ACE_RuckWepContents",[]]; if ((count (colum_revive_lastSavedRuck select 0) != count _ruckWeap) || (count (colum_revive_lastSavedRuck select 1) != count _ruckMags)|| colum_revive_lastRuckChanged) then { _save=true; }; }; if (_save) then { call Colum_revive_fnc_SaveClient; _save=false; }; Sleep Colum_revive_DisconectSave_Time; _oldMag=_curMag; _oldWeapons=_curWeapons; _oldCurrWeapon=_curCurrWeapon; _oldPos=_curPos; }; }; Colum_revive_evento_Muerte= compile preprocessFileLineNumbers format['%1Data\muerte.sqf',Colum_revive_Path]; /*******************************************FIN FUNCIONES CLIENTES ***********************************************************************/ /***********************************************************************************************************************************************/ Player addMPeventhandler ['MPRespawn',{_this spawn Revive_Boton_Respawn_pulsado}]; [] spawn { waitUntil {!isNil "Colum_revive_Iniciado"}; if (Colum_revive_Iniciado && ((Colum_revive_LifesPersist!= 0) || Colum_revive_DisconectSave)) then { //If the mission already started and 60 seconds have passed _W_clycle_count=0; while {(isNil "Colum_revive_VidasLocal") && (_W_clycle_count < 10)} do { if (!isNil 'ACE_fnc_clientToServerEvent') then { ['colum_revive_REQL', [getplayerUID player,player,_W_clycle_count]] call ACE_fnc_clientToServerEvent; } else { ['colum_revive_REQL', [getPlayerUID player,player,_W_clycle_count]] call CBA_fnc_globalEvent; // TODO: remove after stable 1.14 release }; sleep (7 + (random 7)); _W_clycle_count = _W_clycle_count +1; }; if (isNil "Colum_revive_VidasLocal") then { if (Colum_revive_KillOnConnectFail) then { Colum_revive_VidasLocal = 0; }else { Colum_revive_VidasLocal = Colum_revive_VidasMax; }; [12,0] call Colum_Revive_Funcion_Message; sleep 10; }; //If no lives recived, default = death if (Colum_revive_JIPTelep) then { [] spawn Colum_Revive_TelepSquad}; }else{ // Server not started or in the first 60 seconds = max lives Colum_revive_VidasLocal=Colum_revive_VidasMax; }; }; waitUntil {!isNil "Colum_revive_VidasLocal"}; if (Colum_revive_VidasLocal <= 0) exitwith{[1] spawn Colum_revive_evento_Muerte}; //No lives left => exit && espectator if (Colum_revive_VidasLocal == 1) then {ace_wounds_prevtime = 0}; if (Colum_revive_TKcheck || Colum_revive_WoundScoring) then { ExecVM format['%1Data\JugadorHit.sqf',Colum_revive_Path] }; //Detect TK's [] spawn Colum_Revive_MochilaMedica; [1,0] call Colum_Revive_Funcion_Message; if (Colum_revive_DisconectSave_Time >0) then { [] spawn Colum_revive_fnc_SaveCheck;}; //Save Loop [] spawn { waituntil{!(isNull (findDisplay 46))}; (findDisplay 46) displayAddEventHandler ["KeyDown","_this call Colum_Revive_Keypressedcode"]; };clearmagazinecargo _this; clearweaponcargo _this; // Weapons _this addweaponcargo ["AA12_PMC", 10]; _this addweaponcargo ["m8_tws_sd", 10]; _this addweaponcargo ["m8_tws", 10]; _this addweaponcargo ["m8_holo_sd", 10]; _this addweaponcargo ["m8_compact_pmc", 10]; _this addweaponcargo ["m8_carbine_pmc", 10]; _this addweaponcargo ["BAF_AS50_TWS", 1]; _this addweaponcargo ["BAF_L85A2_RIS_CWS", 10]; _this addweaponcargo ["M60A4_EP1", 10]; _this addweaponcargo ["MG36_camo", 10]; _this addweaponcargo ["SVD_NSPU_EP1", 10]; _this addweaponcargo ["UZI_EP1", 10]; _this addweaponcargo ["UZI_SD_EP1", 10]; _this addweaponcargo ["M32_EP1", 10]; _this addweaponcargo ["M110_TWS_EP1", 10]; _this addweaponcargo ["M110_NVG_EP1", 10]; _this addweaponcargo ["SCAR_H_STD_TWS_SD", 10]; _this addweaponcargo ["SCAR_H_CQC_CCO_SD", 10]; _this addweaponcargo ["SCAR_H_CQC_CCO", 10]; _this addweaponcargo ["SCAR_H_STD_EGLM_Spect", 10]; _this addweaponcargo ["SCAR_L_STD_HOLO", 10]; _this addweaponcargo ["SCAR_L_STD_EGLM_TWS", 10]; _this addweaponcargo ["SCAR_L_STD_EGLM_Holo", 10]; _this addweaponcargo ["M14_EP1", 10]; _this addweaponcargo ["FN_FAL_ANPVS4", 10]; _this addweaponcargo ["FN_FAL", 10]; _this addweaponcargo ["AKS_74_GOSHAWK", 10]; _this addweaponcargo ["AKS_74_NSPU", 10]; _this addweaponcargo ["AKS_107_GL_kobra", 10]; _this addweaponcargo ["G36K", 10]; _this addweaponcargo ["G36C", 10]; _this addweaponcargo ["G36A", 10]; _this addweaponcargo ["G36_C_SD_eotech", 10]; _this addweaponcargo ["VSS_vintorez", 10]; _this addweaponcargo ["M136", 10]; _this addweaponcargo ["Javelin", 4]; // Ammo _this addmagazinecargo ["20Rnd_B_AA12_Pellets", 100]; _this addmagazinecargo ["20Rnd_B_AA12_74Slug", 100]; _this addmagazinecargo ["20Rnd_B_AA12_HE", 100]; _this addmagazinecargo ["30Rnd_556x45_StanagSD", 100]; _this addmagazinecargo ["30Rnd_556x45_Stanag", 100]; _this addmagazinecargo ["30Rnd_556x45_G36SD", 100]; _this addmagazinecargo ["30Rnd_556x45_G36", 100]; _this addmagazinecargo ["100Rnd_556x45_BetaCMag", 100]; _this addmagazinecargo ["HandGrenade_West", 100]; _this addmagazinecargo ["SmokeShell", 100]; _this addmagazinecargo ["5Rnd_127x99_as50", 1]; _this addmagazinecargo ["100Rnd_762x51_M240", 100]; _this addmagazinecargo ["10Rnd_762x54_SVD", 100]; _this addmagazinecargo ["30Rnd_9x19_UZI_SD", 100]; _this addmagazinecargo ["30Rnd_9x19_UZI", 100]; _this addmagazinecargo ["6Rnd_HE_M203", 100]; _this addmagazinecargo ["Pipebomb", 50]; _this addmagazinecargo ["Mine", 50]; _this addmagazinecargo ["20Rnd_762x51_B_SCAR", 100]; _this addmagazinecargo ["20Rnd_762x51_SB_SCAR", 100]; _this addmagazinecargo ["1Rnd_HE_M203", 100]; _this addmagazinecargo ["FlareGreen_M203", 100]; _this addmagazinecargo ["20Rnd_762x51_DMR", 100]; _this addmagazinecargo ["20Rnd_762x51_FNFAL", 100]; _this addmagazinecargo ["30Rnd_545x39_AK", 100]; _this addmagazinecargo ["20Rnd_9x39_SP5_VSS", 100]; _this addmagazinecargo ["Javelin", 4]; _this addWeaponCargo ["ACE_Javelin_CLU", 4]; _this addMagazineCargo ["ACE_Bandage", 25]; _this addMagazineCargo ["ACE_Bodybag", 25]; _this addMagazineCargo ["ACE_Epinephrine", 25]; _this addMagazineCargo ["ACE_IV", 25]; _this addMagazineCargo ["ACE_LargeBandage", 25]; _this addMagazineCargo ["ACE_Medkit", 25]; _this addMagazineCargo ["ACE_Morphine", 25]; _this addMagazineCargo ["ACE_Plasma", 25]; _this addMagazineCargo ["ACE_Splint", 25]; _this addMagazineCargo ["ACE_Tourniquet", 25]; _this addMagazineCargo ["ACE_CLAYMORE_M", 100]; _this addMagazineCargo ["ACE_Flashbang", 100]; _this addMagazineCargo ["ACE_M7A3", 100]; _this addMagazineCargo ["ACE_M15", 100]; _this addMagazineCargo ["ACE_ANM14", 100]; _this addMagazineCargo ["ACE_1Rnd_HE_M203", 100]; _this addMagazineCargo ["ACE_FlareIR_M203", 100]; _this addMagazineCargo ["ACE_HuntIR_M203", 100]; _this addWeaponCargo ["ACE_MX2A", 10]; _this addWeaponCargo ["ACE_Rangefinder_OD", 10]; _this addMagazineCargo ["ACE_Battery_Rangefinder", 10]; _this addWeaponCargo ["ACE_HK416_D10", 10]; _this addWeaponCargo ["ACE_HK416_D10_AIM", 10]; _this addWeaponCargo ["ACE_HK416_D10_COMPM3", 10]; _this addWeaponCargo ["ACE_HK416_D10_COMPM3_SD", 10]; _this addWeaponCargo ["ACE_HK416_D10_Holo", 10]; _this addWeaponCargo ["ACE_HK416_D10_M320", 10]; _this addWeaponCargo ["ACE_HK416_D10_SD", 10]; _this addWeaponCargo ["ACE_HK416_D14", 10]; _this addWeaponCargo ["ACE_HK416_D14_ACOG_PVS14", 10]; _this addWeaponCargo ["ACE_HK416_D14_COMPM3", 10]; _this addWeaponCargo ["ACE_HK416_D14_COMPM3_M320", 10]; _this addWeaponCargo ["ACE_HK416_D14_SD", 10]; _this addWeaponCargo ["ACE_HK416_D14_TWS", 10]; _this addWeaponCargo ["ACE_HK417_Eotech_4x", 10]; _this addWeaponCargo ["ACE_HK417_micro", 10]; _this addWeaponCargo ["ACE_HK417_Shortdot", 10]; _this addWeaponCargo ["ACE_KAC_PDW", 10]; _this addWeaponCargo ["ACE_M1014_Eotech", 10]; _this addWeaponCargo ["ACE_M14_ACOG", 10]; _this addWeaponCargo ["ACE_m16a2_scope", 10]; _this addWeaponCargo ["ACE_m16a2gl_scope", 10]; _this addWeaponCargo ["ACE_M16A2GL_UP", 10]; _this addWeaponCargo ["ACE_M16A4_ACG_GL_UP", 10]; _this addWeaponCargo ["ACE_M16A4_CCO_GL", 10]; _this addWeaponCargo ["ACE_M16A4_EOT", 10]; _this addWeaponCargo ["ACE_M16A4_EOT_GL", 10]; _this addWeaponCargo ["ACE_M16A4_Iron", 10]; _this addWeaponCargo ["ACE_M27_IAR", 10]; _this addWeaponCargo ["ACE_M27_IAR_ACOG", 10]; _this addWeaponCargo ["ACE_M27_IAR_CCO", 10]; _this addWeaponCargo ["ACE_M4", 10]; _this addWeaponCargo ["ACE_m4_ACOG_PVS14", 10]; _this addWeaponCargo ["ACE_M4_Aim", 10]; _this addWeaponCargo ["ACE_M4_AIM_GL", 10]; _this addWeaponCargo ["ACE_M4_Eotech", 10]; _this addWeaponCargo ["ACE_M4_GL", 10]; _this addWeaponCargo ["ACE_M4A1_AIM_GL_SD", 10]; _this addWeaponCargo ["ACE_M4A1_Aim_SD", 10]; _this addWeaponCargo ["ACE_M4A1_EOT_SD", 10]; _this addWeaponCargo ["ACE_M4A1_GL_SD", 10]; _this addWeaponCargo ["ACE_M4SPR_SD", 10]; _this addWeaponCargo ["ACE_Mk12mod1", 10]; _this addWeaponCargo ["ACE_Mk12mod1_SD", 10]; _this addWeaponCargo ["ACE_MP5A4", 10]; _this addWeaponCargo ["ACE_MP5A5", 10]; _this addWeaponCargo ["ACE_MP5SD", 10]; _this addWeaponCargo ["ACE_SCAR_H_STD_Spect", 10]; _this addWeaponCargo ["ACE_SOC_M4A1", 10]; _this addWeaponCargo ["ACE_SOC_M4A1_AIM_SD", 10]; _this addWeaponCargo ["ACE_SOC_M4A1_EOT_SD", 10]; _this addWeaponCargo ["ACE_SOC_M4A1_Eotech", 10]; _this addWeaponCargo ["ACE_SOC_M4A1_Eotech_4x", 10]; _this addWeaponCargo ["ACE_SOC_M4A1_GL", 10]; _this addWeaponCargo ["ACE_SOC_M4A1_GL_AIMPOINT", 10]; _this addWeaponCargo ["ACE_SOC_M4A1_GL_EOTECH", 10]; _this addWeaponCargo ["ACE_SOC_M4A1_GL_SD", 10]; _this addWeaponCargo ["ACE_SOC_M4A1_RCO_GL", 10]; _this addWeaponCargo ["ACE_SOC_M4A1_SD_9", 10]; _this addWeaponCargo ["ACE_SOC_M4A1_SHORTDOT", 10]; _this addWeaponCargo ["ACE_SOC_M4A1_SHORTDOT_SD", 10]; _this addWeaponCargo ["ACE_SOC_M4A1_TWS", 10]; _this addWeaponCargo ["ACE_SPAS12", 10]; _this addWeaponCargo ["ACE_UMP45", 10]; _this addWeaponCargo ["ACE_UMP45_AIM", 10]; _this addWeaponCargo ["ACE_UMP45_AIM_SD", 10]; _this addWeaponCargo ["ACE_UMP45_SD", 10]; _this addWeaponCargo ["ACE_G3A3_RSAS", 10]; _this addWeaponCargo ["ACE_G3A3", 10]; _this addWeaponCargo ["ACE_G3A3G1", 10]; _this addWeaponCargo ["ACE_G36A2", 10]; _this addWeaponCargo ["ACE_G36A2_Bipod", 10]; _this addWeaponCargo ["ACE_G36K_EOTech", 10]; _this addWeaponCargo ["ACE_G36A1_AG36A1", 10]; _this addWeaponCargo ["", 10]; _this addWeaponCargo ["", 10]; _this addWeaponCargo ["", 10]; _this addMagazineCargo ["ACE_30Rnd_556x45_AP_G36", 100]; _this addMagazineCargo ["ACE_30Rnd_556x45_S_G36", 100]; _this addMagazineCargo ["ACE_30Rnd_556x45_T_G36", 100]; _this addMagazineCargo ["ACE_30Rnd_556x45_S_Stanag", 100]; _this addMagazineCargo ["ACE_30Rnd_556x45_SB_S_Stanag", 100]; _this addMagazineCargo ["ACE_30Rnd_556x45_SB_Stanag", 100]; _this addMagazineCargo ["ACE_30Rnd_556x45_T_Stanag", 100]; _this addMagazineCargo ["ACE_30Rnd_9x19_S_MP5", 100]; _this addMagazineCargo ["ACE_20Rnd_762x51_S_SCAR", 100]; _this addMagazineCargo ["ACE_20Rnd_762x51_SB_S_SCAR", 100]; _this addMagazineCargo ["ACE_20Rnd_762x51_SB_SCAR", 100]; _this addMagazineCargo ["ACE_20Rnd_762x51_T_SCAR", 100]; _this addMagazineCargo ["ACE_8Rnd_12Ga_Buck00", 100]; _this addMagazineCargo ["ACE_8Rnd_12Ga_Slug", 100]; _this addMagazineCargo ["ACE_25Rnd_1143x23_B_UMP45", 100]; _this addMagazineCargo ["ACE_25Rnd_1143x23_S_UMP45", 100]; _this addMagazineCargo ["ACE_20Rnd_762x51_S_DMR", 100]; _this addMagazineCargo ["ACE_20Rnd_762x51_S_M14", 100]; _this addMagazineCargo ["ACE_20Rnd_762x51_T_DMR", 100]; _this addMagazineCargo ["ACE_20Rnd_762x51_T_G3", 100]; _this addMagazineCargo ["ACE_20Rnd_762x51_B_G3 ", 100]; _this addMagazineCargo ["", 100]; _this addMagazineCargo ["", 100];waitUntil{!(isNil "BIS_fnc_init")}; sleep 15; ["May 27, 2013", "12:00 AM"] call BIS_fnc_infoText; sleep 3; ["Douchery"] call BIS_fnc_infoText; sleep 3; ["Created by", "Phantom Six"] call BIS_fnc_infoText;// ========================================================================================================= // UPSMON - Urban Patrol Script Mon // Version: 5.0.7 // Author: Monsada (chs.monsada@gmail.com) // Comunidad Hispana de Simulación: // http://www.simulacion-esp.com // // Wiki: http://dev-heaven.net/projects/upsmon/wiki // Forum: http://forums.bistudio.com/showthread.php?t=91696 // Share your missions with upsmon: http://dev-heaven.net/projects/upsmon/boards/86 // --------------------------------------------------------------------------------------------------------- // Based on Urban Patrol Script // Version: 2.0.3 // Author: Kronzky (www.kronzky.info / kronzky@gmail.com) // --------------------------------------------------------------------------------------------------------- //Adding eventhandlers "KRON_UPS_EAST_SURRENDED" addPublicVariableEventHandler { if (_this select 1) then { nul=[east] execvm "scripts\UPSMON\MON_surrended.sqf";};}; "KRON_UPS_WEST_SURRENDED" addPublicVariableEventHandler { if (_this select 1) then { nul=[west] execvm "scripts\UPSMON\MON_surrended.sqf";};}; "KRON_UPS_GUER_SURRENDED" addPublicVariableEventHandler { if (_this select 1) then { nul=[resistance] execvm "scripts\UPSMON\MON_surrended.sqf";};}; "MON_LOCAL_EXEC" addPublicVariableEventHandler { if (local ((_this select 1)select 0)) then { call ( compile format[(_this select 1)select 1,(_this select 1)select 0] ); }; }; if (!isServer) exitWith {}; //1=Enable or 0=disable debug. in debug could see a mark positioning de leader and another mark of the destinity of movement, very useful for editing mision KRON_UPS_Debug = 0; //Time that lider wait until doing another movement, this time reduced dinamically under fire, and on new targets KRON_UPS_react = 60; //Min time to wait for doing another reaction KRON_UPS_minreact = 30; //Max waiting is the maximum time patrol groups will wait when arrived to target for doing another target. KRON_UPS_maxwaiting = 30; // how long AI units should be in alert mode after initially spotting an enemy KRON_UPS_alerttime = 90; // how far opfors should move away if they're under attack KRON_UPS_safedist = 300; // how close unit has to be to target to generate a new one target or to enter stealth mode KRON_UPS_closeenough = 300; // how close units have to be to each other to share information, over this, will lose target KRON_UPS_sharedist = 600; //If enabled IA comunicating between them with radio defined sharedist distance, KRON_UPS_comradio = 2; //Sides that are enemies of resistance KRON_UPS_Res_enemy = [east]; //Frequency for doin calculations for each squad. KRON_UPS_Cycle = 20; //Height that heli will fly this input will be randomiced in a 10% KRON_UPS_flyInHeight = 40; //Max distance to target for doing paradrop, will be randomiced between 0 and 100% of this value. KRON_UPS_paradropdist = 250; //Enables or disables AI to use static weapons KRON_UPS_useStatics = true; //Enables or disables AI to put mines if armored enemies near KRON_UPS_useMines = true; //Distance from destination for seraching vehicles KRON_UPS_searchVehicledist = 500; //Percentage of units to surrender. KRON_UPS_EAST_SURRENDER = 0; KRON_UPS_WEST_SURRENDER = 0; KRON_UPS_GUER_SURRENDER = 0; //Efective distance for doing perfect ambush (max distance is this x2) KRON_UPS_ambushdist = 50; //Enable it to send reinforcements, better done it in a trigger inside your mission. KRON_UPS_reinforcement = true; //Artillery support, better control if set in trigger KRON_UPS_ARTILLERY_EAST_FIRE = false; //set to true for doing east to fire KRON_UPS_ARTILLERY_WEST_FIRE = false; //set to true for doing west to fire KRON_UPS_ARTILLERY_GUER_FIRE = false; //set to true for doing resistance to fire //---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- // Initialization of public Variables used in script, do not touch //---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- KRON_UPS_flankAngle = 45; //Angulo de flanqueo KRON_UPS_INIT = 0; //Variable que indica que ha sido inicializado KRON_UPS_EAST_SURRENDED = false; KRON_UPS_WEST_SURRENDED = false; KRON_UPS_GUER_SURRENDED = false; KRON_AllWest=[]; //All west AI KRON_AllEast=[]; //All east AI KRON_AllRes=[]; //All resistance AI KRON_UPS_East_enemies = []; KRON_UPS_West_enemies = []; KRON_UPS_Guer_enemies = []; KRON_UPS_East_friends = []; KRON_UPS_West_friends = []; KRON_UPS_Guer_friends = []; KRON_targets0 =[];//objetivos west KRON_targets1 =[];//objetivos east KRON_targets2 =[];//resistence KRON_targetsPos =[];//Posiciones de destino actuales. KRON_NPCs = []; //Lideres de los grupos actuales KRON_UPS_Instances=0; KRON_UPS_Total=0; KRON_UPS_Exited=0; KRON_UPS_East_Total = 0; KRON_UPS_West_Total = 0; KRON_UPS_Guer_Total = 0; KRON_UPS_ARTILLERY_UNITS = []; KRON_UPS_ARTILLERY_WEST_TARGET = objnull; KRON_UPS_ARTILLERY_EAST_TARGET = objnull; KRON_UPS_ARTILLERY_GUER_TARGET = objnull; KRON_UPS_TEMPLATES = []; KRON_UPS_MG_WEAPONS = ["MG36","M249","M240","MK_48","PK","PKm","Pecheneg","M249 Para","M249 Para M145","M240G M145","M60"]; //---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- // ***************************************** SERVER INITIALIZATION ***************************************** if (isNil("KRON_UPS_INIT") || KRON_UPS_INIT == 0) then { //Init library function, Required Version: 5.0 of mon_functions call compile preprocessFileLineNumbers "scripts\UPSMON\common\MON_functions.sqf"; //scripts initialization UPSMON = compile preprocessFile "scripts\UPSMON.sqf"; UPSMON_surrended = compile preprocessFile "scripts\UPSMON\MON_surrended.sqf"; // declaración de variables privadas private["_obj","_trg","_l","_pos"]; // global functions KRON_randomPos = {private["_cx","_cy","_rx","_ry","_cd","_sd","_ad","_tx","_ty","_xout","_yout"];_cx=_this select 0; _cy=_this select 1; _rx=_this select 2; _ry=_this select 3; _cd=_this select 4; _sd=_this select 5; _ad=_this select 6; _tx=random (_rx*2)-_rx; _ty=random (_ry*2)-_ry; _xout=if (_ad!=0) then {_cx+ (_cd*_tx - _sd*_ty)} else {_cx+_tx}; _yout=if (_ad!=0) then {_cy+ (_sd*_tx + _cd*_ty)} else {_cy+_ty}; [_xout,_yout]}; KRON_PosInfo = {private["_pos","_lst","_bld","_bldpos"];_pos=_this select 0; _lst=_pos nearObjects ["House",12]; if (count _lst==0) then {_bld=0;_bldpos=0} else {_bld=_lst select 0; _bldpos=[_bld] call KRON_BldPos}; [_bld,_bldpos]}; KRON_PosInfo3 = {private["_pos","_lst","_bld","_bldpos"];_pos=_this select 0; _lst= nearestObjects [_pos, [], 3]; if (count _lst==0) then {_bld=objnull;_bldpos=0} else {_bld = nearestbuilding (_lst select 0); _bldpos=[_bld] call KRON_BldPos2}; [_bld,_bldpos]}; KRON_BldPos = {private ["_bld","_bldpos","_posZ","_maxZ"];_bld=_this select 0;_maxZ=0;_bi=0;_bldpos=0;while {_bi>=0} do {if (((_bld BuildingPos _bi) select 0)==0) then {_bi=-99} else {_bz=((_bld BuildingPos _bi) select 2); if (((_bz)>4) && ((_bz>_maxZ) || ((_bz==_maxZ) && (random 1>.8)))) then {_maxZ=_bz; _bldpos=_bi}};_bi=_bi+1};_bldpos}; KRON_BldPos2 = {private ["_bld","_bldpos"]; _bld=_this select 0; _bldpos = 1; while {format ["%1", _bld buildingPos _bldpos] != "[0,0,0]"} do {_bldpos = _bldpos + 1;}; _bldpos = _bldpos - 1; _bldpos;}; KRON_OnRoad = {private["_p","_w","_i","_lst"];_p=_this select 0; _w=_this select 1; _i=_this select 2; _lst=_p nearObjects ["House",12]; if ((count _lst==0) && (_w || !(surfaceIsWater _p))) then {_i=99}; (_i+1)}; KRON_getDirPos = {private["_a","_b","_from","_to","_return"]; _from = _this select 0; _to = _this select 1; _return = 0; _a = ((_to select 0) - (_from select 0)); _b = ((_to select 1) - (_from select 1)); if (_a != 0 || _b != 0) then {_return = _a atan2 _b}; if ( _return < 0 ) then { _return = _return + 360 }; _return}; //KRON_distancePosSqr = {round(((round((_this select 0) select 0)-round((_this select 1) select 0))^2 + (round((_this select 0) select 1)-round((_this select 1) select 1))^2)^0.5)}; //KRON_distancePosSqr = {((((_this select 0) select 0)-((_this select 1) select 0))^2 + (((_this select 0) select 1)-((_this select 1) select 1))^2)^0.5}; KRON_distancePosSqr = {round(((((_this select 0) select 0)-((_this select 1) select 0))^2 + (((_this select 0) select 1)-((_this select 1) select 1))^2)^0.5)}; KRON_relPos = {private["_p","_d","_a","_x","_y","_xout","_yout"];_p=_this select 0; _x=_p select 0; _y=_p select 1; _d=_this select 1; _a=_this select 2; _xout=_x + sin(_a)*_d; _yout=_y + cos(_a)*_d;[_xout,_yout,0]}; KRON_rotpoint = {private["_cp","_a","_tx","_ty","_cd","_sd","_cx","_cy","_xout","_yout"];_cp=_this select 0; _cx=_cp select 0; _cy=_cp select 1; _a=_this select 1; _cd=cos(_a*-1); _sd=sin(_a*-1); _tx=_this select 2; _ty=_this select 3; _xout=if (_a!=0) then {_cx+ (_cd*_tx - _sd*_ty)} else {_cx+_tx}; _yout=if (_a!=0) then {_cy+ (_sd*_tx + _cd*_ty)} else {_cy+_ty}; [_xout,_yout,0]}; KRON_stayInside = { private["_np","_nx","_ny","_cp","_cx","_cy","_rx","_ry","_d","_tp","_tx","_ty","_fx","_fy"]; _np=_this select 0; _nx=_np select 0; _ny=_np select 1; _cp=_this select 1; _cx=_cp select 0; _cy=_cp select 1; _rx=_this select 2; _ry=_this select 3; _d=_this select 4; _tp = [_cp,_d,(_nx-_cx),(_ny-_cy)] call KRON_rotpoint; _tx = _tp select 0; _fx=_tx; _ty = _tp select 1; _fy=_ty; if (_tx<(_cx-_rx)) then {_fx=_cx-_rx}; if (_tx>(_cx+_rx)) then {_fx=_cx+_rx}; if (_ty<(_cy-_ry)) then {_fy=_cy-_ry}; if (_ty>(_cy+_ry)) then {_fy=_cy+_ry}; if ((_fx!=_tx) || (_fy!=_ty)) then {_np = [_cp,_d*-1,(_fx-_cx),(_fy-_cy)] call KRON_rotpoint}; _np; }; // Misc KRON_UPSgetArg = {private["_cmd","_arg","_list","_a","_v"]; _cmd=_this select 0; _arg=_this select 1; _list=_this select 2; _a=-1; {_a=_a+1; _v=format["%1",_list select _a]; if (_v==_cmd) then {_arg=(_list select _a+1)}} foreach _list; _arg}; KRON_UPSsetArg = {private["_cmd","_arg","_list","_a","_v"]; _cmd=_this select 0; _arg=_this select 1; _list=_this select 2; _a=-1; { _a=_a+1; _v=format["%1",_list select _a]; if (_v==_cmd) then { _a=_a+1; _list set [_a,_arg]; }; } foreach _list; _list}; KRON_deleteDead = {private["_u","_s"];_u=_this select 0; _s= _this select 1; _u removeAllEventHandlers "killed"; sleep _s; deletevehicle _u}; // *********************************************************************************************************** // MAIN UPSMON SERVER FUNCTION // *********************************************************************************************************** MON_MAIN_server = { private["_obj","_trg","_l","_pos","_countWestSur","_countEastSur","_countResSur","_WestSur","_EastSur","_ResSur","_target","_targets","_targets0","_targets1","_targets2","_npc","_cycle" ,"_arti","_side","_range","_rounds","_area","_maxcadence","_mincadence","_bullet","_fire","_knownpos","_sharedenemy","_enemyside"]; _cycle = 20; //Time to do a call to commander _arti = objnull; _side = ""; _range = 0; _rounds = 0; _area = 0; _maxcadence = 0; _mincadence = 0; _bullet = ""; _fire = false; _target = objnull; _knownpos =[0,0,0]; _enemyside = []; _WestSur = KRON_UPS_WEST_SURRENDED; _EastSur = KRON_UPS_EAST_SURRENDED; _ResSur = KRON_UPS_GUER_SURRENDED; //Main loop while {true} do { _countWestSur = round ( KRON_UPS_West_Total * KRON_UPS_WEST_SURRENDER / 100); _countEastSur = round ( KRON_UPS_East_Total * KRON_UPS_EAST_SURRENDER / 100); _countResSur = round ( KRON_UPS_Guer_Total * KRON_UPS_GUER_SURRENDER / 100); //Checks for WEST surrender if (KRON_UPS_WEST_SURRENDER > 0 && !KRON_UPS_WEST_SURRENDED ) then { { if (!alive _x || !canmove _x) then {KRON_AllWest = KRON_AllWest-[_x]}; }foreach KRON_AllWest; if ( count KRON_AllWest <= _countWestSur ) then { KRON_UPS_WEST_SURRENDED = true; publicvariable "KRON_AllWest"; publicvariable "KRON_UPS_WEST_SURRENDED"; }; }; //Checks for EAST surrender if (KRON_UPS_EAST_SURRENDER > 0 && !KRON_UPS_EAST_SURRENDED ) then { { if (!alive _x || !canmove _x) then {KRON_AllEast = KRON_AllEast-[_x]}; }foreach KRON_AllEast; if ( count KRON_AllEast <= _countEastSur ) then { KRON_UPS_EAST_SURRENDED = true; publicvariable "KRON_AllEast"; publicvariable "KRON_UPS_EAST_SURRENDED"; }; }; //Checks for RESISTANCE surrender if (KRON_UPS_GUER_SURRENDER > 0 && !KRON_UPS_GUER_SURRENDED ) then { { if (!alive _x || !canmove _x) then {KRON_AllRes = KRON_AllRes-[_x]}; }foreach KRON_AllRes; if ( count KRON_AllRes <= _countResSur ) then { KRON_UPS_GUER_SURRENDED = true; publicvariable "KRON_AllRes"; publicvariable "KRON_UPS_GUER_SURRENDED"; }; }; //Exec surrended script if (KRON_UPS_WEST_SURRENDED && !_WestSur ) then { _WestSur = true; [west] spawn UPSMON_surrended; }; if (KRON_UPS_EAST_SURRENDED && !_EastSur ) then { _EastSur = true; [east] spawn UPSMON_surrended; }; if (KRON_UPS_GUER_SURRENDED && !_ResSur ) then { _ResSur = true; [Resistance] spawn UPSMON_surrended; }; sleep 0.5; _sharedenemy = 0; _targets0 = []; _targets1 = []; _targets2 = []; { if (!isnull _x && alive _x && !captive _x ) then { _npc = _x; _targets = []; switch (side _npc) do { //West targets case west: { _sharedenemy = 0; _enemyside = [east]; }; //East targets case east: { _sharedenemy = 1; _enemyside = [west]; }; //Resistance targets case resistance: { _sharedenemy = 2; _enemyside = KRON_UPS_Res_enemy; }; }; if (side _npc in KRON_UPS_Res_enemy) then { _enemyside = _enemyside + [resistance]; }; //Gets known targets on each leader for comunicating enemy position //Has better performance with targetsquery //_targets = _npc nearTargets KRON_UPS_sharedist; _targets = _npc targetsQuery ["","","","",""]; { //_target = _x select 4; //Neartargets _target = _x select 1;//Targetsquery if ( side _target in _enemyside ) then { //if (KRON_UPS_Debug>0) then {diag_log format["%1: %2 _enemyside=%3 _target=%4 %5 enemies=%6",_npc getVariable ("UPSMON_grpid"),_npc,_enemyside, typeof _target,side _target,_npc countEnemy _targets ]}; //if (KRON_UPS_Debug>0) then {player globalchat format["%1: %2 _enemyside=%3 _target=%4 %5 enemies=%6",_npc getVariable ("UPSMON_grpid"),_npc,_enemyside, typeof _target,side _target,_npc countEnemy _targets ]}; if (!isnull _target && alive _target && canmove _target && !captive _target && _npc knowsabout _target > 0.5 && ( _target iskindof "Land" || _target iskindof "Air" || _target iskindof "Ship" ) && !( _target iskindof "Animal") && ( _target emptyPositions "Gunner" == 0 && _target emptyPositions "Driver" == 0 || (!isnull (gunner _target) && canmove (gunner _target)) || (!isnull (driver _target) && canmove (driver _target))) ) then { //Saves last known position //_knownpos = _x select 0; //Neartargets _knownpos = _x select 4;//Targetsquery _target setvariable ["UPSMON_lastknownpos", _knownpos, false]; call (compile format ["_targets%1 = _targets%1 - [_target]",_sharedenemy]); call (compile format ["_targets%1 = _targets%1 + [_target]",_sharedenemy]); }; }; }foreach _targets; }; sleep 0.5; }foreach KRON_NPCs; //Share targets KRON_targets0 = _targets0; KRON_targets1 = _targets1; KRON_targets2 = _targets2; //Target debug console if (KRON_UPS_Debug>0) then {hintsilent parseText format["West(A=%1 C=%2 T=%3)
East(A=%4 C=%5 T=%6)
Res(A=%7 C=%8 T=%9)
" ,KRON_UPS_West_Total, count KRON_AllWest, count KRON_targets0 ,KRON_UPS_East_Total, count KRON_AllEast, count KRON_targets1 ,KRON_UPS_Guer_Total, count KRON_AllRes, count KRON_targets2 ]}; sleep 0.5; //Artillery module control { _arti = _x select 0; _rounds = _x select 1; _range = _x select 2; _area = _x select 3; _maxcadence = _x select 4; _mincadence = _x select 5; _bullet = _x select 6; if (!isnull (gunner _arti) && canmove (gunner _arti)) then { _side = side gunner _arti; _fire = call (compile format ["KRON_UPS_ARTILLERY_%1_FIRE",_side]); //If fire enabled gets a known target pos for doing fire if no friendly squads near. if (_fire) then { _target = call (compile format ["KRON_UPS_ARTILLERY_%1_TARGET",_side]); if (isnil "_target" ) then {_target = objnull;}; switch (_side) do { //West targets case west: { _targets = KRON_targets0; }; //East targets case east: { _targets = KRON_targets1; }; //Resistance targets case resistance: { _targets = KRON_targets2; }; }; //Check if has a target if (!(_target in _targets ) || isnull _target || !alive _target) then { _target = objnull; { _auxtarget = _x; _targetPos = _auxtarget getvariable ("UPSMON_lastknownpos"); if (!isnil "_targetPos") then { //If target in range check no friendly squad near if (alive _auxtarget && !(_auxtarget iskindof "Air") && (round([position _arti,_targetPos] call KRON_distancePosSqr)) <= _range) then { _target = _auxtarget; //Must check if no friendly squad near fire position { if (!isnull _x && _side == side _x) then { if ((round([position _x,_targetPos] call KRON_distancePosSqr)) < KRON_UPS_safedist) exitwith {_target = objnull;}; }; }foreach KRON_NPCs; }; }; //If target found exit if (!isnull _target) exitwith {}; }foreach _targets; }; //If target fires artillery if (!isnull _target) then { //Fix current target call (compile format ["KRON_UPS_ARTILLERY_%1_TARGET = _target",_side]); _targetPos = _target getvariable ("UPSMON_lastknownpos"); if (!isnil "_targetPos") then { [_targetPos,_rounds,_area,_maxcadence,_mincadence,_bullet] spawn MON_artillery_dofire; }; }; }; }; sleep 0.5; }foreach KRON_UPS_ARTILLERY_UNITS; //if (KRON_UPS_Debug>0) then {player globalchat format["Init_upsmon artillery=%1 %2",count KRON_UPS_ARTILLERY_UNITS]}; sleep _cycle; }; }; // *********************************************************************************************************** // INITIALIZATION OF UPSMON // *********************************************************************************************************** _l = allunits + vehicles; { if ((_x iskindof "AllVehicles") && (side _x != civilian)) then { _s = side _x; switch (_s) do { case west: { KRON_AllWest=KRON_AllWest+[_x]; }; case east: { KRON_AllEast=KRON_AllEast+[_x]; }; case resistance: { KRON_AllRes=KRON_AllRes+[_x]; }; }; }; } forEach _l; _l = nil; if (isNil("KRON_UPS_Debug")) then {KRON_UPS_Debug=0}; KRON_UPS_East_enemies = KRON_AllWest; KRON_UPS_West_enemies = KRON_AllEast; if (east in KRON_UPS_Res_enemy ) then { KRON_UPS_East_enemies = KRON_UPS_East_enemies+KRON_AllRes; KRON_UPS_Guer_enemies = KRON_AllEast; } else { KRON_UPS_East_friends = KRON_UPS_East_friends+KRON_AllRes; KRON_UPS_Guer_friends = KRON_AllEast; }; if (west in KRON_UPS_Res_enemy ) then { KRON_UPS_West_enemies = KRON_UPS_West_enemies+KRON_AllRes; KRON_UPS_Guer_enemies = KRON_UPS_Guer_enemies+KRON_AllWest; } else { KRON_UPS_West_friends = KRON_UPS_West_friends+KRON_AllRes; KRON_UPS_Guer_friends = KRON_UPS_Guer_friends+KRON_AllWest; }; KRON_UPS_West_Total = count KRON_AllWest; KRON_UPS_East_Total = count KRON_AllEast; KRON_UPS_Guer_Total = count KRON_AllRes; //Initialization done KRON_UPS_INIT=1; }; // --------------------------------------------------------------------------------------------------------- processInitCommands; //Executes de main process of server [] SPAWN MON_MAIN_server; diag_log "--------------------------------"; diag_log (format["UPSMON started"]); if(true) exitWith {}; // ========================================================================================================= // UPSMON - Urban Patrol Script Mon // Version: 5.0.7 // Author: Monsada (chs.monsada@gmail.com) // Comunidad Hispana de Simulación: // http://www.simulacion-esp.com // // Wiki: http://dev-heaven.net/projects/upsmon/wiki // Forum: http://forums.bistudio.com/showthread.php?t=91696 // Share your missions with upsmon: http://dev-heaven.net/projects/upsmon/boards/86 // --------------------------------------------------------------------------------------------------------- // Based on Urban Patrol Script // Version: 2.0.3 // Author: Kronzky (www.kronzky.info / kronzky@gmail.com) // --------------------------------------------------------------------------------------------------------- // Required parameters: // unit = Unit to patrol area (1st argument) // markername = Name of marker that covers the active area. (2nd argument) // // Patrol squad samples: // nul=[this,"town"] execVM "upsmon.sqf"; // // defensive squad samples: // nul=[this,"town","nomove"] execVM "scripts\upsmon.sqf"; // // Optional parameters: _ // random = Place unit at random start position. // randomdn = Only use random positions on ground level. // randomup = Only use random positions at top building positions. // min:n/max:n = Create a random number (between min and max) of 'clones'. // init:string = Custom init string for created clones. // nomove = Unit will stay at start position until enemy is spotted. // nofollow = Unit will only follow an enemy within the marker area. // delete:n = Delete dead units after 'n' seconds. // nowait = Do not wait at patrol end points. // noslow = Keep default behaviour of unit (don't change to "safe" and "limited"). // noai = Don't use enhanced AI for evasive and flanking maneuvers. // showmarker = Display the area marker. // trigger = Display a message when no more units are left in sector. // empty:n = Consider area empty, even if 'n' units are left. // track = Display a position and destination marker for each unit. // reinforcement = Makes squad as reinforcement, when alarm KRON_UPS_reinforcement==true this squad will go where enemy were. // reinforcement:x = Makes squad as reinforcement id, when alarm KRON_UPS_reinforcementx==true this squad will go where enemy were. // fortify = makes leader order to take positions on nearly buildings at distance 200 meters, squad fortified moves less than "nomove" // spawned = use only with squads created in runtime, this feature will add squad to UPSMON correctly. // nowp = No waypoints will be created for this squad UNTIL ENEMY DETECTED, this squad will comunicate enemies but will not be moved by UPSMON until enemy detected, after that upsmon takes control of squad // nowp2 = No waypoints will be created for this squad UNTIL ENEMY DETECTED and damaged, this squad will comunicate enemies but will not be moved by UPSMON until enemy detected and damaged, after that upsmon takes control of squad // nowp3 = No waypoints will be created for this squad in any way, this squad will comunicate enemies but will not be moved by UPSMON. // ambush = Ambush squad will not move until in combat, will lay mines if enabled and wait for incoming enemies stealth and ambush when near or discovered. // ambush2 = Ambush squad will not move until in combat, will NOT LAY MINES and wait for incoming enemies stealth and ambush when near or discovered. // ambush:n = Creates an anbush and wait maximun the especified time n in seconds. you can put 0 seconds for putting mines and go away if combined with "move" for example // ambush2:n = Same as ambush:n but without laying mines. // aware,combat,stealth,careless defines default behaviour of squad // respawn = allow squad to respawn when all members are dead and no targets near // respawn:x = allows to define the number of times squad may respawn. // ----------------------------------------------------------------------------- // Modified: 08.04.2010 // ----------------------------------------------------------------------------- // Changes in version: // ----------------------------------------------------------------------------- // Added: // nowp = No waypoints will be created for this squad UNTIL ENEMY DETECTED // nowp2 = No waypoints will be created for this squad UNTIL ENEMY DETECTED AND DAMAGED // nowp3 = No waypoints will be created for this squad in any way. // Ambush2 Same as ambush but without using mines // Added spawn support for vehicles in squad // Modified: // FORTIFY moves leader too and prevents from moving when hurt // Solved bug in targetting of resistance // Solved bug when respawning a template squad were creating a new template // Solved bug that did exiting AI form vehicle when upsmon begins // Solved bug of squads loosing group and gets stucked // Avoid to take same position on buildings // Solved bug in control of heli // ----------------------------------------------------------------------------- if (!isServer) exitWith {}; // ----------------------------------------------------------------------------- if (isNil("KRON_UPS_INIT")) then { KRON_UPS_INIT=0; }; waitUntil {KRON_UPS_INIT==1}; // convert argument list to uppercase _UCthis = []; for [{_i=0},{_i0) then {player sidechat format["%1: New instance",_grpidx,_npc getVariable ("UPSMON_grpid")]}; //Is ACE mod installed and loaded? //_ace = isClass(configFile >> "CfgPatches" >> "ace_main"); //Did ACE scripting start? //if (KRON_UPS_Debug>0) then {player sidechat format["_ACE=%1 ACE=%2",_ace,!(isNil "ace_main")]}; // get name of area marker _areamarker = _this select 1; if (isNil ("_areamarker")) exitWith { hint "UPS: Area marker not defined.\n(Typo, or name not enclosed in quotation marks?)"; }; // remember center position of area marker _centerpos = getMarkerPos _areamarker; _centerX = abs(_centerpos select 0); _centerY = abs(_centerpos select 1); _centerpos = [_centerX,_centerY]; // show area marker _showmarker = if ("SHOWMARKER" in _UCthis) then {"SHOWMARKER"} else {"HIDEMARKER"}; if (_showmarker=="HIDEMARKER") then { //_areamarker setMarkerCondition "false"; // VBS2 _areamarker setMarkerPos [-abs(_centerX),-abs(_centerY)]; }; // is anybody alive in the group? _exit = true; if (typename _npc=="OBJECT") then { if (!isnull group _npc) then { _npc = [_npc,units (group _npc)] call MON_getleader; }else{ _vehicles = [_npc,2] call MON_nearestSoldiers; if (count _vehicles>0) then { _npc = [_vehicles select 0,units (_vehicles select 0)] call MON_getleader; }; }; } else { if (count _obj>0) then { _npc = [_obj,count _obj] call MON_getleader; }; }; if (!(_npc iskindof "Man")) then { if (!isnull(commander _npc) ) then { _npc = commander _npc; }else{ if (!isnull(driver _npc) ) then { _npc = driver _npc; }else{ _npc = gunner _npc; }; }; group _npc selectLeader _npc; }; if (alive _npc) then {_exit = false;}; if (KRON_UPS_Debug>0 && _exit) then {player sidechat format["%1 There is no alive members %1 %2 %3",_grpidx,typename _npc,typeof _npc, count units _npc]}; // exit if something went wrong during initialization (or if unit is on roof) if (_exit) exitWith { if (KRON_UPS_DEBUG>0) then {hint "Initialization aborted"}; }; // remember the original group members, so we can later find a new leader, in case he dies _members = units _npc; KRON_UPS_Total = KRON_UPS_Total + (count _members); //Fills member soldier types _vehicles = []; { if (vehicle _x != _x ) then { _vehicles = _vehicles - [vehicle _x]; _vehicles = _vehicles + [vehicle _x]; }; _membertypes = _membertypes + [typeof _x]; }foreach _members; //Fills member vehicle types { _vehicletypes = _vehicletypes + [typeof _x]; }foreach _vehicles; // what type of "vehicle" is unit ? _isman = "Man" countType [_npc]>0; _iscar = "LandVehicle" countType [_npc]>0; _isboat = "Ship" countType [_npc]>0; _isplane = "Air" countType [_npc]>0; // we just have to brute-force it for now, and declare *everyone* an enemy who isn't a civilian _issoldier = _side != civilian; _friends=[]; _enemies=[]; _sharedenemy=0; if (_issoldier) then { switch (_side) do { case west: { _sharedenemy=0; _friendside = [west]; _enemyside = [east]; }; case east: { _sharedenemy=1; _friendside = [east]; _enemyside = [west]; }; case resistance: { _sharedenemy=2; _enemyside = KRON_UPS_Res_enemy; if (!(east in _enemyside)) then { _friendside = [east]; }; if (!(west in _enemyside)) then { _friendside = [west]; }; }; }; }; if (_side in KRON_UPS_Res_enemy) then { _enemyside = _enemyside + [resistance]; }else { _friendside = _friendside + [resistance]; }; sleep .05; //Sets min units alive for surrender _surrender = call (compile format ["KRON_UPS_%1_SURRENDER",_side]); // Tanks friendlys are contabiliced { if ( side _x in _friendside && ( _x iskindof "Tank" || _x iskindof "Wheeled_APC" )) then { _friendlytanks = _friendlytanks + [_x]; }; }foreach vehicles; // global unit variable to externally influence script //call compile format ["KRON_UPS_%1=1",_npcname]; // X/Y range of target area _areasize = getMarkerSize _areamarker; _rangeX = _areasize select 0; _rangeY = _areasize select 1; _area = abs((_rangeX * _rangeY) ^ 0.5); // marker orientation (needed as negative value!) _areadir = (markerDir _areamarker) * -1; // store some trig calculations _cosdir=cos(_areadir); _sindir=sin(_areadir); // minimum distance of new target position _mindist=(_rangeX^2+_rangeY^2)/3; if (_rangeX==0) exitWith { hint format["UPS: Cannot patrol Sector: %1\nArea Marker doesn't exist",_areamarker]; }; //hint format["%1,%2,%3,%4",_areamarker,isNil ("_areamarker"),_rangeX,_rangeY]; // remember the original mode & speed _orgMode = behaviour _npc; _orgSpeed = speedmode _npc; // set first target to current position (so we'll generate a new one right away) _currPos = getpos _npc; _orgPos = _currPos; _orgDir = getDir _npc; _orgWatch=[_currPos,50,_orgDir] call KRON_relPos; _lastpos = _currPos; _avoidPos = [0,0]; _flankPos = [0,0]; _attackPos = [0,0]; _newattackPos = [0,0]; _fixedtargetpos = [0,0]; _frontPos = [0,0]; _dirf1 = 0;_dirf2=0;_flankPos2=[0,0]; _dist = 10000; _lastdist = 0; _lastmove1 = 0; _lastmove2 = 0; _maxmove=0; _moved=0; _damm=0; _dammchg=0; _lastdamm = 0; _timeontarget = 0; _fightmode = "walk"; _fm=0; _gothit = false; _pursue=false; _hitPos=[0,0,0]; _react = 0; _lastdamage = 0; _lastknown = 0; _opfknowval = 0; _sin0=1; _sin90=1; _cos90=0; _sin270=-1; _cos270=0; _targetX =0; _targetY=0; _relTX=0;_relTY=0; _relUX=0;_relUY=0; _supressed = false; _flankdist=0; _nBuilding=nil; _nBuildingt =nil; _speedmode="Limited"; _distnbuid = 0; _distnbuidt = 0; _objsflankPos1 = []; _cntobjs1 = 0; _objsflankPos2 = []; _cntobjs2 = 0; _targettext =""; _dir1 =0;_dir2=0;_dir3=0;_dd=0; _timeontarget=0; _newdamage =0; _reinforcement =""; _reinforcementsent = false; _target = objnull; _newtarget=objnull; _flankdir=0; //1 tendencia a flankpos1, 2 tendencia a flankpos2 _prov=0; _targets=[]; _planta=0; //Indice de plantas en edificios _newflankAngle = 0; _closeenough = KRON_UPS_closeenough; _gunner = objnull; _driver = objnull; _fortify = false; _buildingdist= 60;//Distance to search buildings near _Behaviour = "CARELESS"; _grp = grpnull; _grp = group _npc; _template = 0; _nowpType = 1; _ambushtype = 1; // set target tolerance high for choppers & planes if (_isplane) then {_closeenough=KRON_UPS_closeenough * 2}; // ***************************************** optional arguments ***************************************** // wait at patrol end points _pause = if ("NOWAIT" in _UCthis) then {"NOWAIT"} else {"WAIT"}; // don't move until an enemy is spotted _nomove = if ("NOMOVE" in _UCthis) then {"NOMOVE"} else {"MOVE"}; //fortify group in near places _fortify= if ("FORTIFY" in _UCthis) then {true} else {false}; _fortifyorig = _fortify; if (_fortify) then { _nomove="NOMOVE"; _minreact = KRON_UPS_minreact * 3; _buildingdist = _buildingdist * 2; _makenewtarget = true; _wait = 3000; }; // don't follow outside of marker area _nowp = if ("NOWP" in _UCthis) then {true} else {false}; _nowp = if ("NOWP2" in _UCthis) then {true} else {_nowp}; _nowp = if ("NOWP3" in _UCthis) then {true} else {_nowp}; _nowpType = if ("NOWP2" in _UCthis) then {2} else {_nowpType}; _nowpType = if ("NOWP3" in _UCthis) then {3} else {_nowpType}; _orignowp = _nowp; //Ambush squad will no move until in combat or so close enemy _ambush= if ("AMBUSH" in _UCthis) then {true} else {false}; _ambush= if ("AMBUSH:" in _UCthis) then {true} else {_ambush}; _ambush= if ("AMBUSH2" in _UCthis) then {true} else {_ambush}; _ambushwait = ["AMBUSH:",_ambushwait,_UCthis] call KRON_UPSgetArg; _ambushwait = ["AMBUSH2:",_ambushwait,_UCthis] call KRON_UPSgetArg; _ambushType = if ("AMBUSH2" in _UCthis) then {2} else {_ambushType}; _ambushType = if ("AMBUSH2:" in _UCthis) then {2} else {_ambushType}; // don't follow outside of marker area _respawn = if ("RESPAWN" in _UCthis) then {true} else {false}; _respawn = if ("RESPAWN:" in _UCthis) then {true} else {_respawn}; _respawnmax = ["RESPAWN:",_respawnmax,_UCthis] call KRON_UPSgetArg; if (!_respawn) then {_respawnmax = 0}; // any init strings? _initstr = ["INIT:","",_UCthis] call KRON_UPSgetArg; // don't follow outside of marker area _nofollow = if ("NOFOLLOW" in _UCthis) then {"NOFOLLOW"} else {"FOLLOW"}; // share enemy info _shareinfo = if ("NOSHARE" in _UCthis) then {"NOSHARE"} else {"SHARE"}; // "area cleared" trigger activator _areatrigger = if ("TRIGGER" in _UCthis) then {"TRIGGER"} else {if ("NOTRIGGER" in _UCthis) then {"NOTRIGGER"} else {"SILENTTRIGGER"}}; // suppress fight behaviour if ("NOAI" in _UCthis) then {_issoldier=false}; // adjust cycle delay _cycle = ["CYCLE:",KRON_UPS_Cycle,_UCthis] call KRON_UPSgetArg; _currcycle=_cycle; //spawned for squads createds in runtime _spawned= if ("SPAWNED" in _UCthis) then {true} else {false}; if (_spawned) then { if (KRON_UPS_Debug>0) then {player sidechat format["%1: squad has been spawned, respawns %2",_grpidx,_respawnmax]}; switch (side _npc) do { case west: { KRON_AllWest=KRON_AllWest + units _npc; }; case east: { KRON_AllEast=KRON_AllEast + units _npc; }; case resistance: { KRON_AllRes=KRON_AllRes + units _npc; if (east in KRON_UPS_Res_enemy ) then { KRON_UPS_East_enemies = KRON_UPS_East_enemies+units _npc; } else { KRON_UPS_East_friends = KRON_UPS_East_friends+units _npc; }; if (west in KRON_UPS_Res_enemy ) then { KRON_UPS_West_enemies = KRON_UPS_West_enemies+units _npc; } else { KRON_UPS_West_friends = KRON_UPS_West_friends+units _npc; }; }; }; call (compile format ["KRON_UPS_%1_Total = KRON_UPS_%1_Total + count (units _npc)",side _npc]); }; // drop units at random positions _initpos = "ORIGINAL"; if ("RANDOM" in _UCthis) then {_initpos = "RANDOM"}; if ("RANDOMUP" in _UCthis) then {_initpos = "RANDOMUP"}; if ("RANDOMDN" in _UCthis) then {_initpos = "RANDOMDN"}; // don't position groups or vehicles on rooftops if ((_initpos!="ORIGINAL") && ((!_isman) || (count _members)>1)) then {_initpos="RANDOMDN"}; // set behaviour modes (or not) _orgMode = "SAFE"; if ("CARELESS" in _UCthis) then {_orgMode = "CARELESS"}; if ("AWARE" in _UCthis) then {_orgMode = "AWARE"}; if ("COMBAT" in _UCthis) then {_orgMode = "COMBAT"}; if ("STEALTH" in _UCthis) then {_orgMode = "STEALTH"}; _Behaviour = _orgMode; _npc setbehaviour _Behaviour; //Sets initial speed _noslow = if ("NOSLOW" in _UCthis) then {"NOSLOW"} else {"SLOW"}; if (_noslow!="NOSLOW") then { _orgSpeed = "limited"; } else { _orgSpeed = "FULL"; }; _speedmode = _orgSpeed; _npc setspeedmode _speedmode; // If enemy detected reinforcements will be sent _reinforcement= if ("REINFORCEMENT" in _UCthis) then {"REINFORCEMENT"} else {"NOREINFORCEMENT"}; _rfid = ["REINFORCEMENT:",0,_UCthis] call KRON_UPSgetArg; if (_rfid>0) then { _reinforcement="REINFORCEMENT"; //if (KRON_UPS_Debug>0) then {hintsilent format["%1: reinforcement group %2",_grpidx,_rfid,_rfidcalled,_reinforcement]}; }; //Is a template for spawn module? _template = ["TEMPLATE:",_template,_UCthis] call KRON_UPSgetArg; //Fills template array for spawn if (_template > 0 && !_spawned) then { KRON_UPS_TEMPLATES = KRON_UPS_TEMPLATES + ( [[_template]+[_side]+[_membertypes]+[_vehicletypes]] ); //if (KRON_UPS_Debug>0) then {diag_log format["%1 Adding TEMPLATE %2 _spawned %3",_grpidx,_template,_spawned]}; //if (KRON_UPS_Debug>0) then {player globalchat format["KRON_UPS_TEMPLATES %1",count KRON_UPS_TEMPLATES]}; }; // make start position random if (_initpos!="ORIGINAL") then { // find a random position (try a max of 20 positions) _try=0; _bld=0; _bldpos=0; while {_try<20} do { _currPos=[_centerX,_centerY,_rangeX,_rangeY,_cosdir,_sindir,_areadir] call KRON_randomPos; _posinfo=[_currPos] call KRON_PosInfo3; // _posinfo: [0,0]=no house near, [obj,-1]=house near, but no roof positions, [obj,pos]=house near, with roof pos _bld=_posinfo select 0; _bldpos=_posinfo select 1; if (_isplane || _isboat || !(surfaceiswater _currPos)) then { if (((_initpos=="RANDOM") || (_initpos=="RANDOMUP")) && (_bldpos>0)) then {_try=99}; if (((_initpos=="RANDOM") || (_initpos=="RANDOMDN")) && (_bldpos==0)) then {_try=99}; }; _try=_try+1; //sleep .05; }; if (_bldpos==0) then { if (_isman) then { {_x setpos _currPos} foreach units _npc; } else { _npc setpos _currPos; }; } else { // put the unit on top of a building _npc setPos (_bld buildingPos _bldpos); _currPos = getPos _npc; _nowp=true; // don't move if on roof }; sleep .05; }; // track unit _track = if (("TRACK" in _UCthis) || (KRON_UPS_Debug>0)) then {"TRACK"} else {"NOTRACK"}; _trackername = ""; _destname = ""; if (_track=="TRACK") then { _track = "TRACK"; _trackername=format["trk_%1",_grpidx]; _markerobj = createMarker[_trackername,[0,0]]; _markerobj setMarkerShape "ICON"; _markertype = if (isClass(configFile >> "cfgMarkers" >> "WTF_Dot")) then {"WTF_DOT"} else {"DOT"}; _trackername setMarkerType _markertype; _markercolor = switch (side _npc) do { case west: {"ColorGreen"}; case east: {"ColorRed"}; case resistance: {"ColorBlue"}; default {"ColorBlack"}; }; _trackername setMarkerColor _markercolor; _trackername setMarkerText format["%1",_grpidx]; _trackername setmarkerpos _currPos; _destname=format["dest_%1",_grpidx]; _markerobj = createMarker[_destname,[0,0]]; _markerobj setMarkerShape "ICON"; _markertype = if (isClass(configFile >> "cfgMarkers" >> "WTF_Flag")) then {"WTF_FLAG"} else {"FLAG"}; _destname setMarkerType _markertype; _destname setMarkerColor _markercolor; _destname setMarkerText format["%1",_grpidx]; _destname setMarkerSize [.5,.5]; }; // delete dead units _deletedead = ["DELETE:",0,_UCthis] call KRON_UPSgetArg; if (_deletedead>0) then { {_x addEventHandler['killed',format["[_this select 0,%1] spawn KRON_deleteDead",_deletedead]]; }forEach _members; }; // how many group clones? // TBD: add to global side arrays? _mincopies = ["MIN:",0,_UCthis] call KRON_UPSgetArg; _maxcopies = ["MAX:",0,_UCthis] call KRON_UPSgetArg; if (_mincopies>_maxcopies) then {_maxcopies=_mincopies}; if (_maxcopies>140) exitWith {hint "Cannot create more than 140 groups!"}; if (_maxcopies>0) then { _copies=_mincopies+random (_maxcopies-_mincopies); // create the clones for "_grpcnt" from 1 to _copies do { // copy groups if (isNil ("KRON_grpindex")) then {KRON_grpindex = 0}; KRON_grpindex = KRON_grpindex+1; // copy group leader _unittype = typeof _npc; // make the clones civilians // use random Civilian models for single unit groups if ((_unittype=="Civilian") && (count _members==1)) then {_rnd=1+round(random 20); if (_rnd>1) then {_unittype=format["Civilian%1",_rnd]}}; _grp=createGroup side _npc; _lead = _grp createUnit [_unittype, getpos _npc, [], 0, "form"]; _lead setVehicleVarName format["l%1",KRON_grpindex]; call compile format["l%1=_lead",KRON_grpindex]; _lead setBehaviour _orgMode; _lead setSpeedmode _orgSpeed; _lead setSkill skill _npc; _lead setVehicleInit _initstr; [_lead] join _grp; _grp selectLeader _lead; // copy team members (skip the leader) _c=0; { _c=_c+1; if (_c>1) then { _newunit = _grp createUnit [typeof _x, getpos _x, [],0,"form"]; _newunit setBehaviour _orgMode; _newunit setSpeedMode _orgSpeed; _newunit setSkill skill _x; _newunit setVehicleInit _initstr; [_newunit] join _grp; }; } foreach _members; _nul=[_lead,_areamarker,_pause,_noslow,_nomove,_nofollow,_initpos,_track,_showmarker,_shareinfo,"DELETE:",_deletedead] execVM "scripts\upsmon.sqf"; //sleep .05; }; processInitCommands; sleep .05; }; // units that can be left for area to be "cleared" _zoneempty = ["EMPTY:",0,_UCthis] call KRON_UPSgetArg; // create area trigger if (_areatrigger!="NOTRIGGER") then { _trgside = switch (side _npc) do { case west: {"WEST"}; case east: {"EAST"}; case resistance: {"GUER"}; case civilian: {"CIV"};}; //_trgside = switch (side _npc) do { case west: {"EAST"}; case east: {"WEST"}; case resistance: {"ANY"}; case civilian: {"ANY"};}; _trgname="KRON_Trig_"+_trgside+"_"+_areamarker; _flgname="KRON_Cleared_"+_areamarker; // has the trigger been created already? KRON_TRGFlag=-1; call compile format["%1=false",_flgname]; call compile format["KRON_TRGFlag=%1",_trgname]; if (isNil ("KRON_TRGFlag")) then { // trigger doesn't exist yet, so create one (make it a bit bigger than the marker, to catch path finding 'excursions' and flanking moves) call compile format["%1=createTrigger['EmptyDetector',_centerpos]",_trgname]; call compile format["%1 setTriggerArea[_rangeX*1.5,_rangeY*1.5,markerDir _areamarker,true]",_trgname]; call compile format["%1 setTriggerActivation[_trgside,'PRESENT',true]",_trgname]; call compile format["%1 setEffectCondition 'true'",_trgname]; call compile format["%1 setTriggerTimeout [5,7,10,true]",_trgname]; if (_areatrigger!="SILENTTRIGGER") then { call compile format["%1 setTriggerStatements['count thislist<=%6', 'titletext [''SECTOR <%2> LIMPIO'',''PLAIN''];''%2'' setmarkerpos [-%4,-%5];%3=true;', 'titletext [''SECTOR <%2> HA SIDO REOCUPADO'',''PLAIN''];''%2'' setmarkerpos [%4,%5];%3=false;']", _trgname,_areamarker,_flgname,_centerX,_centerY,_zoneempty]; } else { call compile format["%1 setTriggerStatements['count thislist<=%3', '%2=true;', '%2=false;']", _trgname,_flgname,_zoneempty]; }; //Si quieres que ejecute tu script descomenta estas lineas //message = format["_trgside=%1, _npc=%2",_trgside, _npc]; //call compile format["%1 setTriggerStatements['this', 'nul = [%1,%3,thisList] execvm ''mon\enemydetected.sqF'';', '%2=false;'];", _trgname,_flgname,_trgside]; //setTriggerStatements['this', 'nul = [thislist,_trgside] execvm "mon\enemydetectedd.sqF"';, 'ok = false'] }; sleep .05; }; //Si algún soldado tiene un edificio util cerca lo toma if ( _nomove=="NOMOVE" ) then { sleep 10; _unitsIn = [_grpid,_npc,150] call MON_GetIn_NearestStatic; if ( count _unitsIn > 0 ) then { sleep 10}; [_npc, _buildingdist,false,_wait,true] spawn MON_moveNearestBuildings; }; // init done _makenewtarget=true; _newpos=false; _targetPos = [0,0,0];//_currPos; _targettext ="_currPos"; _swimming = false; _waiting = if (_nomove=="NOMOVE") then {9999} else {0}; _sharedist = if (_nomove=="NOMOVE") then {KRON_UPS_sharedist} else {KRON_UPS_sharedist*1.5}; //Gets position of waypoint if no targetpos if (format ["%1", _targetPos] == "[0,0,0]") then { _index = (count waypoints _grp) - 1; _wp = [_grp,_index]; _targetPos = waypointPosition _wp; if (([_currpos,_targetPos] call KRON_distancePosSqr)<= 20) then {_targetPos = [0,0,0];}; }; // *********************************************************************************************************** // ************************************************ MAIN LOOP ************************************************ // *********************************************************************************************************** _loop=true; scopeName "main"; while {_loop} do { //if (KRON_UPS_Debug>0) then {player sidechat format["%1: _cycle=%2 _currcycle=%3 _react=%4 _waiting=%5",_grpidx,_cycle,_currcycle,_react,_waiting]}; _timeontarget=_timeontarget+_currcycle; _react=_react+_currcycle; _waiting = _waiting - _currcycle; _lastreact = _lastreact+_currcycle; _newpos = false; // did anybody in the group got hit? _newdamage=0; { if((damage _x)>0.2) then { _newdamage=_newdamage+(damage _x); // damage has increased since last round if (_newdamage>_lastdamage) then { _lastdamage=_newdamage; _gothit=true; }; }; if (!alive _x || !canmove _x) then { _members=_members-[_x]; }; } foreach _members; // nobody left alive, exit routine if (count _members==0) then { _exit=true; } else { // did the leader die? _npc = [_npc,_members] call MON_getleader; if (!alive _npc || !canmove _npc || isplayer _npc ) exitwith {exit=true;}; }; //exits from loop if (_exit) exitwith {}; //Checks if surrender is enabled if ( _surrender > 0 ) then { _surrended = call (compile format ["KRON_UPS_%1_SURRENDED",_side]); }; //If surrended exits from script if (_surrended) exitwith { { [_x] spawn MON_surrender; }foreach _members; if (KRON_UPS_Debug>0) then {_npc globalchat format["%1: %2 SURRENDED",_grpidx,_side]}; }; //Asignamos el lider actual del grupo en el array de lideres de grupos KRON_NPCs set [_grpid,_npc]; // current position _currPos = getpos _npc; _currX = _currPos select 0; _currY = _currPos select 1; if (_track=="TRACK" || KRON_UPS_Debug>0) then { _trackername setmarkerpos _currPos; }; // if the AI is a civilian we don't have to bother checking for enemy encounters if ((_issoldier) && !(_exit)) then { _pursue=false; //_Behaviour = Behaviour _npc; //Variables para saber si estamos en un vehiculo _incar = "LandVehicle" countType [vehicle (_npc)]>0; _inheli = "Air" countType [vehicle (_npc)]>0; _inboat = "Ship" countType [vehicle (_npc)]>0; //Si el grupo es un refuerzo y se han detectado los enemigos se envian al objetivo if (_rfid > 0 ) then { _rfidcalled = call (compile format ["KRON_UPS_reinforcement%1",_rfid]); if (isnil "_rfidcalled") then {_rfidcalled=false}; _fixedtargetPos = call (compile format ["KRON_UPS_reinforcement%1_pos",_rfid]); if (isnil "_fixedtargetPos") then { _fixedtargetPos=[0,0]; }else{ _fixedtargetPos = [abs(_fixedtargetPos select 0),abs(_fixedtargetPos select 1)]; _target = objnull; }; }; //Reinforcement control if (_reinforcement=="REINFORCEMENT") then { if ( (KRON_UPS_reinforcement || _rfidcalled) && (!_reinforcementsent)) then { _reinforcementsent=true; _fortify = false; _minreact = KRON_UPS_minreact; _buildingdist = 60; _react = _react + 100; _waiting = -1; if (KRON_UPS_Debug>0) then {player sidechat format["%1 called for reinforcement %2",_grpidx,_fixedtargetPos]}; }else{ if ( !(KRON_UPS_reinforcement || _rfidcalled) && (_reinforcementsent)) then { _fixedtargetPos = [0,0]; _attackPos = [0,0]; _fortify = _fortifyorig; _reinforcementsent=false; _nowp = _orignowp; if (_rfid > 0 ) then { call (compile format ["KRON_UPS_reinforcement%1_pos = [0,0]",_rfid]); call (compile format ["KRON_UPS_reinforcement%1 = false",_rfid]); }; if (KRON_UPS_Debug>0) then {player sidechat format["%1 reinforcement canceled",_grpidx]}; }; }; }; //Gets targets from radio _targets = call (compile format ["KRON_targets%1",_sharedenemy]); //Reveal targets found by members to leader { _NearestEnemy = assignedTarget _x; //_NearestEnemy = _x findnearestenemy _x; if (_x knowsabout _NearestEnemy > 0.5 && (_npc knowsabout _NearestEnemy <= 0.5 || count _targets <= 0 )) then { if (_npc knowsabout _NearestEnemy <= 0.5 ) then { _npc reveal _NearestEnemy; if (KRON_UPS_Debug>0) then {player globalchat format["%1: %2 reveals target %3 to leader",_grpidx,typeof _x, typeof _NearestEnemy]}; }; //If no targets adds this if (count _targets <= 0) then { //_target = _NearestEnemy; _targets = _targets + [_NearestEnemy]; _NearestEnemy setvariable ["UPSMON_lastknownpos", position _NearestEnemy, false]; //if (KRON_UPS_Debug>0) then {player globalchat format["%1: %3 added to targets",_grpidx,typeof _x, typeof _target]}; }; }; }foreach units _npc; //Resets distance to target _dist = 10000; //Gets current known position of target and distance if ( !isNull (_target) && alive _target ) then { _newattackPos = _target getvariable ("UPSMON_lastknownpos"); if ( !isnil "_newattackPos" ) then { _attackPos=_newattackPos; //Gets distance to target known pos _dist = ([_currpos,_attackPos] call KRON_distancePosSqr); }; }; //Initialization for geting new targets //Si el objetivo actual está muerto o no existe se limpia el conocimiento anterior if (isNull (_target) || !alive _target || !canmove _target ) then { _lastknown = 0; _opfknowval = 0; _target = objnull; }; //_maxknowledge=0; _newtarget = _target; if ((_shareinfo=="SHARE")) then { // if the leader comes across another unit that's either injured or dead, go into combat mode as well. // If the other person is still alive, share enemy information. //Solicita por radio la posición del enemigo, si está dentro del radio de acción actua if ((KRON_UPS_comradio == 2)) then { _targetsnear = false; //I we have a close target alive do not search another if (!alive _target || !canmove _target || _dist > _closeenough) then { { //if (KRON_UPS_Debug>0) then {player sidechat format["%1: targets=%2 tg=%3 newtg=%4 dist=%5 %6 %7 %8 %9",_grpidx,count _targets,typeof _x,_newtarget, _dist,_knows, _maxknowledge,_dist2,_attackPos]}; if ( !isnull _x && canmove _x && alive _x ) then { _newattackPos = _x getvariable ("UPSMON_lastknownpos"); if ( !isnil "_newattackPos" ) then { _dist3 = ([_currpos,_newattackPos] call KRON_distancePosSqr); //Sets if near targets to begin warning IF ( _dist3 <= (_closeenough + KRON_UPS_safedist)) then { _targetsnear = true }; //Sets new target if ( ( isnull (_newtarget) || captive _newtarget|| !alive _newtarget|| !canmove _newtarget || _dist3 < _dist ) && ( _dist3 <= _sharedist || _reinforcementsent ) && ( !(_x iskindof "Air") || (_x iskindof "Air" && _isplane )) && ( !(_x iskindof "Ship") || (_x iskindof "Ship" && _isboat )) && ( _x emptyPositions "Gunner" == 0 && _x emptyPositions "Driver" == 0 || (!isnull (gunner _x) && canmove (gunner _x)) || (!isnull (driver _x) && canmove (driver _x))) ) then { _newtarget = _x; _opfknowval = _npc knowsabout _x; _dist = _dist3; if (_dist < _closeenough) exitWith {}; }; }; }; } foreach _targets; sleep 0.5; }; }; //Si cambia el target cambiamos inicializamos la dirección de flanqueo if ( !isNull (_newtarget) && alive _newtarget && canmove _newtarget && (_newtarget != _target || isNull (_target)) ) then { _timeontarget = 0; _targetdead = false; _flankdir= if (random 100 <= 10) then {0} else {_flankdir}; _target = _newtarget; }; }; //Gets current known position of target and distance if ( !isNull (_target) && alive _target ) then { //Enemy detected if (_fightmode != "fight" ) then { _fightmode = "fight"; _react = KRON_UPS_react; if (KRON_UPS_Debug>0) then {player sidechat format["%1: Enemy detected %2",_grpidx, typeof _target]}; if (_nowpType == 1) then {_nowp = false}; }; _newattackPos = _target getvariable ("UPSMON_lastknownpos"); if ( !isnil "_newattackPos" ) then { _attackPos=_newattackPos; //Gets distance to target known pos _dist = ([_currpos,_attackPos] call KRON_distancePosSqr); //Looks at target known pos _members lookat _attackPos; }; }; //Si el enemigo se ha alejado de la covertura de rádio y no es un refuerzo enviado habremos perdido la pista if ( _fightmode != "walk" && !isnull(_target) && _dist < 15 && _npc knowsabout _target < 0.5 ) then { //If squad is near last position and no target clear position of target if (KRON_UPS_Debug>0) then {player sidechat format["%1: Target lost",_grpidx]}; _fightmode="walk"; _speedmode = _orgSpeed; _target = objnull; _Behaviour = _orgMode; _waiting = -1; _unitpos = "AUTO"; _pursue=false; _nowp = _orignowp; _targetdead = true; _makenewtarget = true; //Volvemos a la posición original }; //Si aumenta el conocimiento del target aceleramos la reacción if (_opfknowval>_lastknown ) then { _react = _react + 20; }; // if spotted an enemy or got shot, so start pursuit, if in combat and exceed time to react or movecompleted if (_fightmode != "walk" && ((_react >= KRON_UPS_react && _lastreact >=_minreact) || moveToCompleted _npc )) then { _pursue=true; }; //Ambush if (_ambush && !_ambushed) then { _ambushed = true; _nowp = true; _currcycle = 2; _grp setFormation "LINE"; _npc setBehaviour "STEALTH"; _npc setSpeedMode "FULL"; sleep 10; { [_x,"DOWN"] spawn MON_setUnitPos; _x stop true; }foreach units _npc; //Puts a mine if near road if ( KRON_UPS_useMines && _ambushType == 1 ) then { if (KRON_UPS_Debug>0) then {player sidechat format["%1: Puting mine for ambush",_grpidx]}; _npc setBehaviour "careless"; _dir1 = getDir _npc; _mineposition = [position _npc,_dir1, 25] call MON_GetPos2D; _roads = _mineposition nearroads KRON_UPS_ambushdist; if (count _roads > 0) then { _mineposition = position (_roads select 0); if (_Mines > 0 && [_npc,_mineposition] call MON_CreateMine) then {_Mines = _Mines -1;}; if (count _roads > 3) then { _mineposition = position (_roads select 3); if (_Mines > 0 && [_npc,_mineposition] call MON_CreateMine) then {_Mines = _Mines -1;}; }; } else { _mineposition = [position _npc,(_dir1-30)mod 360, KRON_UPS_ambushdist + random 15] call MON_GetPos2D; if (_Mines > 0 && [_npc,_mineposition] call MON_CreateMine) then {_Mines = _Mines -1;}; _mineposition = [position _npc,(_dir1+30)mod 360, KRON_UPS_ambushdist + random 15] call MON_GetPos2D; if (_Mines > 0 && [_npc,_mineposition] call MON_CreateMine) then {_Mines = _Mines -1;}; }; _mineposition = [position _npc,_dir1, KRON_UPS_ambushdist + random 20] call MON_GetPos2D; if ([_npc,_mineposition] call MON_CreateMine) then {_Mines = _Mines -1;}; _mineposition = [position _npc,_dir1-15, KRON_UPS_ambushdist + random 10] call MON_GetPos2D; if ([_npc,_mineposition] call MON_CreateMine) then {_Mines = _Mines -1;}; _npc setBehaviour "careless"; sleep 30; { if (!stopped _x) then { _x domove position _npc; waituntil {moveToCompleted _x || moveToFailed _x || !alive _x || !canmove _x || _x distance _npc <= 5}; }; }foreach units _npc; }; // did the leader die? _npc = [_npc,_members] call MON_getleader; if (!alive _npc || !canmove _npc || isplayer _npc ) exitwith {exit=true;}; _npc setBehaviour "STEALTH"; _grp setFormation "LINE"; sleep 10; { [_x,"DOWN"] spawn MON_setUnitPos; _x stop true; _x setUnitPos "DOWN"; }foreach units _npc; }; //Ambus enemy is nearly aproach //_ambushdist = 50; if (_ambush) then { _prov = ((_ambushdist*2 - (_npc distance _target))*3) - 40; //if (KRON_UPS_Debug>0) then {player sidechat format["%1:%6 _ambushdist=%5 last=%2 dist=%3 prov=%4",_grpidx,_lastdist,_npc distance _target,_prov,_ambushdist,typeof _target]}; if (_gothit || _reinforcementsent || time > _ambushwait || ( "Air" countType [_target]<=0 && ( _npc distance _target <= _ambushdist + random 10 || (!isNull (_target) && (( random 100 <= _prov && _npc distance _target > _lastdist) || _npc distance _target > _ambushdist*3 && _lastdist < _ambushdist*3 && _lastdist > 0)) )) ) then { if (KRON_UPS_Debug>0) then {player sidechat format["%1: FIREEEEEEEEE!!!",_grpidx]}; _nowp = _orignowp; _ambush = false; _ambushed = false; _currcycle = _cycle; { _x stop false; _x setUnitPos "Middle"; } foreach _members; //No engage yet _pursue = false; }; //Sets distance to target _lastdist = _npc distance _target; }; //if (KRON_UPS_Debug>0) then {player sidechat format["%1: _nowp=%2 in vehicle=%3 _inheli=%4 _npc=%5",_grpidx,_nowp,vehicle (_npc) ,_inheli,typeof _npc ]}; //If in vehicle take driver if not controlled by user if (alive _npc && !_nowp) then { if (!_isman || (vehicle (_npc) != _npc && !_inboat && !(vehicle (_npc) iskindof "StaticWeapon"))) then { //If new target is close enough leaves vehicle _unitsin = []; if (!_inheli) then { if (_fightmode == "walk") then { _GetOutDist = _area / 20; }else{ _GetOutDist = _closeenough * ((random .4) + 0.6); }; //If near target or stuck getout of vehicle and lock or gothit exits inmediately if (_gothit || _dist <= _closeenough * 1.5 || (_lastcurrpos select 0 == _currpos select 0 && _lastcurrpos select 1 == _currpos select 1 && moveToFailed (vehicle (_npc))) || moveTocompleted (vehicle (_npc))) then { _GetOutDist = 10000; }; //if (KRON_UPS_Debug>0) then {player sidechat format["%1: vehicle=%2 _npc=%3",_grpidx,vehicle (_npc) ,typeof _npc ]}; _unitsin = [_npc,_targetpos,_GetOutDist] call MON_GetOutDist; sleep 0.05; }else{ _GetOutDist = 0; }; if (count _unitsin > 0) then { if (KRON_UPS_Debug>0) then {player sidechat format["%1: Geting out of vehicle",_grpidx,([_currpos,_targetpos] call KRON_distancePosSqr),_GetOutDist,_area]}; _timeout = time + 15; { waituntil {vehicle _x == _x || !canmove _x || !alive _x || time > _timeout || movetofailed _x }; }foreach _unitsin; // did the leader die? _npc = [_npc,_members] call MON_getleader; if (!alive _npc || !canmove _npc || isplayer _npc ) exitwith {exit=true;}; if (_fightmode == "fight" || _gothit) then { _npc setBehaviour "AWARE"; _groupOne = group _npc; _groupOne setFormation "DIAMOND"; [_npc,50] call MON_move; }; if (_fightmode == "fight") then { _pursue = true; }else { _pursue = false; _makenewtarget=true; }; }; }; }; //Si bajo ataque o aumenta el conocimiento se acelera la respuesta y se retoma el control de la AI if (_gothit ) then { _react = if (!_supressed) then {_react + 30}; if (_fightmode != "walk") then { if (_nowpType == 2) then {_nowp = false}; }; }; //Si no hay objetivo se anula la orden de persecución if ((isNull (_target) || !alive _target )) then { _pursue=false; if (_gothit && !_fortify) then { if (_fightmode == "walk") then { //Podría tratarse de un sniper, mejor estar alerta y moverse por si acaso _Behaviour = "AWARE"; _speedmode = "FULL"; _unitpos = "AUTO"; _gothit = false; _makenewtarget = true; _waiting = -1; if (KRON_UPS_Debug>0) then {player sidechat format["%1: Have been damaged moving",_grpidx,_makenewtarget]}; } else { if (_react >= KRON_UPS_react && _lastreact >=_minreact && count _targets <= 0) then { //Nos disparan y no tenemos target, nos movemos de posición if (KRON_UPS_Debug>0) then {player sidechat format["%1: Under fire by unkown target, moving to newpos",_grpidx]}; //Cubre al grupo con una granada de humo if (!_supressed && (random 100)<80) then { [_npc,_target] spawn MON_throw_grenade; }; _gothit = false; _makenewtarget = true; _waiting = -1; _pause="NOWAIT"; _speedmode = "FULL"; _unitpos = "middle"; _Behaviour = "AWARE"; }else{ if (_lastreact >=_minreact && !_targetdead) then { _targetdead = true; _pursue = true; //Nos hemos qdado sin objetivos continuamos la búsqueda if (KRON_UPS_Debug>0) then {player sidechat format["%1: Target defeated, searching",_grpidx]}; }; }; }; }; }; //If no fixed target check if current target is available if (format ["%1",_fixedtargetPos] != "[0,0]") then { //If fixed target check if close enough or near enemy and gothit if (([_currpos,_fixedtargetpos] call KRON_distancePosSqr) <= _closeenough || (_dist <= _closeenough && _gothit)) then { _fixedtargetPos = [0,0]; }else{ _pursue = false; _attackPos=_fixedtargetPos; if (_react >= KRON_UPS_react && _lastreact >=_minreact) then { _makenewtarget = true; _unitpos = "AUTO"; _speed = "FULL"; }; }; }; //If captive or surrended do not pursue if ( isnil "_attackPos") then {_pursue = false;}; if ( captive _target || format ["%1", _attackPos] == "[0,0]") then {_pursue = false;}; //If no waypoint do not move if (_nowp) then { _makenewtarget = false; _pursue = false; }; if (_inheli) then { _landing = _heli getVariable "UPSMON_landing"; if (isnil ("_landing")) then {_landing=false;}; if (_landing) then { _pursue = false; }; }; sleep 0.5; //********************************************************************************************************************** // PURSUE: SE INICIA LA PERSECUCIÓN DEL OBJETIVO //********************************************************************************************************************** //if (KRON_UPS_Debug>0) then {diag_log format["%1:pursue=%3 _react=%9 timeon=%4 targets=%5 _target=%6 captive=%11 _attackPos=%7 nowp=%8 _inheli=%10 _fixedtargetPos=%12 _fightmode=%13",_grpidx,_dist,_pursue,_timeontarget,count _targets, _target,_attackPos,_nowp,_react,_inheli,captive _target,_fixedtargetPos,_fightmode]}; if (_pursue) then { _pursue = false; _newpos = true; _react = 0; _lastreact = 0; _timeontarget = 0; _makenewtarget = false; _fm = 1; //Cancel supress effect when reaction time _supressed = false; // did the leader die? _npc = [_npc,_members] call MON_getleader; if (!alive _npc || !canmove _npc || isplayer _npc ) exitwith {exit=true;}; // get position of spotted unit in player group, and watch that spot _targetPos = _attackPos; _targetX = _targetPos select 0; _targetY = _targetPos select 1; _currPos = getpos _npc; // also go into "combat mode" _pause="NOWAIT"; _waiting=0; // angle from unit to target _dir1 = [_currPos,_targetPos] call KRON_getDirPos; // angle from target to unit (reverse direction) _dir2 = (_dir1+180) mod 360; //Establecemos una distancia de flanqueo _flankdist = ((random 0.5)+0.7)*KRON_UPS_safedist; //La distancia de flanqueo no puede ser superior a la distancia del objetivo o nos pordría pillar por la espalda _flankdist = if ((_flankdist*1.40) >= _dist) then {_dist*.65} else {_flankdist}; if (_inheli) then {_flankdist = _flankdist / 2;}; // avoidance position (right or left of unit) _avoidPos = [_currPos,_dir2, KRON_UPS_safedist] call MON_GetPos2D; //Calculamos posición de avance frontal _frontPos = [_targetPos,_dir2, _flankdist] call MON_GetPos2D; //Adaptamos el ángulo de flanqueo a la distancia _newflankAngle = ((random(KRON_UPS_flankAngle)+1) * 2 * (_flankdist / KRON_UPS_safedist )) + (KRON_UPS_flankAngle/1.4) ; if (_newflankAngle > KRON_UPS_flankAngle) then {_newflankAngle = KRON_UPS_flankAngle}; //Calculamos posición de flanqueo 1 45º _dirf1 = (_dir2+_newflankAngle) mod 360; _flankPos = [_targetPos,_dirf1, _flankdist] call MON_GetPos2D; //Calculamos posición de flanqueo 2 -45º _dirf2 = (_dir2-_newflankAngle+360) mod 360; _flankPos2 = [_targetPos,_dirf2, _flankdist] call MON_GetPos2D; if (KRON_UPS_Debug>0) then { "flank1" setmarkerpos _flankPos; "flank2" setmarkerpos _flankPos2; "target" setmarkerpos _attackPos; }; //Decidir por el mejor punto de flanqueo //Contamos las posiciones de destino de otros grupos más alejadas _fldest = 0; _fldest2 = 0; _fldestfront = 0; _i = 0; { if (_i != _grpid && format ["%1", _x] != "[0,0]") then { _dist1 = [_x,_flankPos] call KRON_distancePosSqr; _dist2 = [_x,_flankPos2] call KRON_distancePosSqr; _dist3 = [_x,_frontPos] call KRON_distancePosSqr; if (_dist1 <= _flankdist/1.5 || _dist2 <= _flankdist/1.5 || _dist3 <= _flankdist/1.5) then { if (_dist1 < _dist2 && _dist1 < _dist3) then {_fldest = _fldest + 1;}; if (_dist2 < _dist1 && _dist2 < _dist3) then {_fldest2 = _fldest2 + 1;}; if (_dist3 < _dist1 && _dist3 < _dist2) then {_fldestfront = _fldestfront + 1;}; }; }; _i = _i + 1; }foreach KRON_targetsPos; //sleep 0.05; //Contamos las posiciones de otros grupos más alejadas _i = 0; { if (_i != _grpid && !isnull(_x)) then { _dist1 = [getpos(_x),_flankPos] call KRON_distancePosSqr; _dist2 = [getpos(_x),_flankPos2] call KRON_distancePosSqr; _dist3 = [getpos(_x),_frontPos] call KRON_distancePosSqr; if (_dist1 <= _flankdist/1.5 || _dist2 <= _flankdist/1.5 || _dist3 <= _flankdist/1.5) then { if (_dist1 < _dist2 && _dist1 < _dist3) then {_fldest = _fldest + 1;}; if (_dist2 < _dist1 && _dist2 < _dist3) then {_fldest2 = _fldest2 + 1;}; if (_dist3 < _dist1 && _dist3 < _dist2) then {_fldestfront = _fldestfront + 1;}; }; }; _i = _i + 1; }foreach KRON_NPCs; //sleep 0.05; //La preferencia es la elección inicial de dirección switch (_flankdir) do { case 1: {_prov = 125}; case 2: {_prov = -25}; default {_prov = 50}; }; //Si es positivo significa que hay más destinos existentes lejanos a la posicion de flanqueo1, tomamos primariamente este if (_fldest<_fldest2) then {_prov = _prov + 50;}; if (_fldest2<_fldest) then {_prov = _prov - 50;}; //Si la provablilidad es negativa indica que tomará el flank2 por lo tanto la provabilidad de coger 1 es 0 if (_prov<0) then {_prov = 0;}; //Evaluamos la dirección en base a la provablilidad calculada if ((random 100)<=_prov) then { _flankdir =1; _flankPos = _flankPos; _targettext = "_flankPos"; } else { _flankdir =2; _flankPos = _flankPos2; _targettext = "_flankPos2"; }; //Posición de ataque por defecto el flanco _targetPos = _flankPos; _targettext = "_flankPos"; if ((surfaceIsWater _flankPos && !(_isplane || _isboat)) ) then { _targetPos = _attackPos;_targettext ="_attackPos"; _flankdir =0; } else { if (_fldestfront < _fldest && _fldestfront < _fldest2) then { _targetPos = _frontPos;_targettext ="_frontPos"; }; }; //Establecemos tipo de waypoint //con DESTROY tiene peor comportamiento y a veces no se mueven _wptype = "MOVE"; //Establecer velocidad y modo de combate _rnd = random 100; if ( _dist <= _closeenough ) then { //Si estamos muy cerca damos prioridad a fuego a discrección if ( _dist <= _closeenough/2 ) then { //Modo combate cerrado _speedmode = "LIMITED"; _wpformation = "LINE"; _unitpos = "Middle"; _react = _react + KRON_UPS_react / 2; _minreact = KRON_UPS_minreact / 2; if ((_nomove == "NOMOVE" && _rnd < 25) && !_reinforcementsent) then { //Combate defensivo _Behaviour = "STEALTH"; _wptype = "HOLD"; } else { _Behaviour = "COMBAT"; _wptype = "MOVE"; } }else{ //Si la tropa tiene el rol de no moverse tenderá a mantener la posición _speedmode = "FULL"; _wpformation = "WEDGE"; _unitpos = "Middle"; _minreact = KRON_UPS_minreact / 1.5; if ((_nomove == "NOMOVE" && _rnd < 50) && !_reinforcementsent) then { //Combate defensivo _Behaviour = "COMBAT"; _wptype = "HOLD"; } else { _Behaviour = "AWARE"; _wptype = "MOVE"; }; }; } else { if (( _dist <= (_closeenough + KRON_UPS_safedist))) then { _speedmode = "FULL"; _wpformation = "WEDGE"; _unitpos = if (_rnd < 90) then {"Middle"}else{"AUTO"}; _minreact = KRON_UPS_minreact; if ((_nomove=="NOMOVE" && _rnd < 75) && !_reinforcementsent) then { //Combate defensivo _Behaviour = "AWARE"; _wptype = "HOLD"; }else{ //Movimiento con precaución (más rápido) _Behaviour = "AWARE"; _wptype = "MOVE"; }; } else { //In distance of radio patrol may act. if (( _dist < KRON_UPS_sharedist )) then { //Pelotón lejos del objetivo hay que desplazarse rápido y directo al punto _Behaviour = "AWARE"; _speedmode = "FULL"; _unitpos = if (_rnd < 60) then {"Middle"}else{"AUTO"}; _minreact = KRON_UPS_minreact * 2; if ((_nomove=="NOMOVE" && _rnd < 95) && !_reinforcementsent) then { _wptype = "HOLD"; _wpformation = "WEDGE"; }else{ _wptype = "MOVE"; _wpformation = "WEDGE"; }; } else { //Pelotón muy muy lejos del objetivo si es rol nomove no se moverán _Behaviour = "SAFE"; _speedmode = "FULL"; _unitpos = "AUTO"; _minreact = KRON_UPS_minreact * 3; if (((_nomove=="NOMOVE") || (_nomove=="MOVE" && _rnd < 70)) && !_reinforcementsent) then { _wptype = "HOLD"; _wpformation = "WEDGE"; }else{ _wptype = "MOVE"; _wpformation = "COLUMN"; }; }; }; }; //Las escuadras fortificadas mantienen siempre la posición if ( _fortify && (random 100)<99) then {_wptype = "HOLD"}; // did the leader die? _npc = [_npc,_members] call MON_getleader; if (!alive _npc || !canmove _npc || isplayer _npc ) exitwith {exit=true;}; //If leader is in vehicle will move in anyway if (vehicle (_npc) != _npc || !_isman) then { _wptype = "MOVE"; _Behaviour = "AWARE"; if ( _inheli ) then { _speedmode = "FULL"; _unitpos = "AUTO"; if ( (random 100)<60 ) then { _targetPos = _AttackPos; }; }; }; //Establecemos el target KRON_targetsPos set [_grpid,_targetPos]; sleep .05; //If use statics are enabled leader searches for static weapons near. // Tanks enemies are contabiliced if ( KRON_UPS_useMines && _Mines > 0 ) then { _enemytanksnear = false; { if ( ("Tank" countType [_x] > 0 || "Wheeled_APC" countType [_x] >0 || "Tank" countType [vehicle _x] > 0 || "Wheeled_APC" countType [vehicle _x] >0 ) && alive _x && canMove _x && _npc distance _x <= _closeenough + KRON_UPS_safedist ) exitwith { _enemytanksnear = true; _enemytanknear = _x;}; }foreach _targets; //If use mines are enabled and enemy armors near and no friendly armor put mine. if ( _enemytanksnear && !isnull _enemytanknear && alive _enemytanknear ) then { _friendlytanksnear = false; { if (!( alive _x && canMove _x)) then {_friendlytanks = _friendlytanks - [_x]}; if (alive _x && canMove _x && _npc distance _x <= _closeenough + KRON_UPS_safedist ) exitwith { _friendlytanksnear = true;}; }foreach _friendlytanks; if (!_friendlytanksnear && random(100)<30 ) then { _dir1 = [_currPos,position _enemytanknear] call KRON_getDirPos; _mineposition = [position _npc,_dir1, 25] call MON_GetPos2D; _roads = _mineposition nearroads 50; if (count _roads > 0) then {_mineposition = position (_roads select 0);}; if ([_npc,_mineposition] call MON_CreateMine) then { _Mines = _Mines -1; if (KRON_UPS_Debug>0) then {player sidechat format["%1: %3 puting mine for %2",_grpidx,typeof _enemytanknear, side _npc]}; }; }; }; }; //Si es unidad de refuerzo siempre acosará al enemigo if (_reinforcementsent) then { _wptype="MOVE"; _newpos=true; _makenewtarget = false; }; if (_nofollow=="NOFOLLOW" && _wptype != "HOLD") then { _targetPos = [_targetPos,_centerpos,_rangeX,_rangeY,_areadir] call KRON_stayInside; _targetdist = [_currPos,_targetPos] call KRON_distancePosSqr; if ( _targetdist <= 1 ) then { _wptype="HOLD"; }; }; if (_wptype == "HOLD") then { _targetPos = _currPos; _targettext ="_currPos"; }; _lastknown = _opfknowval; //Se actualiza con el último valor, por si cambia el target //Si por el motivo que sea se cancela la nueva posición se deben limpiar los parámetros que hacen entrar en pursuit if (!_newpos) then { //Si la unidad ha decidio mantener posición pero está siendo atacada está siendo suprimida, debe tener la oportunidad de reaccionar _newpos = _gothit; if (!_newpos) then { _targetPos=_lastpos; if (KRON_UPS_Debug>0) then {player sidechat format["%1 Mantaining orders %2",_grpidx,_nomove]}; }; }; if (KRON_UPS_Debug>=1) then { "avoid" setmarkerpos _avoidPos; "flank" setmarkerpos _flankPos; _destname setMarkerPos _targetPos; }; }; //END PURSUE }; //((_issoldier) && ((count _enemies)>0) sleep 0.5; //********************************************************************************************************************** // SIN NOVEDADES //********************************************************************************************************************** if !(_newpos) then { // did the leader die? _npc = [_npc,_members] call MON_getleader; if (!alive _npc || !canmove _npc || isplayer _npc ) exitwith {exit=true;}; // calculate new distance // if we're waiting at a waypoint, no calculating necessary _currpos = getpos _npc; //Sets behaviour of squad if nearly changes of target if (_targetsnear) then{ if( toUpper(_Behaviour) IN _safemode) then { _Behaviour = "AWARE"; _npc setBehaviour _Behaviour; }; }; //If in safe mode if find dead bodies change behaviour if( toUpper(_Behaviour) IN _safemode) then { _unitsin = [_npc,_buildingdist] call MON_deadbodies; if (count _unitsin > 0) then { _Behaviour = "AWARE"; _react = _react + 30; _npc setBehaviour _Behaviour; if (KRON_UPS_Debug>0) then {player sidechat format["%1 dead bodies found! set %2",_grpidx,_Behaviour, count _targets]}; }; }; //Stuck control if (!_nowp && alive _npc && canmove _npc && _wptype == "MOVE" && _timeontarget >= 60 && _lastcurrpos select 0 == _currpos select 0 && _lastcurrpos select 1 == _currpos select 1) then { [_npc] call MON_cancelstop; _makenewtarget = true; if (KRON_UPS_Debug>0) then {player sidechat format["%1 stucked, moving",_grpidx]}; }; _lastpos = _targetPos; _lastcurrpos = _currpos; //sets last currpos for avoiding stuk if (_waiting<0) then { //Gets distance to targetpos _targetdist = [_currPos,_targetPos] call KRON_distancePosSqr; //Se evalua si se ha excedido el tiempo máximo de espera y el objetivo ya está abatido para retornar a la posición inicial. if (_fightmode!="walk") then { if (_timeontarget > KRON_UPS_alerttime && count _targets <= 0 && ( isNull (_target) || !alive (_target) || captive _target)) then { _pursue = false; _gothit = false; _targetdead = true; _fightmode = "walk"; _speedmode = _orgSpeed; _targetPos = _currPos; _reinforcementsent = false; _nowp = _orignowp; _target = objnull; _fixedtargetPos = [0,0]; _Behaviour = _orgMode; _waiting = -1; _unitpos = "AUTO"; _wpformation = "WEDGE"; KRON_UPS_reinforcement = false; //ya no hay amenaza if (_rfid > 0 ) then { call (compile format ["KRON_UPS_reinforcement%1 = false;",_rfid]); }; {[_x,"AUTO"] spawn MON_setUnitPos;} foreach units _npc; _npc setBehaviour _orgMode; if (KRON_UPS_Debug>0) then {player sidechat format["%1 Without objectives, leaving combat mode",_grpidx]}; }; }; //if (KRON_UPS_Debug>0) then {player globalchat format["%1 _targetdist %2 atdist=%3 dist=%4",_grpidx, _targetdist, _area/8,_dist]}; // if not in combat and we're either close enough, seem to be stuck, or are getting damaged, so find a new target if (!_nowp && (!_gothit) && (!_swimming) && (_fightmode == "walk") && (( _targetdist <= (_area/4) || moveToFailed _npc) && (_timeontarget > KRON_UPS_maxwaiting))) then { _makenewtarget=true; _unitpos = "AUTO"; _Behaviour = _orgMode; }; // make new target if (_makenewtarget) then { _gothit=false; _react = 0; _lastreact = 0; _makenewtarget = false; _gothit=false; _timeontarget = 0; _wptype = "MOVE"; //if (KRON_UPS_Debug>0) then {player globalchat format["%1 _fixedtargetPos %2 dist %3 ",_grpidx,_fixedtargetPos,_dist]}; if (format ["%1",_fixedtargetPos] !="[0,0]") then { _targetPos = _fixedtargetPos; _targettext ="Reinforcement"; }else{ if (KRON_UPS_Debug>0) then {player sidechat format["%1 Patrol to new position",_grpidx]}; if ((_nomove=="NOMOVE") && (_timeontarget>KRON_UPS_alerttime)) then { if (([_currPos,_orgPos] call KRON_distancePosSqr)<_closeenough) then { _newpos = false; _wptype = "HOLD"; _waiting = 9999; if (_fortify) then { _minreact = KRON_UPS_minreact * 3; _buildingdist = _buildingdist * 2; _wait = 3000; }; } else { _targetPos=_orgPos; _targettext ="_orgPos"; }; } else { // re-read marker position/size _centerpos = getMarkerPos _areamarker; _centerX = abs(_centerpos select 0); _centerY = abs(_centerpos select 1); _centerpos = [_centerX,_centerY]; _areasize = getMarkerSize _areamarker; _rangeX = _areasize select 0; _rangeY = _areasize select 1; _areadir = (markerDir _areamarker) * -1; // find a new target that's not too close to the current position _targetPos=_currPos; _targettext ="newTarget"; _tries=0; while {((([_currPos,_targetPos] call KRON_distancePosSqr) < _mindist)) && (_tries<20)} do { _tries=_tries+1; // generate new target position (on the road) _road=0; while {_road<20} do { _targetPos=[_centerX,_centerY,_rangeX,_rangeY,_cosdir,_sindir,_areadir] call KRON_randomPos; _road=[_targetPos,(_isplane||_isboat),_road] call KRON_OnRoad; }; }; }; }; sleep 0.05; // distance to target position _avoidPos = [0,0]; _flankPos = [0,0]; _attackPos = [0,0]; _frontPos = [0,0]; _fm=0; _newpos=true; }; }; }; // if in water, get right back out of it again if (surfaceIsWater _currPos) then { if (_isman && !_swimming) then { _drydist=999; // look around, to find a dry spot for [{_a=0}, {_a<=270}, {_a=_a+90}] do { _dp=[_currPos,30,_a] call KRON_relPos; if !(surfaceIsWater _dp) then {_targetPos=_dp}; }; _newpos=true; _swimming=true; }; } else { _swimming=false; }; sleep 0.5; //********************************************************************************************************************** // NEWPOS: SE EJECUTA LA ORDEN DE MOVIMIENTO //********************************************************************************************************************** // if (KRON_UPS_Debug>0) then {player sidechat format["%1 rea=%2 wai=%3 tim=%4 tg=%5 %6",_grpidx,_react,_waiting,_timeontarget,typeof _target,alive _target]}; if ((_waiting<=0) && _newpos) then { // did the leader die? _npc = [_npc,_members] call MON_getleader; if (!alive _npc || !canmove _npc || isplayer _npc ) exitwith {exit=true;}; _currPos = getpos _npc; _newpos = false; _waiting = -1; _swimming=false; _GetIn_NearestVehicles = false; //Gets distance to targetpos _targetdist = [_currPos,_targetPos] call KRON_distancePosSqr; //If gothit and not in vehicle if (_gothit && _npc == vehicle (_npc) && alive _npc ) then { //Unidad suprimida if ((random 100)<50) then { //if (KRON_UPS_Debug>0) then {player sidechat format["%1 supressed by fire",_grpidx]}; //La unidad está suprimida, borramos el waypoint actual _supressed = true; _targetPos = _currPos; _targettext ="SUPRESSED"; _wptype = "HOLD"; //Cuerpo a tierra { //Se anula el movimiento if ( _x iskindof "Man" && canmove _x && alive _x) then { if ((random 100)<40 || (primaryWeapon _x ) in KRON_UPS_MG_WEAPONS) then {[_x,"DOWN",20] spawn MON_setUnitPosTime; }else{ [_x,"Middle"] spawn MON_setUnitPos;}; }; } foreach units _npc; sleep 0.05; //Retirada!! if ((random 100)<=60 && morale _npc < 0) then { _targetPos = _avoidPos;_targettext = "_avoidPos"; _wptype = "MOVE"; _flankdir = 0; if (!_newpos && KRON_UPS_Debug>0) then {player sidechat format["%1 All Retreat!!!",_grpidx]}; }; }; //Animación croqueta { if ( (random 100)<20) then { _x spawn MON_animCroqueta; }; } foreach units _npc; //Cubre al grupo con una granada de humo if ((random 100)<30 || _targettext == "_avoidPos") then { //[_npc,_target] call MON_throw_grenade; }; sleep 0.5; }; // did the leader die? _npc = [_npc,_members] call MON_getleader; if (!alive _npc || !canmove _npc || isplayer _npc ) exitwith {exit=true;}; //Si no ha sido suprimida continuamos el avance if (alive _npc) then { _currPos = getpos _npc; if ( _wptype == "MOVE") then { //Try to avoid stucked soldiers out of vehicles if ( _npc == vehicle _npc) then { { if (alive _x && canmove _x) then { //[_x] spawn MON_cancelstop; [_x] dofollow _npc; }; }foreach _members; }; sleep 0.05; //Search for vehicle if (!_gothit && _targetdist >= ( KRON_UPS_searchVehicledist )) then { if ( vehicle _npc == _npc && _dist > _closeenough ) then { _unitsIn = [_grpid,_npc] call MON_GetIn_NearestVehicles; if ( count _unitsIn > 0) then { _GetIn_NearestVehicles = true; _speedmode = "FULL"; _unitpos = "AUTO"; _npc setbehaviour "CARELESS"; _npc setspeedmode "FULL"; _timeout = time + 60; _vehicle = objnull; _vehicles = []; { waituntil {vehicle _x != _x || !canmove _x || !canstand _x || !alive _x || time > _timeout || movetofailed _x}; if ( vehicle _x != _x && (isnull _vehicle || _vehicle != vehicle _x)) then { _vehicle = vehicle _x ; _vehicles = _vehicles + [_vehicle] }; }foreach _unitsIn; sleep 1; { _vehicle = _x; _cargo = _vehicle getvariable ("UPSMON_cargo"); if ( isNil("_cargo")) then {_cargo = [];}; _cargo ordergetin true; //Wait for other groups to getin { waituntil {vehicle _x != _x || !canmove _x || !canstand _x || !alive _x || time > _timeout || movetofailed _x}; }foreach _cargo; //Starts gunner control [_vehicle] spawn MON_Gunnercontrol; //Resets vehicle id and cargo _vehicle setVariable ["UPSMON_grpid", 0, false]; _vehicle setVariable ["UPSMON_cargo", [], false]; } foreach _vehicles; //Cheks if leader has dead until wait _npc = [_npc,_members] call MON_getleader; if (!alive _npc || !canmove _npc) exitwith {exit=true;}; if ( "Air" countType [vehicle (_npc)]>0) then { _rnd = (random 2) * 0.1; _flyInHeight = round(KRON_UPS_flyInHeight * (0.9 + _rnd)); vehicle _npc flyInHeight _flyInHeight; //Si acaba de entrar en el heli se define punto de aterrizaje if (_GetIn_NearestVehicles) then { _GetOutDist = round(((KRON_UPS_paradropdist ) * (random 100) / 100 ) + 150); [vehicle _npc, _TargetPos, _GetOutDist,_flyInHeight] spawn MON_doParadrop; //Execute control stuck for helys [vehicle _npc] spawn MON_HeliStuckcontrol; //if (KRON_UPS_Debug>0 ) then {player sidechat format["%1: flyingheiht=%2 paradrop at dist=%3",_grpidx, _flyInHeight, _GetOutDist,_rnd]}; }; }; }; }; }; }; sleep 0.05; //Get in combat vehicles if (!_gothit && !_GetIn_NearestVehicles && _fightmode != "walk" ) then { _dist2 = _dist / 4; if ( _dist2 <= 100 ) then { _unitsIn = []; _unitsIn = [_grpid,_npc,_dist2,false] call MON_GetIn_NearestCombat; _timeout = time + (_dist2/2); if ( count _unitsIn > 0) then { if (KRON_UPS_Debug>0 ) then {player sidechat format["%1: Geting in combat vehicle targetdist=%2",_grpidx,_npc distance _target]}; _npc setbehaviour "CARELESS"; _npc setspeedmode "FULL"; { waituntil {vehicle _x != _x || !canmove _x || !canstand _x || !alive _x || time > _timeout || movetofailed _x}; }foreach _unitsIn; // did the leader die? _npc = [_npc,_members] call MON_getleader; if (!alive _npc || !canmove _npc || isplayer _npc ) exitwith {exit=true;}; //Return to combat mode _npc setbehaviour _Behaviour; _timeout = time + 180; { waituntil {vehicle _x != _x || !canmove _x || !alive _x || time > _timeout || movetofailed _x}; }foreach _unitsIn; { if ( vehicle _x iskindof "Air") then { //moving hely for avoiding stuck if (driver vehicle _x == _x) then { _vehicle = vehicle (_x); [_vehicle,1000] spawn MON_domove; //Execute control stuck for helys [_vehicle] spawn MON_HeliStuckcontrol; if (KRON_UPS_Debug>0 ) then {player sidechat format["%1: Geting in combat vehicle after",_grpidx,_npc distance _target]}; }; }; if (driver vehicle _x == _x) then { //Starts gunner control [vehicle _x] spawn MON_Gunnercontrol; }; }foreach _unitsIn; }; sleep 0.05; }; }; // did the leader die? _npc = [_npc,_members] call MON_getleader; if (!alive _npc || !canmove _npc || isplayer _npc ) exitwith {exit=true;}; //If use statics are enabled leader searches for static weapons near. if (KRON_UPS_useStatics && (vehicle _npc == _npc) && !_GetIn_NearestVehicles && ((_wptype == "HOLD" && (random 100) < 80) || (_wptype != "HOLD" && (random 100) < 60))) then { _unitsIn = [_grpid,_npc,_buildingdist] call MON_GetIn_NearestStatic; if ( count _unitsIn > 0) then { _npc setbehaviour "CARELESS"; _npc setspeedmode "FULL"; _timeout = time + 60; { waituntil {vehicle _x != _x || !canmove _x || !alive _x || time > _timeout || movetofailed _x}; }foreach _unitsIn; }; sleep 0.05; }; // did the leader die? _npc = [_npc,_members] call MON_getleader; if (!alive _npc || !canmove _npc || isplayer _npc ) exitwith {exit=true;}; //Buildings usage. if (!_GetIn_NearestVehicles) then { if ( _wptype == "HOLD" && vehicle _npc == _npc && ( _fortify ||(random 100) < 60) ) then { //if (KRON_UPS_Debug>0) then {player sidechat format["%1: Moving to nearest buildings",_grpidx]}; [_npc,_buildingdist,false,_wait] spawn MON_moveNearestBuildings; } else { //If we are close enough patrol in buildings for searching enemies if ((( _wptype != "HOLD" && vehicle _npc == _npc && (random 100) < 90 ) && _npc == vehicle _npc && _dist <= ( _closeenough ))) then { [_npc,_buildingdist,true] spawn MON_moveNearestBuildings; }; }; sleep 0.05; }; // did the leader die? _npc = [_npc,_members] call MON_getleader; if (!alive _npc || !canmove _npc) exitwith {exit=true;}; if (isnull _grp || _grp != group _npc) then { _grp = group _npc; }; _index = currentWaypoint _grp; //Si el waypoing es distinto del que tiene o es diferente de hold lo establecemos IF (_wptype != "HOLD" || _lastwptype != _wptype) then { //No haq waypoints o están completados //_index = 1 Waypoint por defecto, no usar. if ( _index == 1 || _index > count waypoints _grp && !isnull _grp) then { _wp = _grp addWaypoint [_targetPos, 0]; _index = _wp select 1; //if (KRON_UPS_Debug>0) then {player sidechat format["%1: created wp %2 index %3",_grpidx,_wp, _index]}; } else { _wp = [_grp,_index]; //if (KRON_UPS_Debug>0) then {player globalchat format["%1: not created wp %2 index %3 %4",_grpidx,_wp, _index,_targetPos]}; }; }; _wp = [_grp,_index]; //Definimos los parámetros del nuevo waypoint _wp setWaypointType _wptype; _wp setWaypointPosition [_targetPos, 0]; _wp setWaypointFormation _wpformation; _wp setWaypointSpeed _speedmode; _lastwptype = _wptype; //Si tiene más de 2 waypoints borramos los obsoletos { if ( _x select 1 < _index ) then { deleteWaypoint _x; }; }foreach waypoints _grp; sleep 0.05; //if (KRON_UPS_Debug>0) then {diag_log format["%1: waypoints %2 %3 %4 %5",_grpidx,count waypoints _grp, _grp, group _npc, group (leader _npc)]}; //Sets behaviour if (toupper(behaviour _npc) != toupper (_Behaviour)) then { _npc setBehaviour _Behaviour; }; //Refresh position vector KRON_targetsPos set [_grpid,_targetPos]; //Aunque haya predefinido un tipo de movimiento se dejará un pequeño porcentaje para variar a nivel individual { if ((random 100)<95 && _x == vehicle _x && _x iskindof "Man" && !((primaryWeapon _x ) in KRON_UPS_MG_WEAPONS)) then { [_x,_unitpos] spawn MON_setUnitPos; }else{ [_x,"AUTO"] spawn MON_setUnitPos; }; } foreach units _npc; //If closeenough will leave some soldiers doing supress fire if (_gothit || _dist <= _closeenough) then { { if (!canStand _x || ((primaryWeapon _x ) in KRON_UPS_MG_WEAPONS) || (vehicle _x == _x && _x iskindof "Man" && (random 100) < 50) ) then { _x suppressFor 20; }; } foreach units _npc; }; }; _gothit=false; //moving //if (KRON_UPS_Debug>0) then {player sidechat format["%1: %2 %3 %4 %5 %6 %7 %8 %9 %10",_grpidx, _wptype, _targettext,_dist, _speedmode, _unitpos, _Behaviour, _wpformation,_fightmode,count waypoints _grp];}; };//if ((_waiting<=0) && _newpos) then { if (_track=="TRACK") then { switch (_fm) do { case 1: {_destname setmarkerSize [.4,.4]}; case 2: {_destname setmarkerSize [.6,.6]}; default {_destname setmarkerSize [.5,.5]}; }; _destname setMarkerPos _targetPos; }; //If in hely calculations must done faster if (_isplane || _inheli) then {_currcycle = _cycle/2}; if ((_exit) || (isNil("_npc"))) then { _loop=false; } else { // slowly increase the cycle duration after an incident sleep _currcycle; }; };//while {_loop} if (KRON_UPS_Debug>0) then {hint format["%1 exiting mainloop",_grpidx]}; //Limpiamos variables globales de este grupo KRON_targetsPos set [_grpid,[0,0]]; KRON_NPCs set [_grpid,objnull]; KRON_UPS_Exited=KRON_UPS_Exited+1; if (_track=="TRACK") then { //_trackername setMarkerType "Dot"; _trackername setMarkerType "Empty"; _destname setMarkerType "Empty"; }; //Gets dist from orinal pos if (!isnull _target) then { _dist = ([_orgpos,position _target] call KRON_distancePosSqr); }; if (KRON_UPS_Debug>0) then {player sidechat format["%1 _dist=%2 _closeenough=%3",_grpidx,_dist,_closeenough]}; //does respawn of group if (_respawn && _respawnmax > 0 && !_surrended && _dist > _closeenough) then { if (KRON_UPS_Debug>0) then {player sidechat format["%1 doing respawn",_grpidx]}; // copy group leader _unittype = _membertypes select 0; // make the clones civilians // use random Civilian models for single unit groups if ((_unittype=="Civilian") && (count _members==1)) then {_rnd=1+round(random 20); if (_rnd>1) then {_unittype=format["Civilian%1",_rnd]}}; _grp=createGroup _side; _lead = _grp createUnit [_unittype, _orgpos, [], 0, "form"]; _lead setVehicleInit _initstr; [_lead] join _grp; _grp selectLeader _lead; //sleep 1; // copy team members (skip the leader) _c=0; { _c=_c+1; if (_c>1) then { _newunit = _grp createUnit [_x, _orgpos, [],0,"form"]; _newunit setVehicleInit _initstr; [_newunit] join _grp; }; } foreach _membertypes; { _targetpos = _orgpos findEmptyPosition [10, 200]; sleep .4; if (count _newpos <= 0) then {_targetpos = _orgpos}; //if (KRON_UPS_Debug>0) then {player globalchat format["%1 create vehicle _newpos %2 ",_x,_targetpos]}; _newunit = _x createvehicle (_targetpos); } foreach _vehicletypes; //Set new parameters if (!_spawned) then {_UCthis = _UCthis + ["SPAWNED"]}; _UCthis set [0,_lead]; _respawnmax = _respawnmax - 1; _UCthis = ["RESPAWN:",_respawnmax,_UCthis] call KRON_UPSsetArg; //Exec UPSMON script _UCthis SPAWN UPSMON; processInitCommands; }; _friends=nil; _enemies=nil; _enemytanks = nil; _friendlytanks = nil; _roads = nil; _targets = nil; _members = nil; _membertypes = nil; _UCthis = nil; if (!alive _npc) then { deleteGroup _grp; }; if(true) exitWith {}; // ========================================================================================================= // Script for action follow me when surrended, adds the soldier to player squad in a random choice. // Version: 1.0 // Author: Monsada (smirall@hotmail.com) // --------------------------------------------------------------------------------------------------------- private ["_obj","_caller","_id","_objtype","_rnd","_join","_direction"]; _npc = _this select 0; _caller = _this select 1; _id = _this select 2; _rnd = 0; _join=true; _npc switchmove ""; _direction = ((getpos _caller select 0) - (getpos _npc select 0)) atan2 ((getpos _caller select 1) - (getpos _npc select 1)); //If positive values are needed then use: if(_direction < 0) then {_direction = _direction + 360}; _npc setdir _direction; _npc dowatch _caller; _npc setSpeedMode "LIMITED"; _npc domove position _caller; sleep 0.5; _rnd = random 100; _npc setmimic "Sad"; if (_rnd <= 30 ) then { _npc globalchat "Ok"; }; if (_rnd > 30 && _rnd <= 50) then { _npc globalchat "Yes"; }; if (_rnd > 50 && _rnd <= 100) then { _join=false; _rnd = random 100; if (_rnd < 20) then { _npc setmimic "angry"; _npc switchmove "CtsPercMstpSnonWnonDnon_idle31rejpaniVnose"; _npc globalchat "Kiss my ass"; }; if (_rnd > 20 && _rnd <= 40) then { _npc setmimic "Agresive"; _npc switchmove "CtsPercMstpSnonWnonDnon_idle33rejpaniVzadku"; sleep 3; _npc globalchat "Que te den"; }; if (_rnd > 40 && _rnd <= 60) then { _npc setmimic "Agresive"; _npc switchmove "CtsPercMstpSnonWnonDnon_idle33rejpaniVzadku"; sleep 1; _npc globalchat "Fuck you"; }; if (_rnd > 60 && _rnd <= 80) then { _npc setmimic "Agresive"; _npc switchmove "CtsPercMstpSnonWnonDnon_idle32podrbaniNanose"; sleep 0.5; _npc globalchat "Follow your mother"; }; if (_rnd > 80 && _rnd <= 100) then { _npc setmimic "angry"; sleep 0.1; _npc switchmove "CtsPercMstpSnonWnonDnon_idle32podrbaniNanose"; _npc globalchat "Fuck you"; }; }; if (_join) then { // remove the action once it is activated _npc stop false; if (_npc == leader _npc) then { _npc globalchat "All follow that man"; { _x switchmove ""; [_x] joinSilent _caller; }foreach units _npc; } else { _npc removeAction _id; [_npc] joinSilent _caller; }; }; if (true) exitWith {}; // ========================================================================================================= // Biblioteca de funciones comunes // Version: 5.0.7 // Author: Monsada (smirall@hotmail.com) // http://www.simulacion-esp.com/ // Comunidad Hispana de Simulación // ========================================================================================================= MON_bugged_vehicles = ["BIS_alice_emptydoor","ACE_Grenade_Geometry"]; // --------------------------------------------------------------------------------------------------------- //Función que permite posicionar objetos a la altura definida //param1: objeto //param2: altura MON_subir = { if (!isserver) exitwith{}; private ["_object","_altura","_pos","_x","_y","_z","_bld","_bldpos"]; _object = _this select 0; _altura = _this select 1; _x = 0; _y = 0; _z = 0; _pos =0; _bld = objnull; _bldpos =0; _pos = getposasl _object; _x = _pos select 0; _y = ( _pos select 1 ); _z = ( _pos select 2 ) + _altura; _object setposasl [_x,_y ,_z]; }; //Retorna la dirección entre dos posiciones MON_getDirPos = {private["_a","_b","_from","_to","_return"]; _from = _this select 0; _to = _this select 1; _return = 0; _a = ((_to select 0) - (_from select 0)); _b = ((_to select 1) - (_from select 1)); if (_a != 0 || _b != 0) then {_return = _a atan2 _b}; if ( _return < 0 ) then { _return = _return + 360 }; _return}; // --------------------------------------------------------------------------------------------------------- //Función de borra unidades que han sido matadas //param1: objeto a borrar cuando muera //param2: tiempo a esperar antes de borrar el objeto MON_deleteDead = {private["_u","_s"];_u=_this select 0; _s= _this select 1; _u removeAllEventHandlers "killed"; sleep _s; deletevehicle _u}; MON_deleteDeadDist = {private["_u","_s","_dist","_OCercanos","_cicle","_deleted","_isplayer"]; _i = 0; _cicle = 10; _deleted = false; _isplayer = false; _u = _this select 0; _s = _this select 1; _dist = _this select 2; _u removeAllEventHandlers "killed"; sleep _s; while {!_deleted} do { _isplayer = false; //Buscamos objetos cercanos _OCercanos = nearestObjects [_u, ["Man"] , _dist]; //Validamos si alguno de los soldados cerca es un jugador y está vivo {if (isplayer _x && alive _x) exitwith {_isplayer = true;}}foreach _OCercanos; if (!_isplayer) then { deletevehicle _u; _deleted = true; }; sleep _cicle; }; }; // --------------------------------------------------------------------------------------------------------- //Función tomada de UPS, busca el comando en la lista y devuelve el siguiente elemento //param1: comando a buscar //param2: valor por defecto del comando //param3: array con los comandos //Retorna valor del comando encontrado o valor por defecto MON_getArg = {private["_cmd","_arg","_list","_a","_v"]; _cmd=_this select 0; _arg=_this select 1; _list=_this select 2; _a=-1; {_a=_a+1; _v=format["%1",_list select _a]; if (_v==_cmd) then {_arg=(_list select _a+1)}} foreach _list; _arg}; // --------------------------------------------------------------------------------------------------------- //Función que devuelve una posición en 3D a partir de otra, una dirección y una distancia //param1: posición //param2: dirección //param3: distancia //Retorna vector de posicion en 3D [0,0,0] MON_GetPos = { private ["_pos","_dir","_dist","_cosU","_cosT","_relTX","_sinU","_sinT","_relTY","_newPos","_newPosX","_newPosY", "_targetZ" ]; _pos = _this select 0; _dir = _this select 1; _dist = _this select 2; _targetX = _pos select 0; _targetY = _pos select 1; _targetZ = _pos select 2; //Calculamos posición _cosU = [_dir] call MON_GetCOS; _sinU = [_dir] call MON_GetSIN; _cosT = abs cos(_dir); _sinT = abs sin(_dir); _relTX = _sinT * _dist * _cosU; _relTY = _cosT * _dist * _sinU; _newPosX = _targetX + _relTX; _newPosY = _targetY + _relTY; _newPos = [_newPosX,_newPosY,_targetZ]; _newPos; }; // --------------------------------------------------------------------------------------------------------- //Función que devuelve una posición en 2D a partir de otra, una dirección y una distancia //param1: posición //param2: dirección //param3: distancia //Retorna vector de posicion en 2D [0,0] MON_GetPos2D = { private ["_pos","_dir","_dist","_cosU","_cosT","_relTX","_sinU","_sinT","_relTY","_newPos","_newPosX","_newPosY" ]; _pos = _this select 0; _dir = _this select 1; _dist = _this select 2; _targetX = _pos select 0; _targetY = _pos select 1; //Calculamos posición _cosU = [_dir] call MON_GetCOS; _sinU = [_dir] call MON_GetSIN; _cosT = abs cos(_dir); _sinT = abs sin(_dir); _relTX = _sinT * _dist * _cosU; _relTY = _cosT * _dist * _sinU; _newPosX = _targetX + _relTX; _newPosY = _targetY + _relTY; _newPos = [_newPosX,_newPosY]; _newPos; }; // --------------------------------------------------------------------------------------------------------- //Función que devuelve las posiciones que se pueden ocupar dentro de un edificio //param1: objeto location //Retorna numero de posiciones que tiene el edificio MON_BldPos = {private ["_bld","_bldpos"]; _bld=_this; _bldpos = 1; while {format ["%1", _bld buildingPos _bldpos] != "[0,0,0]"} do {_bldpos = _bldpos + 1;}; _bldpos = _bldpos - 1; _bldpos;}; // --------------------------------------------------------------------------------------------------------- //Función que devuelve la casa que hay más cerca del objeto param1 y las posiciones que se pueden ocupar dentro de ella. //param1: objeto //Retorna vector con [objeto location, posiciones que tiene] MON_PosInfo = { private["_obj","_bld","_bldpos"]; _obj=_this; _bld = nearestbuilding _obj; _bldpos= _bld call MON_BldPos; [_bld,_bldpos]; }; // --------------------------------------------------------------------------------------------------------- //Función que devuelve el valor negativo o positivo del seno en base a un angulo MON_GetSIN = { private["_dir","_sin","_cos"]; _dir=_this select 0; if (_dir<90) then { _sin=1; } else { if (_dir<180) then { _sin=-1; } else { if (_dir<270) then { _sin=-1; } else { _sin=1; }; }; }; _sin }; // --------------------------------------------------------------------------------------------------------- //Función que devuelve el valor negativo o positivo del coseno en base a un angulo MON_GetCOS = { private["_dir","_cos"]; _dir=_this select 0; if (_dir<90) then { _cos=1; } else { if (_dir<180) then { _cos=1; } else { if (_dir<270) then { _cos=-1; } else { _cos=-1; }; }; }; _cos }; //Función que busca vehiculos cercanos y hace entrar a las unidades del lider //Parámeters: [_grpid,_npc] // <- _grpid: id of group to assign to vehicle // <- _npc: lider // -> _getin: true if any getin MON_GetIn_NearestVehicles = { private["_vehicles","_npc","_units","_unitsIn","_grpid","_getin"]; _grpid = _this select 0; _npc = _this select 1; _vehicles=[[]]; _air=[[]]; _units = []; _unitsIn = []; _getin=false; if (leader _npc == _npc) then { _units = units _npc; } else { _units = _units + [_npc]; }; { if ( (_x!= vehicle _x && !((vehicle _x) iskindof "StaticWeapon" )) || !(_x iskindof "Man") || !alive _x || !canmove _x || !canstand _x) then {_units = _units-[_x];}; }foreach _units; _unitsIn = _units; //if (KRON_UPS_Debug>0) then {diag_log format["%1 _units=%2",_grpid, count _units]}; //First catch combat vehicles if ( (count _units) > 0) then { _air = [_npc,200] call MON_NearestsAirTransports; {if (_npc knowsabout (_x select 0) <= 0.5) then{ _air = _air - [_x]};}foreach _air; _units = [_grpid, _units, _air, false] call MON_selectvehicles; }; sleep 0.05; if ( (count _units) > 1) then { _vehicles = [_npc,200,true] call MON_NearestsLandCombat; {if (_npc knowsabout(_x select 0) <= 0.5) then{ _vehicles = _vehicles - [_x]};}foreach _vehicles; _units = [_grpid, _units, _vehicles, false] call MON_selectvehicles; }; sleep 0.05; if ( (count _units) > 0) then { _vehicles = [_npc,200] call MON_NearestsLandTransports; {if (_npc knowsabout (_x select 0) <= 0.5) then{ _vehicles = _vehicles - [_x]};}foreach _vehicles; _units = [_grpid, _units, _vehicles, false] call MON_selectvehicles; }; sleep 5; if ( (count _units) > 0 && (count _vehicles) > 0) then { sleep 1; _vehicles = _vehicles + _air; _units = [_grpid, _units, _vehicles, true] call MON_selectvehicles; }; sleep 0.05; _unitsIn = _unitsIn - _units; _unitsIn; }; //Función que busca vehiculos cercanos y hace entrar a las unidades del lider //Parámeters: [_grpid,_npc] // <- _grpid: id of group to assign to vehicle // <- _npc: lider // -> _getin: true if any getin MON_GetIn_NearestCombat = { private["_vehicles","_npc","_units","_unitsIn","_grpid","_getin","_dist","_all"]; _grpid = _this select 0; _npc = _this select 1; _dist = _this select 2; _all = _this select 3; _vehicles=[[]]; _units = []; _unitsIn = []; _getin=false; if (leader _npc == _npc) then { _units = units _npc; } else { _units = _units + [_npc]; }; { if ( (_x!= vehicle _x && !((vehicle _x) iskindof "StaticWeapon" )) || !(_x iskindof "Man") || !alive _x || !canmove _x || !canstand _x) then {_units = _units-[_x];}; }foreach _units; //If suficient units leader will not get in if (!all) then { if (count _units > 2 ) then {_units = _units - [leader _npc]}; }; _unitsIn = _units; //We need 2 units available if not any leave vehicle to another squad if ( (count _units) > 1) then { _vehicles = [_npc,_dist,_all] call MON_NearestsAirCombat; {if (_npc knowsabout (_x select 0) <= 0.5) then{ _vehicles = _vehicles - [_x]};}foreach _vehicles; _units = [_grpid, _units, _vehicles, false] call MON_selectvehicles; }; sleep 0.05; if ( (count _units) > 1) then { _vehicles = [_npc,_dist,_all] call MON_NearestsLandCombat; {if (_npc knowsabout(_x select 0) <= 0.5) then{ _vehicles = _vehicles - [_x]};}foreach _vehicles; _units = [_grpid, _units, _vehicles, false] call MON_selectvehicles; }; _unitsIn = _unitsIn - _units; _unitsIn; }; //Función que busca vehiculos cercanos y hace entrar a las unidades del lider //Parámeters: [_grpid,_npc] // <- _grpid: id of group to assign to vehicle // <- _npc: lider // -> _getin: true if any getin MON_GetIn_NearestBoat = { private["_vehicles","_npc","_units","_unitsIn","_grpid","_getin","_dist"]; _grpid = _this select 0; _npc = _this select 1; _dist = _this select 2; _vehicles=[[]]; _units = []; _unitsIn = []; _getin=false; if (leader _npc == _npc) then { _units = units _npc; } else { _units = _units + [_npc]; }; { if ( (_x!= vehicle _x && !((vehicle _x) iskindof "StaticWeapon" )) || !(_x iskindof "Man") || !alive _x || !canmove _x || !canstand _x) then {_units = _units-[_x];}; }foreach _units; _unitsIn = _units; //We need 2 units available if not any leave vehicle to another squad if ( (count _units) > 0) then { _vehicles = [_npc,_dist] call MON_Nearestsboats; {if (_npc knowsabout (_x select 0) <= 0.5) then{ _vehicles = _vehicles - [_x]};}foreach _vehicles; _units = [_grpid, _units, _vehicles, false] call MON_selectvehicles; }; if ( (count _units) > 1 && (count _vehicles) > 0) then { sleep 1; _units = [_grpid, _units, _vehicles, true] call MON_selectvehicles; }; _unitsIn = _unitsIn - _units; _unitsIn; }; //Función que busca staticos cercanos y hace entrar a las unidades del lider //Parámeters: [_grpid,_npc] // <- _grpid: id of group to assign to vehicle // <- _npc: lider // -> _getin: true if any getin MON_GetIn_NearestStatic = { private["_vehicles","_npc","_units","_unitsIn","_grpid","_getin","_count"]; _grpid = _this select 0; _npc = _this select 1; _count = 0; _distance = 100; if ((count _this) > 2) then {_distance = _this select 2;}; _vehicles=[]; _units = []; _unitsIn = []; _getin=false; //Buscamos staticos cerca _vehicles = [_npc,_distance] call MON_NearestsStaticWeapons; if ( count _vehicles == 0) exitwith {_unitsIn;}; if (leader _npc == _npc) then { _units = (units _npc) - [_npc]; } else { _units = _units + [_npc]; }; //Solo tomamos las unidades vivas y que no estén en vehiculo { if ( (_x iskindof "Man") && _x == vehicle _x && alive _x && canmove _x && canstand _x) then { _unitsIn = _unitsIn + [_x]; }; }foreach _units; //Intentamos tomar solo las que estén disponibles _units = []; { if (unitready _x) then { _units = _units + [_x]; }; }foreach _unitsin; //Si hay unidades disponibles las usamos if (count _units > 0) then { _unitsIn = _units; }; //if (KRON_UPS_Debug>0 ) then {player sidechat format["%1: Found %2 estatic weapons %3 men available",_grpid,count _vehicles, count _unitsIn]}; _units = _unitsIn; if ( count _unitsIn > 0) then { _units = [_grpid, _units, _vehicles, true] call MON_selectvehicles; }; _unitsIn = _unitsIn - _units; _unitsIn; }; //Function to assign units to vehicles //Parámeters: [_grpid,_unitsin,_vehicle] // <- _grpid: id of group to assign to vehicle // <- _units: array of units to getin // <- _vehicles: array of vehicles to use // -> _untis: array of units getin MON_selectvehicles = { private["_vehicles","_emptypositions","_units","_unitsIn","_i","_grpid","_vehgrpid","_unit","_wp","_any","_index","_cargo"]; _grpid = _this select 0; _units = _this select 1; _vehicles = _this select 2; _any = _this select 3; //meter en cualquier vehiculo _wp = []; _vehicle = []; _unitsIn = []; _emptypositions = 0; _i = 0; _vehgrpid = 0; _unit = objnull; _index = 0; _cargo = []; { if ((count _units) == 0 ) exitwith {}; _vehicle = _x select 0 ; _emptypositions = _x select 1; _unitsIn = []; _i = 0; _vehgrpid = _vehicle getvariable ("UPSMON_grpid"); _cargo = _vehicle getvariable ("UPSMON_cargo"); if ( isNil("_vehgrpid") ) then {_vehgrpid = 0;}; if ( isNil("_cargo") ) then {_cargo = [];}; //Asignamos el vehiculo a a la escuadra si contiene las posiciones justas if (_vehgrpid == 0) then { _vehicle setVariable ["UPSMON_grpid", _grpid, false]; _vehicle setVariable ["UPSMON_cargo", _units, false]; _vehgrpid = _grpid; }; { if (!alive _x || !canmove _x) then {_cargo = _cargo - [_x]; }; }foreach _cargo; _emptypositions = _emptypositions - (count _cargo - count ( crew _vehicle) ); //ahora buscamos en cualquier vehiculo if ( _vehgrpid == _grpid || (_emptypositions > 0 && _any)) then { while {_i < _emptypositions && _i < count _units} do { _unit = _units select _i; _unitsIn = _unitsIn + [_unit]; _i = _i + 1; }; { _units = _units - [_x]; }foreach _unitsIn; if ( (count _unitsIn) > 0) then { //Asignamos el vehiculo a a la escuadra si contiene las posiciones justas if (_vehgrpid == _grpid) then { _vehicle setVariable ["UPSMON_cargo", _units, false]; }; //Metemos las unidades en el vehiculo [_grpid,_unitsIn,_vehicle] spawn MON_UnitsGetIn; if (KRON_UPS_Debug>0 ) then {player sidechat format["%1: Get in %2 %3 units of %4 available",_grpid,typeof _vehicle,count _unitsIn,_emptypositions]}; //if (KRON_UPS_Debug>0) then {diag_log format["%1 getin %2 id=%7 any=%8 unitsin=%9 quedan=%6 emptypositions=%3 cargo=%4 crew=%5",_grpid, typeof _vehicle, _emptypositions, count _cargo,count (crew _vehicle),count _units,_vehgrpid,_any, count _unitsIn]}; }; }; _index = _index + 1; sleep 0.05; } foreach _vehicles; _units; }; //Funcion que mete la tropa en el vehiculo //Parámeters: [_grpid,_unitsin,_vehicle] // <- _grpid: id of group to assign to vehicle // <- _unitsin: array of units to getin // <- _vehicle MON_UnitsGetIn = { private["_grpid","_vehicle","_npc","_driver","_gunner", "_unitsin", "_units" , "_Commandercount","_Drivercount","_Gunnercount","_cargo", "_Cargocount","_emptypositions","_Commander","_vehgrpid","_cargo"]; _grpid = _this select 0; _unitsin = _this select 1; _vehicle = _this select 2; _units = _unitsin; _driver = objnull; _gunner = objnull; _Commander = objnull; _Cargocount = 0; _Gunnercount = 0; _Commandercount = 0; _Drivercount = 0; _cargo = []; _Cargocount = (_vehicle) emptyPositions "Cargo"; _Gunnercount = (_vehicle) emptyPositions "Gunner"; _Commandercount = (_vehicle) emptyPositions "Commander"; _Drivercount = (_vehicle) emptyPositions "Driver"; //Obtenemos el identificador del vehiculo _vehgrpid = _vehicle getvariable ("UPSMON_grpid"); _cargo = _vehicle getvariable ("UPSMON_cargo"); if ( isNil("_vehgrpid") ) then {_vehgrpid = 0;}; if ( isNil("_cargo") ) then {_cargo = [];}; _cargo = _cargo - _unitsin; //Para evitar duplicados _cargo = _cargo + _unitsin; //Añadimos a la carga _vehicle setVariable ["UPSMON_cargo", _cargo, false]; //Hablitamos a la IA para entrar en el vehiculo { [_x,0] call MON_dostop; if ("StaticWeapon" countType [vehicle (_x)]>0) then { _x spawn MON_doGetOut; }; unassignVehicle _x; _x spawn MON_Allowgetin; }foreach _units; //Asignamos al lider como comandante o carga { if ( _vehgrpid == _grpid && _x == leader _x && _Commandercount > 0 ) exitwith { _Commandercount = 0; _Commander = _x; _Commander assignAsCommander _vehicle; _units = _units - [_x]; [_x] orderGetIn true; }; if ( _x == leader _x && _Cargocount > 0 ) exitwith { _x assignAsCargo _vehicle; _units = _units - [_x]; _Cargocount = _Cargocount - 1; [_x] orderGetIn true; }; }foreach _units; //if (KRON_UPS_Debug>0 ) then {player sidechat format["%1: _vehgrpid %2 ,_Gunnercount %3, %4",_grpid,_vehgrpid,_Gunnercount,count _units]}; //Si el vehiculo pertenece al grupo asignamos posiciones de piloto, sinó solo de carga if ( _vehgrpid == _grpid ) then { //Asignamos el conductor if ( _Drivercount > 0 && count (_units) > 0 ) then { _driver = _units select (count _units - 1); [_driver,_vehicle,0] spawn MON_assignasdriver; _units = _units - [_driver]; }; //Asignamos el artillero if ( _Gunnercount > 0 && count (_units) > 0 ) then { _gunner = [_vehicle,_units] call MON_getNearestSoldier; [_gunner,_vehicle] spawn MON_assignasgunner; _units = _units - [_gunner]; }; }; //if (KRON_UPS_Debug>0 ) then {player sidechat format["%1: _vehgrpid=%2 units=%4",_grpid,_vehgrpid,_cargocount,count _units]}; //Movemos el resto como carga if ( _Cargocount > 0 && count (_units) > 0 ) then { { _x assignAsCargo _vehicle; [_x] orderGetIn true; sleep 0.05; } forEach _units; }; { [_x] spawn MON_avoidDissembark; } forEach (_unitsin - [_driver]) - [_gunner]; }; MON_getNearestSoldier = { private["_units","_obj","_near"]; _obj = _this select 0; _units = _this select 1; _near = objnull; { if (isnull _near) then { _near = _x; } else { if ( _x distance _obj < _near distance _obj ) then {_near = _x;}; }; }foreach _units; _near; }; MON_avoidDissembark = { private["_npc","_vehicle","_timeout"]; _npc = _this select 0; _vehicle = vehicle _npc ; _timeout = 120; _timeout = time + _timeout; while {_npc == vehicle _npc && alive _npc && canmove _npc && time < _timeout} do { sleep 1; }; if (!alive _npc || !canmove _npc || time >= _timeout || driver vehicle _npc == _npc) exitwith{}; _npc stop true; while {_npc != vehicle _npc && alive _npc && canmove _npc} do {sleep 1;}; if (!alive _npc || !canmove _npc) exitwith{}; _npc stop false; //sleep 0.5; if (!isnull (assignedVehicle player)) then { [_npc] ordergetin true; [_npc] spawn MON_avoidDissembark; }; }; //Función que devuelve un vehiculo de transporte cercano //Parámeters: [_npc] // <- _npc: object for position search // -> _vehicle: vehicle MON_NearestLandTransport = { private["_vehicle","_npc","_transportSoldier","_OCercanos","_driver", "_Commandercount","_Drivercount","_Gunnercount","_Cargocount"]; _npc = _this; _OCercanos = []; _transportSoldier = 0; _vehicle = objnull; _Cargocount = 0; _Gunnercount = 0; _Commandercount = 0; _Drivercount = 0; //Buscamos objetos cercanos _OCercanos = nearestObjects [_npc, ["Car","TANK","Truck","Motorcycle"] , 150]; { _Cargocount = (_x) emptyPositions "Cargo"; _Gunnercount = (_x) emptyPositions "Gunner"; _Commandercount = (_x) emptyPositions "Commander"; _Drivercount = (_x) emptyPositions "Driver"; _transportSoldier = _Cargocount + _Gunnercount + _Commandercount + _Drivercount; if (!locked _x && canMove _x && _transportSoldier >= count (units _npc) && !(typeof _x in MON_bugged_vehicles) && (_drivercount > 0 || side _npc == side _x )) exitwith {_vehicle = _x;}; }foreach _OCercanos; _vehicle; }; //Función que devuelve un array con los vehiculos terrestres más cercanos //Parámeters: [_npc,_distance] // <- _npc: object for position search // <- _distance: max distance from npc // -> _vehicles: array of vehicles MON_NearestsLandTransports = { private["_vehicles","_npc","_emptypositions","_OCercanos","_driver", "_Commandercount","_Drivercount","_Gunnercount","_Cargocount","_distance"]; _npc = _this select 0; _distance = _this select 1; _OCercanos = []; _emptypositions = 0; _vehicles = []; _Cargocount = 0; _Gunnercount = 0; _Commandercount = 0; _Drivercount = 0; //Buscamos objetos cercanos _OCercanos = nearestObjects [_npc, ["Car","TANK","Truck","Motorcycle"] , _distance]; { _Cargocount = (_x) emptyPositions "Cargo"; _Gunnercount = (_x) emptyPositions "Gunner"; _Commandercount = (_x) emptyPositions "Commander"; _Drivercount = (_x) emptyPositions "Driver"; _emptypositions = _Cargocount + _Gunnercount + _Commandercount + _Drivercount; if (!locked _x && _emptypositions > 0 && canMove _x && !(typeof _x in MON_bugged_vehicles) && (_drivercount > 0 || side _npc == side _x )) then { _vehicles = _vehicles + [[_x,_emptypositions]];}; }foreach _OCercanos; _vehicles; }; //Función que devuelve un array con los vehiculos terrestres más cercanos //Parámeters: [_npc,_distance] // <- _npc: object for position search // <- _distance: max distance from npc // -> _vehicles: array of vehicles MON_NearestsLandCombat = { private["_vehicles","_npc","_emptypositions","_OCercanos","_driver", "_Commandercount","_Drivercount","_Gunnercount","_Cargocount","_distance","_all"]; _npc = _this select 0; _distance = _this select 1; _all = _this select 2; _OCercanos = []; _emptypositions = 0; _vehicles = []; _Cargocount = 0; _Gunnercount = 0; _Commandercount = 0; _Drivercount = 0; //Buscamos objetos cercanos _OCercanos = nearestObjects [_npc, ["Car","TANK","Truck","Motorcycle"] , _distance]; { if (_all) then { _Cargocount = (_x) emptyPositions "Cargo"; }; _Gunnercount = (_x) emptyPositions "Gunner"; _Drivercount = (_x) emptyPositions "Driver"; _Commandercount = (_x) emptyPositions "Commander"; _emptypositions = _Cargocount + _Gunnercount + _Commandercount + _Drivercount; if (!locked _x && _Gunnercount > 0 && canMove _x && !(typeof _x in MON_bugged_vehicles) && (_drivercount > 0 || side _npc == side _x )) then { _vehicles = _vehicles + [[_x,_emptypositions]];}; }foreach _OCercanos; _vehicles; }; //Función que devuelve un array con los vehiculos aereos más cercanos //Parámeters: [_npc,_distance] // <- _npc: object for position search // <- _distance: max distance from npc // -> _vehicles: array of vehicles MON_NearestsAirTransports = { private["_vehicles","_npc","_emptypositions","_OCercanos","_driver", "_Commandercount","_Drivercount","_Gunnercount","_Cargocount","_distance"]; _npc = _this select 0; _distance = _this select 1; _OCercanos = []; _emptypositions = 0; _vehicles = []; _Cargocount = 0; _Gunnercount = 0; _Commandercount = 0; _Drivercount = 0; //Buscamos objetos cercanos _OCercanos = nearestObjects [_npc, ["Helicopter"] , _distance]; { _Cargocount = (_x) emptyPositions "Cargo"; _Gunnercount = (_x) emptyPositions "Gunner"; _Commandercount = (_x) emptyPositions "Commander"; _Drivercount = (_x) emptyPositions "Driver"; _emptypositions = _Cargocount + _Gunnercount + _Commandercount + _Drivercount; if (!locked _x && _emptypositions > 0 && canMove _x && !(typeof _x in MON_bugged_vehicles) && (_drivercount > 0 || side _npc == side _x )) then { _vehicles = _vehicles + [[_x,_emptypositions]];}; }foreach _OCercanos; _vehicles; }; //Función que devuelve un array con los vehiculos aereos más cercanos //Parámeters: [_npc,_distance] // <- _npc: object for position search // <- _distance: max distance from npc // -> _vehicles: array of vehicles MON_NearestsAirCombat = { private["_vehicles","_npc","_emptypositions","_OCercanos","_driver", "_Commandercount","_Drivercount","_Gunnercount","_Cargocount","_distance","_all"]; _npc = _this select 0; _distance = _this select 1; _all = _this select 2; _OCercanos = []; _emptypositions = 0; _vehicles = []; _Cargocount = 0; _Gunnercount = 0; _Commandercount = 0; _Drivercount = 0; //Buscamos objetos cercanos _OCercanos = nearestObjects [_npc, ["Helicopter"] , _distance]; { if (_all) then { _Cargocount = (_x) emptyPositions "Cargo"; }; _Gunnercount = (_x) emptyPositions "Gunner"; _Drivercount = (_x) emptyPositions "Driver"; _Commandercount = (_x) emptyPositions "Commander"; _emptypositions = _Cargocount + _Gunnercount + _Commandercount + _Drivercount; if (!locked _x && _Gunnercount > 0 && canMove _x && !(typeof _x in MON_bugged_vehicles) && (_drivercount > 0 || side _npc == side _x )) then { _vehicles = _vehicles + [[_x,_emptypositions]];}; }foreach _OCercanos; _vehicles; }; //Función que devuelve un array con los vehiculos staticos más cercanos //Parámeters: [_npc,_distance] // <- _npc: object for position search // <- _distance: max distance from npc // -> _vehicles: array of vehicles MON_NearestsStaticWeapons = { private["_vehicles","_npc","_emptypositions","_OCercanos","_driver", "_Commandercount","_Drivercount","_Gunnercount","_Cargocount","_distance"]; _npc = _this select 0; _distance = _this select 1; _OCercanos = []; _emptypositions = 0; _vehicles = []; _Cargocount = 0; _Gunnercount = 0; _Commandercount = 0; _Drivercount = 0; //Buscamos objetos cercanos _OCercanos = nearestObjects [_npc, ["StaticWeapon"] , _distance]; { _Gunnercount = (_x) emptyPositions "Gunner"; _emptypositions = _Gunnercount; if (!locked _x && alive _x && _emptypositions > 0 && !(typeof _x in MON_bugged_vehicles) ) then { _vehicles = _vehicles + [[_x,_emptypositions]];}; }foreach _OCercanos; _vehicles; }; //Función que devuelve un array con los vehiculos marinos más cercanos //Parámeters: [_npc,_distance] // <- _npc: object for position search // <- _distance: max distance from npc // -> _vehicles: array of vehicles MON_Nearestsboats = { private["_vehicles","_npc","_emptypositions","_OCercanos","_driver", "_Commandercount","_Drivercount","_Gunnercount","_Cargocount","_distance"]; _npc = _this select 0; _distance = _this select 1; _OCercanos = []; _emptypositions = 0; _vehicles = []; _Cargocount = 0; _Gunnercount = 0; _Commandercount = 0; _Drivercount = 0; //Buscamos objetos cercanos _OCercanos = nearestObjects [_npc, ["Ship"] , _distance]; { _Cargocount = (_x) emptyPositions "Cargo"; _Gunnercount = (_x) emptyPositions "Gunner"; _Commandercount = (_x) emptyPositions "Commander"; _Drivercount = (_x) emptyPositions "Driver"; _emptypositions = _Cargocount + _Gunnercount + _Commandercount + _Drivercount; if (!locked _x && _emptypositions > 0 && canMove _x && (_drivercount > 0 || side _npc == side _x )) then { _vehicles = _vehicles + [[_x,_emptypositions]];}; }foreach _OCercanos; _vehicles; }; //Función para retardar la toma del volante, así no se va el vehiculo y da tiempo a subir MON_assignasdriver = { private["_vehicle","_driver","_wait"]; _driver = _this select 0; _vehicle = _this select 1; _wait = _this select 2; [_driver,_wait] spawn MON_dostop; unassignVehicle _driver; _driver assignasdriver _vehicle; [_driver] orderGetIn true; //if (KRON_UPS_Debug>0) then {player sidechat format["%1: assigning to driver of %2 ",_driver, typeof _vehicle]}; }; MON_assignasgunner = { private["_vehicle","_gunner","_dist"]; _gunner = _this select 0; _vehicle = _this select 1; _dist=0; _gunner assignasgunner _vehicle; [_gunner] orderGetIn true; waituntil { _gunner != vehicle _gunner || !alive _gunner || !canmove _gunner ||!alive _vehicle || !canfire _vehicle}; if ( alive _gunner && alive _vehicle && canmove _gunner && canfire _vehicle) then { _dist = _gunner distance _vehicle; if (_dist < 3) then { _gunner moveInTurret [_vehicle, [0,0]] ; }; }; }; //Allow getin MON_Allowgetin = { //Hablitamos a la IA para entrar en el vehiculo [_this] allowGetIn true; }; //Función que ordena al soldado salir si se encuentra en un vehiculo y a la distancia indicada //Parámeters: [_heli,_targetPos,_atdist] // <- _npc: unit in vehicle // <- _targetPos: position for exiting(if no waypoint used) // <- _atdist: distance for doing paradrop or landing // -> _getout: true if getout MON_GetOutDist = { private["_vehicle","_npc","_target","_atdist","_getout","_dogetout","_driver","_commander","_targetpos","_dist","_vehpos","_vehicles"]; _npc = _this select 0; _targetpos = _this select 1; _atdist = _this select 2; _getout = false; _dogetout = []; _vehicles = []; sleep 0.05; if (!alive _npc) exitwith{}; _vehicle = vehicle _npc; _vehpos = getpos _vehicle; _dist = round([_vehpos,_targetpos] call KRON_distancePosSqr); //if (KRON_UPS_Debug>0) then {player sidechat format["%1: Getoutdist dist=%2 atdist=%3 ",typeof _vehicle,_dist, _atdist]}; if ( _vehicle != _npc || !(_npc iskindof "Man")) then { if ( (_dist) <= _atdist ) then { { if (( vehicle _x != _x || !(_x iskindof "Man")) && !((vehicle _x) in _vehicles)) then { _vehicles = _vehicles + [vehicle _x]; }; }foreach units _npc; { _vehicle = _x; _dogetout = crew _vehicle; _driver = driver _vehicle; _gunner = gunner _vehicle; //Si hay artillero no sacarenos ni al piloto ni al artillero ni al comandante if ( alive _gunner && canmove _gunner ) then { _dogetout = _dogetout - [_gunner] - [_driver]; }; if ( count _dogetout > 0 ) then { _getout = true; //Paramos el vehiculo y esperamos 5 segundos [_vehicle,10] spawn MON_doStop; //if (KRON_UPS_Debug>0) then {player sidechat format["%1: Getoutdist dist=%2 atdist=%3 ",typeof _vehicle,_dist, _atdist]}; { _x spawn MON_GetOut; sleep 0.5; }foreach _dogetout; //Quitamos el id al vehiculo para que pueda ser reutilizado _vehicle setVariable ["UPSMON_grpid", 0, false]; _vehicle setVariable ["UPSMON_cargo", [], false]; [_npc,_vehicle, _driver] spawn MON_checkleaveVehicle; }; } foreach _vehicles; }; }; _dogetout; }; //Evalua si han salido todas las unidades para abandonar el vehiculo MON_checkleaveVehicle={ _npc = _this select 0; _vehicle = _this select 1; _driver = _this select 2; _in = false; //Damos tiempo a que todas las unidades salgan sleep 10; { if (_x != vehicle _x) then {_in = true}; }foreach units _npc; if (!_in) then { _driver enableAI "MOVE"; sleep 1; _driver stop false; sleep 1; _driver leaveVehicle _vehicle; sleep 1; }; }; //Function for order a unit to exit if no gunner //Parámeters: [_npc] // <- _npc: MON_GetOut = { private["_vehicle","_npc","_getout" ,"_gunner"]; _npc = _this; _vehicle = vehicle (_npc); _gunner = objnull; _gunner = gunner _vehicle; sleep 0.05; if (!alive _npc) exitwith{}; //Si no hay artillero abandonamos el vehiculo if ( isnull _gunner || !alive _gunner || !canmove _gunner || (_gunner != _npc && driver _vehicle != _npc && commander _vehicle != _npc) ) then { [_npc] allowGetIn false; unassignVehicle _npc; _npc spawn MON_doGetOut; }; }; //Function for order a unit to exit //Parámeters: [_npc] // <- _npc: MON_doGetOut = { private["_vehicle","_npc","_getout" ,"_gunner","_groupOne","_timeout","_dir"]; _npc = _this; _vehicle = vehicle (_npc); sleep 0.05; if (_vehicle != _npc) then { //Wait until vehicle is stopped waituntil {!alive _npc || !canmove _npc || !alive _vehicle || ((velocity _vehicle select 0) <= 0 && (velocity _vehicle select 1) <= 0 ) || ( _vehicle iskindof "Air" && ((position _vehicle) select 2) <= 1)}; if (!alive _npc || !canmove _npc) exitwith{}; unassignVehicle _npc; _npc action ["getOut", _vehicle]; doGetOut _npc; [_npc] spawn MON_cancelstop; waituntil {!alive _npc || !canmove _npc || vehicle _npc == _npc}; }; if (!alive _npc || !canmove _npc) exitwith{}; if (leader _npc != _npc) then { //Moves out with dispersion of 45º _dir = getDir _npc; _dir = _dir + 45 - (random 90); [_npc,25,_dir] spawn MON_domove; //if (KRON_UPS_Debug>0 ) then { player globalchat format["%1 Moving away from %2 %3º",_npc, typeof _vehicle,_dir];}; }; }; //Function for exiting of heli //Parámeters: [_heli,_targetPos,_atdist] // <- _heli: // <- _targetPos: position for exiting(if no waypoint used) // <- _atdist: distance for doing paradrop or landing MON_doParadrop = { private["_heli","_npc","_getout" ,"_gunner","_targetpos","_helipos","_dist","_index","_grp","_wp","_targetPosWp","_targetP","_units","_crew","_timeout","_firstTime","_NearestEnemy"]; _heli = _this select 0; _targetPos = [0,0]; _atdist = 250; _flyingheigh = 90; _landonBeh = ["CARELESS","SAFE"]; _timeout=0; _firstTime = true; //Gets optional parameters if ((count _this) > 1) then {_targetPos = _this select 1;}; if ((count _this) > 2) then {_atdist = _this select 2;}; if ((count _this) > 3) then {_flyingheigh = _this select 3;}; _helipos = [0,0]; _targetposWp = [0,0]; _gunner = objnull; _gunner = gunner _heli; _dist = 1000000; _index = 0; _grp = GRPNULL; _wp = []; _units =[]; _crew =[]; if (_flyingheigh < 90) then {_flyingheigh = 90}; waituntil {count crew _heli > 0 || !alive _heli || !canmove _heli}; _grp = group ((crew _heli) select 0); _npc = leader ((crew _heli) select 0); _units = units _npc; if (KRON_UPS_Debug>0 ) then { player globalchat format["%1 do paradrop at dist %2 ",typeof _heli, _atdist];}; while { (_dist >= _atdist || _dist < 10) && alive _heli && canmove _heli && count crew _heli > 0} do { _heli flyInHeight _flyingheigh; //Take last waypoint _index = (count waypoints _grp) - 1; _wp = [_grp,_index]; _targetPosWp = waypointPosition _wp; if (format ["%1", _targetPosWp] == "[0,0,0]") then {_targetPosWp = _targetPos}; _helipos = position _heli; _dist = round([_helipos,_targetPosWp] call KRON_distancePosSqr); if (_firstTime) then { _firstTime = false; if (_dist <= _atdist ) then { _targetPosWp = _targetPos; _dist = round([_helipos,_targetPosWp] call KRON_distancePosSqr); }; }; //if (KRON_UPS_Debug>0 ) then {hintsilent format["flying heigh=%1 dist=%2 jump at=%3",(position _heli) select 2,_dist,_atdist];}; sleep 1; }; if (!alive _heli || count crew _heli == 0 || (count (assignedCargo _heli) == 0 && !isnull (gunner _heli))) exitwith{}; _crew = crew _heli; _NearestEnemy = _heli findnearestenemy _heli; //Jump if (((position _heli) select 2) >= 55 && !surfaceIsWater position _heli && (!(toupper (behaviour _npc) IN _landonBeh) || !isnull _NearestEnemy || random 100 <= 50)) then { //moving hely for avoiding stuck [_heli,1000] spawn MON_domove; sleep 3; if (KRON_UPS_Debug>0 ) then {_heli globalchat format["doing paradrop high %1 dist=%2",(position _heli) select 2,_dist,_atdist];}; //Do paradrop { if( (assignedVehicleRole _x) select 0 == "Cargo")then { unassignVehicle _x; _x action ["EJECT", _heli] ; _x stop false; [_x] spawn MON_ACE_Watersurvival; }; sleep 0.5; } forEach crew _heli - [gunner _heli] - [driver _heli]; //Clear Hely vars _heli setVariable ["UPSMON_grpid", 0, false]; _heli setVariable ["UPSMON_cargo", [], false]; //Waits until all units are down _timeout = time + 60; { waituntil {(_x == vehicle _x ) || !alive _x || !canmove _x || isnull _x || time > _timeout}; //Fix bug of ACE that sometimes AI gets in stand animation //_x switchMove "AmovPercMsprSlowWrflDf_AmovPpneMstpSrasWrflDnon_2"; }foreach (_crew - [driver _heli]) - [gunner _heli]; //if (KRON_UPS_Debug>0) then {player globalchat format["%1 after paradrop",_npc]}; if (alive _npc && canmove _npc) then { _npc move _targetPosWp; }else{ {if (alive _x && canmove _x) exitwith { _x move _targetPosWp;}}foreach _crew; }; //If only pilot land heli if (count crew _heli <=1) then { [_heli] spawn MON_landHely; }; } else { //land if ( !surfaceIsWater _helipos && ((random 100)<20 || !canmove _heli || (!isnull _NearestEnemy && (toupper (behaviour _npc) IN _landonBeh) && random 100 <= 50))) then { [_heli] spawn MON_landHely; } else { If (alive _heli && canmove _heli && count crew _heli > 0) then { if (KRON_UPS_Debug>0 ) then {_heli globalchat format["%1 failed paradrop, trying another time",typeof _heli];}; //Try another time _heli flyInHeight _flyingheigh; sleep 3; [_heli, _targetPos, _atdist*1.5,_flyingheigh] spawn MON_doParadrop; }; }; }; //if (KRON_UPS_Debug>0 ) then { player globalchat format["%1 exit do paradrop %2 ",_npc, _atdist];}; }; //Lands hely MON_landHely = { private["_heli","_npc","_crew","_NearestEnemy","_timeout","_landing","_targetpos"]; _heli = _this select 0; _crew =[]; _targetpos=[0,0]; _timeout = 0; _landing = false; sleep 0.05; if (!alive _heli || !canmove _heli ) exitwith{}; _crew = crew _heli; _npc = leader (_crew select 0); //Checks hely is already landing _landing = _heli getVariable "UPSMON_landing"; if (isnil ("_landing")) then {_landing=false;}; if (_landing) exitwith {}; //Orders to land heli _heli land "LAND"; if (KRON_UPS_Debug>0 ) then {player globalchat format["%1 is trying to land, altitude=%2 %3",typeof _heli,(position _heli) select 2,behaviour _npc];}; //Puts a mark for knowing hely is landing _heli setVariable ["UPSMON_landing", true, false]; //Waits for land position waituntil {!alive _heli || toUpper(landResult _heli) != "NOTREADY" }; if (alive _heli && (toUpper(landResult _heli) == "NOTFOUND")) exitwith { if (KRON_UPS_Debug>0 ) then { player globalchat format["%1 no landing zone, doing paradrop",typeof _heli];}; _heli setVariable ["UPSMON_landing", false, false]; [_heli] spawn MON_doparadrop; }; //1rt try-Waits until velocity and heigh are good for getting out _timeout = 30 + time; waituntil {!alive _heli || time > _timeout || ((velocity _heli select 2) <= 1 && ((position _heli) select 2) <= 2)}; //2nd try-Waits until velocity and heigh are good for getting out if (((position _heli) select 2) > 2 && ((position _heli) select 2) < 50 && !surfaceiswater position _heli) then { _heli land "LAND"; _timeout = 30 + time; if (KRON_UPS_Debug>0 ) then {player globalchat format["%1 trying another time to land",typeof _heli,(position _heli) select 2,behaviour _npc];}; waituntil {!alive _heli || time > _timeout || ((position _heli) select 2) > 30 || ((velocity _heli select 2) <= 1 && ((position _heli) select 2) <= 2)}; }; //Chechs if alive before continuing if (!alive _heli) exitwith {}; if (((position _heli) select 2) >= 3) exitwith { if (KRON_UPS_Debug>0 ) then { player globalchat format["%1 landing timeout, doing paradrop",typeof _heli];}; _heli setVariable ["UPSMON_landing", false, false]; //[_heli,1000] spawn MON_domove; sleep 5; [_heli] spawn MON_doparadrop; }; //dogetout each soldier { _x spawn MON_doGetOut; sleep 0.2; }forEach crew _heli; _timeout = 30 + time; //Waits until all getout of heli { waituntil {vehicle _x == _x || !canmove _x || !alive _x || movetofailed _x || time > _timeout }; }forEach _crew; // If leader alive sets combat mode if (alive _npc && canmove _npc) then { //Gets nearest known enemy for putting in combat mode _NearestEnemy = _npc findNearestEnemy _npc; if (!isnull _NearestEnemy ) then { _npc setBehaviour "AWARE"; _groupOne = group _npc; _groupOne setFormation "DIAMOND"; }; //Moves to current target Position _grpid = _npc getvariable "UPSMON_grpid"; if !(isnil "_grpid") then { _targetpos =(KRON_targetsPos select _grpid); _npc move _targetpos; if (KRON_UPS_Debug>0 ) then { player globalchat format["%1 landed",_grpid,count KRON_targetsPos];}; }; }; //Quitamos el id al vehiculo para que pueda ser reutilizado _heli setVariable ["UPSMON_grpid", 0, false]; _heli setVariable ["UPSMON_cargo", [], false]; _heli setVariable ["UPSMON_landing", false, false]; }; //Controls that heli not stoped flying MON_HeliStuckcontrol = { private["_heli","_landing","_stuckcontrol","_dir1","_targetPos","_lastpos"]; _heli = _this select 0; _landing = false; _stuckcontrol = false; _targetPos=[0,0,0]; _dir1 = 0; sleep 0.05; if ( !alive _heli || !canmove _heli ) exitwith{}; //Checks stuckcontrol not active _stuckcontrol = _heli getVariable "UPSMON_stuckcontrol"; if (isnil ("_stuckcontrol")) then {_stuckcontrol=false}; if (_stuckcontrol) exitwith {}; _heli setVariable ["UPSMON_stuckcontrol", true, false]; if (KRON_UPS_Debug>0 ) then {player globalchat format["%1 stuck control begins",typeof _heli];}; //Stuck loop control while { alive _heli } do { sleep 5; if ((velocity _heli select 0) <= 3 && (velocity _heli select 1) <= 3 && (velocity _heli select 2) <= 3 && ((position _heli) select 2) >= 30) then { _landing = _heli getVariable "UPSMON_landing"; if (isnil ("_landing")) then {_landing=false;}; if (!_landing) then { //moving hely for avoiding stuck [_heli,1000] spawn MON_domove; if (KRON_UPS_Debug>0 ) then {player GLOBALCHAT format["%1 stucked at %2m altitude, moving",typeof _heli,(position _heli) select 2];}; sleep 30; }; }; }; //if (KRON_UPS_Debug>0 ) then {player globalchat format["%1 exits from stuck control",typeof _heli];}; _heli setVariable ["UPSMON_stuckcontrol", false, false]; }; //Function that checks is gunner is alive, if not moves a cargo MON_Gunnercontrol = { private["_vehicle","_gunnercontrol","_hasgunner","_crew","_crew2"]; _vehicle = _this select 0; _targetPos=[0,0,0]; _dir1 = 0; _gunnercontrol = false; _hasgunner = (_vehicle) emptyPositions "Gunner" > 0 || !isnull gunner _vehicle; _crew = []; _crew2 = []; //Without driver and gunner sleep 0.05; if ( !alive _vehicle || !canmove _vehicle ) exitwith{}; //Checks stuckcontrol not active _gunnercontrol = _vehicle getVariable "UPSMON_gunnercontrol"; if (isnil ("_gunnercontrol")) then {_gunnercontrol=false}; if (_gunnercontrol) exitwith {}; _vehicle setVariable ["UPSMON_gunnercontrol", true, false]; _crew = crew _vehicle; //gunner and driver loop control while { alive _vehicle && canmove _vehicle && count _crew > 0} do { _crew = crew _vehicle; { if (!canmove _x || !alive _x) then {_crew = _crew -[_x];}; }foreach _crew; //Driver control if ((isnull (driver _vehicle) || !alive (driver _vehicle) || !canmove (driver _vehicle)) && count _crew > 0) then { _crew2 = _crew - [gunner _vehicle]; if (count _crew2 > 0) then { (_crew2 select (count _crew2 - 1)) spawn MON_movetodriver; }; }; //Gunner control if ( _hasgunner && (isnull (gunner _vehicle) || !alive (gunner _vehicle) || !canmove (gunner _vehicle)) && count _crew > 1) then { _crew2 = _crew - [driver _vehicle]; if (count _crew2 > 0) then { (_crew2 select (count _crew2 - 1)) spawn MON_movetogunner; }else{ (_crew select 0) spawn MON_movetogunner; }; }; sleep 20; //if (KRON_UPS_Debug>0 ) then {player globalchat format["%1 crew=%2",typeof _vehicle, count _crew];}; }; //if (KRON_UPS_Debug>0 ) then {player globalchat format["%1 exits from gunner control",typeof _vehicle];}; _vehicle setVariable ["UPSMON_gunnercontrol", false, false]; }; //Mueve a todo el grupo adelante MON_move = { private["_npc","_dir1","_targetPos","_dist"]; _npc = _this select 0; _dist = _this select 1; sleep 0.05; if (!alive _npc || !canmove _npc ) exitwith{}; _dir1 = getDir _npc; _targetPos = [position _npc,_dir1, _dist] call MON_GetPos2D; _npc move _targetPos; }; //Mueve al soldado adelante MON_domove = { private["_npc","_dir1","_targetPos","_dist"]; _npc = _this select 0; _dist = _this select 1; if ((count _this) > 2) then {_dir1 = _this select 2;} else{_dir1 = getDir _npc;}; sleep 0.05; if (!alive _npc || !canmove _npc ) exitwith{}; _targetPos = [position _npc,_dir1, _dist] call MON_GetPos2D; //If position water and not boat not go if (surfaceIsWater _targetPos && !(_npc iskindof "boat" || _npc iskindof "air") ) exitwith {}; _npc domove _targetPos; }; //Función que detiene al soldado y lo hace esperar x segundos MON_doStop = { private["_sleep","_npc"]; _npc = _this select 0; _sleep = _this select 1; sleep 0.05; if (!alive _npc || !canmove _npc ) exitwith{}; if ( _sleep == 0 ) then {_sleep = 0.001}; //Restauramos valores por defecto de movimiento //_npc disableAI "MOVE"; dostop _npc ; sleep _sleep; [_npc] spawn MON_cancelstop; }; //Función que detiene al soldado y lo hace esperar x segundos MON_cancelstop = { private["_npc"]; _npc = _this select 0; _npc stop false; }; //Realiza la animación de esquivar granada MON_evadeGrenade = { if (!alive _this || (vehicle _this) != _this || !canmove _this) exitwith{}; _this playmovenow "AmovPercMstpSlowWrflDnon_ActsPpneMstpSlowWrflDr_GrenadeEscape"; sleep 8; if (!alive _this || (vehicle _this) != _this || !canmove _this) exitwith{}; _this switchmove "AmovPpneMstpSrasWrflDnon_AmovPpneMevaSlowWrflDr"; //croqueta _this playmovenow "AmovPpneMstpSrasWrflDnon"; //prone }; //Realiza la animación de la croqueta MON_animCroqueta = { if (!alive _this || (vehicle _this) != _this || !canmove _this || !(_this iskindof "Man")) exitwith{}; if ((random 1)<=.50) then { _x switchmove "AmovPpneMstpSrasWrflDnon_AmovPpneMevaSlowWrflDl"; //croqueta } else { _x switchmove "AmovPpneMstpSrasWrflDnon_AmovPpneMevaSlowWrflDr"; //croqueta }; }; //Lanza una granada MON_throw_grenade = { private["_target","_npc"]; _npc = _this select 0; _target = _this select 1; sleep 0.5; if (!alive _npc || (vehicle _npc) != _npc || !canmove _npc) exitwith{}; _npc addMagazine "SmokeShell"; [_npc,_target] spawn MON_dowatch; _npc selectWeapon "throw"; sleep .1; _npc fire ["SmokeShellMuzzle","SmokeShellMuzzle","SmokeShell"]; sleep 4; }; //Establece el tipo de posición MON_setUnitPos = { private["_pos","_npc"]; _npc = _this select 0; _pos = _this select 1; sleep 0.5; if (!alive _npc || !canmove _npc || _npc != vehicle _npc || !(_npc iskindof "Man")) exitwith{}; _npc setUnitPos _pos; sleep 1; }; //Establece el tipo de posición MON_setUnitPosTime = { private["_pos","_npc"]; _npc = _this select 0; _pos = _this select 1; _time = _this select 2; if (!alive _npc || !canmove _npc) exitwith{}; _npc setUnitPos _pos; sleep _time; _npc setUnitPos "AUTO"; sleep 1; }; // Función para mirar en una dirección MON_dowatch = { private["_target","_npc"]; _npc = _this select 0; _target = _this select 1; if (!alive _npc) exitwith{}; _npc dowatch _target; sleep 1; }; //Función que mueve al soldado a la posición de conductor //Parámeters: [_npc,_vehicle] // <- _npc: unit to move to driver pos // <- _vehicle MON_movetoDriver = { private["_vehicle","_npc"]; _npc = _this ; _vehicle = vehicle _npc; //Si está muerto if (vehicle _npc == _npc || !alive _npc || !canmove _npc || !(_npc iskindof "Man")) exitwith{}; if (isnull(driver _vehicle) || !alive(driver _vehicle) || !canmove(driver _vehicle)) then { //if (KRON_UPS_Debug>0) then {player sidechat format["%1: Moving to driver of %2 ",_npc,typeof _vehicle]}; _npc action ["getOut", _vehicle]; doGetOut _npc; WaitUntil {vehicle _npc==_npc || !alive _npc || !canmove _npc}; //Si está muerto if (!alive _npc || !canmove _npc) exitwith{}; unassignVehicle _npc; _npc assignasdriver _vehicle; _npc moveindriver _vehicle; }; }; //Función que mueve al soldado a la posición de conductor //Parámeters: [_npc,_vehicle] // <- _npc: unit to move to driver pos // <- _vehicle MON_movetogunner = { private["_vehicle","_npc"]; _npc = _this ; _vehicle = vehicle _npc; sleep 0.05; //Si está muerto if (vehicle _npc == _npc || !alive _npc || !canmove _npc || !(_npc iskindof "Man")) exitwith{}; if (isnull(gunner _vehicle) || !alive(gunner _vehicle) || !canmove(gunner _vehicle)) then { if (KRON_UPS_Debug>0) then {player sidechat format["%1: Moving to gunner of %2 ",_npc,typeof _vehicle]}; _npc action ["getOut", _vehicle]; doGetOut _npc; WaitUntil {vehicle _npc==_npc || !alive _npc || !canmove _npc}; //Si está muerto if (!alive _npc || !canmove _npc) exitwith{}; unassignVehicle _npc; _npc assignasgunner _vehicle; _npc moveingunner _vehicle; }; }; //Función que retorna array de arrays con edificios y sus plantas //Parámeters: [_object,(_distance,_minfloors)] // <- _object: soldier to get near buildings // <- _distance: distance to search buildings (optional, 25 by default) // <- _minfloors: min floors of building (optional) if not especified min floors is 2 // -> [_bld,_bldpos] MON_GetNearestBuildings = { private ["_object","_altura","_pos","_bld","_bldpos","_posinfo","_minfloors","_OCercanos","_distance","_blds"]; _distance = 25; _minfloors = 2; _altura = 0; _blds = []; _object = _this select 0; if ((count _this) > 1) then {_distance = _this select 1;}; if ((count _this) > 2) then {_minfloors = _this select 2;}; _pos =0; _bld = objnull; _bldpos =0; _posinfo=[]; //La altura mínima es 2 porque hay muchos edificios q devuelven 2 de altura pero no se puede entrar en ellos. if ( minfloors == 0 ) then { minfloors = 2; }; // _posinfo: [0,0]=no house near, [obj,0]=house near, but no roof positions, [obj,pos]=house near, with roof pos //_posinfo= _object call MON_PosInfo; _OCercanos = nearestObjects [_object, ["house","building"] , _distance]; { _bldpos = _x call MON_BldPos; if ( _bldpos >= _minfloors && damage _x <= 0 ) then { _blds = _blds + [[_x,_bldpos]];}; //player sidechat format["%1 cerca de edificio con %2 plantas %5",typeof _object,_bldpos]; }foreach _OCercanos; _blds; }; //Function to move al units of squad to near buildings //Parámeters: [_npc,(_patrol,_minfloors)] // <- _npc: lider // <- _distance: distance to search buildings (optional, 25 by default) // <- _patrol: wheter must patrol or not MON_moveNearestBuildings = { private ["_npc","_altura","_pos","_bld","_bldpos","_posinfo","_blds","_distance","_cntobjs1","_bldunitin","_blddist","_patrol","_wait","_all"]; _distance = 30; _altura = 0; _patrol = false; _wait=60; _all = false; _npc = _this select 0; if ((count _this) > 1) then {_distance = _this select 1;}; if ((count _this) > 2) then {_patrol = _this select 2;}; if ((count _this) > 3) then {_wait = _this select 3;}; if ((count _this) > 4) then {_all = _this select 4;}; _pos =0; _bld = objnull; _bldpos =0; _cntobjs1=0; _bldunitsin=[]; _units=[]; _blds=[]; //If all soldiers move leader too if (_all) then { _units = (units _npc); }else{ _units = (units _npc) - [_npc]; }; sleep 0.05; { if (_x iskindof "Man" && unitReady _x && _x == vehicle _x && canmove _x && alive _x && canstand _x) then {_bldunitsin = _bldunitsin + [_x]} }foreach _units; if (count _bldunitsin == 0) exitwith {}; //Obtenemos los edificios cercanos al lider _blds = [_npc,_distance] call MON_GetNearestBuildings; if (count _blds==0) exitwith {}; //Movemos a la unidades a los edificios cercanos. [_bldunitsin, _blds, _patrol,_wait,_all] spawn MON_moveBuildings; }; //Function to move al units of squad to near buildings //Parámeters: [_npc,(_patrol,_minfloors)] // <- _units: array of units // <- _blds: array of buildingsinfo [_bld,pos] // <- _patrol: wheter must patrol or not // -> _bldunitsin: array of units moved to builidings MON_moveBuildings = { private ["_npc","_altura","_pos","_bld","_bldpos","_posinfo","_blds","_cntobjs1","_bldunitin","_blddist","_i","_patrol","_wait","_all","_minpos","_blds2"]; _patrol = false; _wait = 60; _minpos = 2; _all = false; _units = _this select 0; _blds = _this select 1; if ((count _this) > 2) then {_patrol = _this select 2;}; if ((count _this) > 3) then {_wait = _this select 3;}; if ((count _this) > 4) then {_all = _this select 4;}; if ((count _this) > 5) then {_minpos = _this select 5;}; _altura = 0; _pos =0; _bld = objnull; _bldpos =0; _cntobjs1=0; _bldunitsin=[]; _movein=[]; _blds2 =[]; //if (KRON_UPS_Debug>0) then {player globalchat format["MON_moveBuildings _units=%1 _blds=%2",count _units, count _blds]; }; //if (KRON_UPS_Debug>0) then {diag_log format["MON_moveBuildings _units=%1 _blds=%2",count _units, count _blds];}; { _bld = _x select 0; _bldpos = _x select 1; if ( _bldpos >= _minpos ) then { _cntobjs1 = 1; _movein = []; _i = 0; if (_patrol) then { if (_bldpos >= 8) then { _cntobjs1 = 2 }; } else { if (_bldpos >= 8) then { _cntobjs1 = round(random 3) + 1;}; }; //Buscamos una unidad cercana para recorrerlo { if (_x iskindof "Man" && unitReady _x && canmove _x && alive _x && vehicle _x == _x && _i < _cntobjs1) then{ _movein = _movein + [_x]; _i = _i + 1; }; } foreach _units; //if (KRON_UPS_Debug>0) then {player globalchat format["_units=%3 _bldunitsin %4 _movein=%1",_movein, typeof _bld, count _units, count _bldunitsin];} //if (KRON_UPS_Debug>0) then {diag_log format["_units=%3 _bldunitsin %4 _movein=%1 %2 %5",_movein, typeof _bld, count _units, count _bldunitsin,_x];}; if (count _movein > 0) then { _bldunitsin = _bldunitsin + _movein; _units = _units - _bldunitsin; if (_patrol) then { { [_x,_bld,_bldpos] spawn MON_patrolBuilding; }foreach _movein; } else { { _altura = floor(random(_bldpos)); if (_altura<2) then {_altura = _minpos}; [_x,_bld,_altura,_wait] spawn MON_movetoBuilding; }foreach _movein; }; }; }; if (count _units == 0) exitwith {}; }foreach _blds; //If need to enter all units in building and rest try with a superior lvl if ( _all && count _units > 0 ) then { _blds2 = []; _minpos = _minpos + 3; { if ( (_x select 1) >= _minpos) then { _blds2 = _blds2 + [_x]; }; }foreach _blds; //if (KRON_UPS_Debug>0) then {player globalchat format["MON_moveBuildings exit _units=%1 _blds=%2",count _units, count _blds2]; }; //if (KRON_UPS_Debug>0) then {diag_log format["MON_moveBuildings exit _units=%1 _blds=%2",count _units, count _blds2];}; if (count _blds2 > 0 ) then { [_units, _blds2, _patrol,_wait,_all,_minpos] call MON_moveBuildings; }; _bldunitsin = _bldunitsin + _units; }; _bldunitsin; }; //Function to move a unit to a position in a building //Parámeters: [_npc,(_patrol,_minfloors)] // <- _npc: soldier // <- _bld: building // <- _altura: building // <- _wait: time to wait in position MON_movetoBuilding = { private ["_npc","_altura","_bld","_wait","_dist","_retry","_soldiers"]; _wait = 60; _timeout = 120; _dist = 0; _retry = false; _npc = _this select 0; _bld = _this select 1; _altura = _this select 2; if ((count _this) > 3) then {_wait = _this select 3;}; //Si está en un vehiculo ignoramos la orden if (vehicle _npc != _npc || !alive _npc || !canmove _npc) exitwith{}; //Si ya está en un edificio ignoramos la orden _inbuilding = _npc getvariable ("UPSMON_inbuilding"); if ( isNil("_inbuilding") ) then {_inbuilding = false;}; if (_inbuilding) exitwith{}; _npc domove (_bld buildingPos _altura); _npc setVariable ["UPSMON_inbuilding", _inbuilding, false]; _npc setvariable ["UPSMON_buildingpos", nil, false]; _timeout = time + _timeout; //if (KRON_UPS_Debug>0) then {player globalchat format["%4|_bld=%1 | %2 | %3",typeof _bld, _npc, typeof _npc ,_altura];}; //if (KRON_UPS_Debug>0) then {diag_log format["%4|_bld=%1 | %2 | %3",typeof _bld, _npc, typeof _npc ,_altura];}; waitUntil {moveToCompleted _npc || moveToFailed _npc || !alive _npc || !canmove _npc || _timeout < time}; if (moveToCompleted _npc && alive _npc && canmove _npc) then { _dist = [position _npc,_bld buildingPos _altura] call KRON_distancePosSqr; _soldiers = [_npc,1] call MON_nearestSoldiers; //If more soldiers in same floor see to keep or goout. if (count _soldiers > 0) then { { if (!isnil{_x getvariable ("UPSMON_buildingpos")}) exitwith {_retry = true}; }foreach _soldiers; }; if (!_retry && _dist <= 2) then { _npc setvariable ["UPSMON_buildingpos", _altura, false]; sleep 0.1; [_npc,_wait] spawn MON_dostop; }; }; if (!alive _npc || !canmove _npc) exitwith{}; _npc setVariable ["UPSMON_inbuilding", false, false]; //Down one position. if (_retry ) then { _altura = _altura + 1; _bldpos = _bld call MON_BldPos; if (_altura <= _bldpos) then { [_npc,_bld,_altura] spawn MON_movetoBuilding; }; }; }; //Función para mover a una unidad al edificio más cercano //Parámeters: [_npc,_bld,(_BldPos)] // <- _npc: soldier to move // <- _bld:building to patrol // <- _BldPos: positions of builiding (optional) MON_patrolBuilding = { private ["_npc","_bld","_bldpos","_posinfo","_minfloors","_OCercanos","_distance","_timeout","_pos","_inbuilding","_rnd","_NearestEnemy","_patrolto","_time"]; _bldpos = 0; _pos = 0; _timeout = 0; _i = 1; _inbuilding = false; _rnd = 0; _patrolto = 0; _NearestEnemy = objnull; _time = 0; _npc = _this select 0; _bld = _this select 1; if ((count _this) > 2) then {_bldpos = _this select 2;} else {_bldpos = _x call MON_BldPos;}; if (_i > _bldpos) then {_i = _bldpos}; _patrolto = round ( 10 + random (_bldpos) ); if (_patrolto > _bldpos) then {_patrolto = _bldpos}; //Si ya está muerto o no se puede mover se ignora if (!(_npc iskindof "Man") || !alive _npc || !canmove _npc) exitwith{}; //Si ya está en un edificio ignoramos la orden _inbuilding = _npc getvariable ("UPSMON_inbuilding"); if ( isNil("_inbuilding") ) then {_inbuilding = false;}; //Asignamos el vehiculo a a la escuadra si contiene las posiciones justas if (!_inbuilding) then { _inbuilding = true; _npc setVariable ["UPSMON_inbuilding", _inbuilding, false]; [_npc,"Middle"] spawn MON_setUnitPos; _timeout = time + 60; //player sidechat format["%1 patrol building %2 from %3 to %4",typeof _npc, typeof _bld,_i, _patrolto]; while { _i <= _patrolto && alive _npc && canmove _npc} do{ _npc domove (_bld buildingPos _i); _time = time + 30; waitUntil {moveToCompleted _npc or moveToFailed _npc or !alive _npc or _time < time}; if (moveToCompleted _npc) then { _timeout = time + 60; _i = _i + 1; } else { if (moveToFailed _npc || !canmove _npc || !alive _npc || _timeout < time) then { //player sidechat format["%1 Cancelando patrulla en %2",_npc, typeof _bld]; _i = _patrolto + 1; }; }; sleep 0.05; }; //Si está en un vehiculo ignoramos la orden if (!alive _npc || !canmove _npc) exitwith{}; //Volvemos con el lider _npc domove (position leader _npc); //Marcamos que ya hemos finalizado sleep 60; //Damos tiempo para salir del edificio _npc setVariable ["UPSMON_inbuilding", false, false]; }; }; //Function to put a mine //Parámeters: [_npc,(_position)] // <- _npc: leader // <- _position:location for mine (optional) MON_CreateMine = { private ["_npc","_rnd","_soldier","_mine","_dir","_position"]; _soldier = _this select 0; if ((count _this) > 1) then {_position = _this select 1;} else {_position = [0,0];}; _mine = objnull; _rnd = 0; _dir = 0; _npc = leader _soldier; if (_soldier == _npc ) then { _rnd = round (random ( count ((units _npc)))); _soldier = (units _npc) select _rnd; }; //leader only control not work //Si está en un vehiculo ignoramos la orden if (!(_x iskindof "Man" ) || _soldier == _npc || _soldier!=vehicle _soldier || !alive _soldier || !canmove _soldier) exitwith {false}; //Animación para montar el arma if ((count _this) > 1) then { [_soldier,_position] spawn MON_doCreateMine; }else{ [_soldier] spawn MON_doCreateMine; }; true; }; MON_doCreateMine = { private ["_npc","_rnd","_soldier","_mine","_dir","_position"]; _position = [0,0]; _soldier = _this select 0; if ((count _this) > 1) then {_position = _this select 1;}; //If not is Man or dead exit if (!(_x iskindof "Man" ) || _soldier!=vehicle _soldier || !alive _soldier || !canmove _soldier) exitwith {false}; _soldier stop false; [_soldier,"AUTO"] spawn MON_setUnitPos; if ((count _this) > 1) then { _soldier domove _position; waituntil {unitReady _soldier || moveToCompleted _soldier || moveToFailed _soldier || !alive _soldier || !canmove _soldier}; }; if (moveToFailed _soldier || !alive _soldier || _soldier != vehicle _soldier || !canmove _soldier) exitwith {false}; //Crouche _soldier playMovenow "ainvpknlmstpslaywrfldnon_1"; sleep 1; if (!alive _soldier || !canmove _soldier) exitwith{}; _dir = getdir _soldier; _position = [position _soldier,_dir, 0.5] call MON_GetPos2D; _mine = createMine ["MineMine", _position , [], 0]; //Prepare mine _soldier playMoveNow "AinvPknlMstpSlayWrflDnon_medic"; sleep 5; //Return to formation _soldier domove position ( leader _soldier ); }; //Function to surrender AI soldier //Parámeters: [_npc] // <- _npc: soldier to surrender MON_surrender = { private ["_npc","_vehicle"]; _npc = _this select 0; if (!alive _npc || !canmove _npc) exitwith {}; _npc addrating -1000; _npc setcaptive true; sleep 0.5; _vehicle = vehicle _npc; if ( _npc != _vehicle || !(_npc iskindof "Man" )) then { _vehicle setcaptive true; if ( "Air" countType [_vehicle]>0) then { //Si acaba de entrar en el heli se define punto de aterrizaje if (_npc == driver _vehicle ) then { [_vehicle] call MON_landHely; }; } else { _npc spawn MON_doGetOut; }; //Esperamos a que esté parado waituntil {_npc == vehicle _npc || !alive _npc}; }; if (!alive _npc || !canmove _npc) exitwith {}; _npc setcaptive true; _npc stop true; [_npc,"UP"] call MON_setUnitPos; removeAllWeapons _npc; sleep 1; _npc playMoveNow "AmovPercMstpSnonWnonDnon_AmovPercMstpSsurWnonDnon"; }; //Returns leader if was dead MON_getleader = { private ["_npc","_members"]; _npc = _this select 0; _members = _this select 1; sleep 0.05; if (!alive _npc ) then { //takes commder a soldier not in vehicle { if (alive _x && canmove _x && _x == vehicle _x && !isplayer _x) exitwith { _npc = _x; }; }foreach _members; //if no soldier out of vehicle takes any if (!alive _npc ) then { { if (alive _x && canmove _x) exitwith {_npc = _x;}; }foreach _members; }; //If not alive or already leader or is player exits if (isPlayer _npc || !alive _npc || !canmove _npc ) then { { if (alive _x && !isPlayer _x) exitwith {_npc = [_npc, _members] call MON_getleader;}; }foreach _members; _npc; }; if (leader _npc == _npc) exitwith {_npc}; //Set new _npc as leader group _npc selectLeader _npc; }; _npc; }; MON_ACE_Watersurvival = { private ["_lb","_pos","_ejector","_in","_grpid","_rnd"]; _in =[]; _rnd = 0; _ejector = _this select 0; //if (KRON_UPS_Debug>0) then {player globalchat format["MON_ACE_Watersurvival %1",typeof _ejector]}; waitUntil { !canmove _ejector || !alive _ejector || isnull (_ejector) || ((getPos vehicle _ejector) select 2 < 1) }; if ( !surfaceIsWater (getpos _ejector) || !canmove _ejector || !alive _ejector || isnull (_ejector) ) exitWith {}; //Miramos de entrar en un barco cercano _grpid = _ejector getvariable "UPSMON_grpid"; if (isnil "_grpid") then {_grpid = 0}; _in = [_grpid,_ejector,30] call MON_GetIn_NearestBoat; //If no boat near creates a zodiac if (count _in <= 0) then { if (!(isNil "ace_main")) then { _lb = "ACE_Lifeboat_US" createVehicle getposASL _ejector; }else{ _lb = "Zodiac" createVehicle getposASL _ejector; }; _pos = getposASL _ejector; _pos set [0, ((_pos select 0) + 2)]; _pos set [1, ((_pos select 1) + 2)]; //_pos set [2, 0]; _lb setPos _pos; //Moves in boat if !(isPlayer _ejector) then { [_ejector,_lb,0] call MON_assignasdriver; }; }; //Wait until reached eart waitUntil { !canmove _ejector || !alive _ejector || isnull (_ejector) || !surfaceIsWater (position _ejector) }; if (KRON_UPS_Debug>0) then {player globalchat format["Exit from boat%1",typeof _lb]}; _ejector spawn MON_dogetout; }; //Function to do artillery //Parámeters: [_position,(_rounds,_area,_cadence,_mincadence)] // <- _position: center of fire create artillery // <- _rounds: rounds of fire // <- _area: Dispersion area // <- _maxcadence: Cadence of fire, is random between min // <- _mincadence: Minimum cadence // <- _bullet: class of bullet to fire, default ARTY_Sh_81_HE MON_artillery_dofire = { if (!isserver) exitWith {}; private ["_smoke1","_i","_area","_position","_maxcadence","_mincadence","_sleep","_rounds"]; _area = 150; _maxcadence = 10; _mincadence = 5; _sleep = 0; _rounds = 5; _bullet = "ARTY_Sh_81_HE"; _position =[]; //_bullet = "ARTY_Sh_105_HE"; //_bullet = "ARTY_Sh_122_HE"; _position = _this select 0; if ((count _this) > 1) then {_rounds = _this select 1;}; if ((count _this) > 2) then {_area = _this select 2;}; if ((count _this) > 3) then {_maxcadence = _this select 3;}; if ((count _this) > 4) then {_mincadence = _this select 4;}; if ((count _this) > 5) then {_bullet = _this select 5;}; _area2 = _area * 2; if (KRON_UPS_Debug>0) then {player globalchat format["artillery doing fire on %1",_position]}; for [{_i=0}, {_i<_rounds}, {_i=_i+1}] do { _sleep = random _maxcadence; if (_sleep < _mincadence) then {_sleep = _mincadence}; sleep _sleep; _smoke1 = _bullet createVehicle [(_position select 0)+ random _area2 - _area, (_position select 1)+ random _area2 - _area, (_position select 2)+ 20]; }; }; //Función que devuelve un array con los vehiculos terrestres más cercanos //Parámeters: [_npc,_distance] // <- _npc: object for position search // <- _distance: max distance from npc // -> _vehicles: array of vehicles MON_deadbodies = { private["_vehicles","_npc","_bodies","_OCercanos","_distance","_side"]; _npc = _this select 0; _distance = _this select 1; //_side = _this select 2; _OCercanos = []; _bodies = []; //Buscamos objetos cercanos _OCercanos = nearestObjects [_npc, ["Man"] , _distance]; { if (_npc knowsabout _x >0.5 && (!canmove _x || !alive _x)) then { _bodies = _bodies + [_x];}; }foreach _OCercanos; _bodies; }; //Función que devuelve un array con los vehiculos terrestres más cercanos //Parámeters: [_npc,_distance] // <- _npc: object for position search // <- _distance: max distance from npc // -> _vehicles: array of vehicles MON_nearestSoldiers = { private["_vehicles","_npc","_soldiers","_OCercanos","_distance","_side"]; _npc = _this select 0; _distance = _this select 1; if (isnull _npc) exitwith {}; _OCercanos = []; _soldiers = []; //Buscamos objetos cercanos _OCercanos = nearestObjects [_npc, ["Man"] , _distance]; _OCercanos = _OCercanos - [_npc]; { if ( alive _x && canmove _x ) then { _soldiers = _soldiers + [_x];}; }foreach _OCercanos; _soldiers; }; /* ===================================================================================================== MON_spawn.sqf Author: Monsada (chs.monsada@gmail.com) Comunidad Hispana de Simulación: http://www.simulacion-esp.com ===================================================================================================== Parámeters: [_artillery,(_range,_rounds,_area,_cadence,_mincadence)] execvm "scripts\UPSMON\MON_artillery_add.sqf"; <- _artillery object to attach artillery script, must be an object with gunner. <- ( _rounds ) rounds to fire each time, default 1 <- ( _range ) range of artillery, default 800 <- ( _area ) Dispersion area, 150m by default <- ( _maxcadence ) Cadence of fire, is random between min, default 10s <- ( _mincadence ) Minimum cadence, default 5s <- ( _bullet ) Class of bullet to fire, default ARTY_Sh_81_HE ===================================================================================================== 1. Place a static weapon on map. 2. Exec module in int of static weapon nul=[this] execVM "scripts\UPSMON\MON_artillery_add.sqf"; 1. Be sure static weapon has a gunner or place a "fortify" squad near, this will make squad to take static weapon. 2. Create a trigger in your mission for setting when to fire. Set side artillery variable to true: KRON_UPS_ARTILLERY_EAST_FIRE = true; This sample will do east artilleries to fire on known enemies position, when you want to stop fire set to false. For more info: http://dev-heaven.net/projects/upsmon/wiki/Artillery_module =====================================================================================================*/ if (!isserver) exitWith {}; //Waits until UPSMON is init waitUntil {!isNil("KRON_UPS_INIT")}; waitUntil {KRON_UPS_INIT==1}; private ["_artillery","_smoke1","_i","_area","_position","_maxcadence","_mincadence","_sleep","_rounds"]; _range = 800; _area = 150; _maxcadence = 10; _mincadence = 5; _sleep = 0; _rounds = 1; _bullet = "ARTY_Sh_81_HE"; _vector =[]; _artillery = _this select 0; //if (KRON_UPS_Debug>0) then {player globalchat format["MON_artillery_add before %1 %2 %3",isnull _artillery,alive _artillery]}; if (isnull _artillery || !alive _artillery) exitwith{}; if ((count _this) > 1) then {_rounds = _this select 1;}; if ((count _this) > 2) then {_range = _this select 2;}; if ((count _this) > 3) then {_area = _this select 3;}; if ((count _this) > 4) then {_maxcadence = _this select 4;}; if ((count _this) > 5) then {_mincadence = _this select 5;}; if ((count _this) > 6) then {_bullet = _this select 6;}; //Add artillery to array of artilleries _vector = [_artillery,_rounds,_range,_area,_maxcadence,_mincadence,_bullet]; if (isnil "KRON_UPS_ARTILLERY_UNITS" ) then {KRON_UPS_ARTILLERY_UNITS = []}; KRON_UPS_ARTILLERY_UNITS = KRON_UPS_ARTILLERY_UNITS + [_vector]; if (true) exitwith{}; /* ===================================================================================================== MON_spawn.sqf Author: Monsada (chs.monsada@gmail.com) Comunidad Hispana de Simulación: http://www.simulacion-esp.com ===================================================================================================== Parámeters: [Param1,Param2,Param3,[Param4]] EXECVM "SCRIPTS\UPSMON\MON_SPAWN.SQF"; <- Param1 Id of the template to copy. <- Param2 Position to create new squad. <- Param3 Nº of squads to create <- Param4 Array of parameters of UPSMON, first must be name of marc to patrol ===================================================================================================== Function that allows to spawn UPSMON squads. 1- create a squad in editor. Exec UPSMON and set TEMPLATE id, this will save members of squad, not equipement. nul = [this,"town","TEMPLATE:",1] execVM "scripts\upsmon.sqf"; 2- Exec MON_spawn on trigger or where you want telling the copy of the template to create and the position. nul = [1,[0,0,0],3,[mark, upsmon optional params]] EXECVM "SCRIPTS\UPSMON\MON_SPAWN.SQF"; =====================================================================================================*/ if (!isserver) exitWith {}; //Waits until UPSMON is init waitUntil {!isNil("KRON_UPS_INIT")}; waitUntil {KRON_UPS_INIT==1}; private ["_template","_position","_params","_copies","_membertypes","_unittype","_side","_UCthis","_initstr","_grp","_lead","_newunit","_i","_newpos","_vehicle","_initlstr"]; //Parameter reading _template = _this select 0; _position = _this select 1; _copies = _this select 2; _params = _this select 3; //Initialization _membertypes = []; _side = ""; _UCthis = []; _initstr = ""; _initlstr = ""; _grp = grpnull; _lead = objnull; _newunit = objnull; _newpos=[]; _vehicle=[]; //Gets parameters of UPSMON for [{_i=0},{_i0) then {player globalchat format["Spawning %3 copies of template %1",_template,_position,_copies,count KRON_UPS_TEMPLATES]}; //if (KRON_UPS_Debug>0) then {diag_log format["Spawning %3 copies of template %1 on %2 templates %4",_template,_position,_copies,count KRON_UPS_TEMPLATES]}; //Search if any template { if ((_x select 0) == _template) then { _side = _x select 1; _membertypes = _x select 2; _vehicletypes = _x select 3; //Gets leader type _unittype= _membertypes select 0; //if (KRON_UPS_Debug>0) then {player globalchat format["template %1:%2 ",_template,_membertypes]}; for [{_i=1},{_i<=_copies},{_i=_i+1}] do { // make the clones civilians // use random Civilian models for single unit groups if ((_unittype=="Civilian") && (count _members==1)) then {_rnd=1+round(random 20); if (_rnd>1) then {_unittype=format["Civilian%1",_rnd]}}; _grp=createGroup _side; _lead = _grp createUnit [_unittype, _position, [], 0, "form"]; _lead setVehicleInit _initlstr; [_lead] join _grp; _grp selectLeader _lead; sleep 1; // copy team members (skip the leader) _c=0; { _c=_c+1; if (_c>1) then { _newpos = _position findEmptyPosition [10, 200]; sleep .4; if (count _newpos <= 0) then {_newpos = _position}; _newunit = _grp createUnit [_x, _newpos, [],0,"form"]; _newunit setVehicleInit _initstr; [_newunit] join _grp; }; } foreach _membertypes; { _newpos = _position findEmptyPosition [10, 200]; sleep .4; if (count _newpos <= 0) then {_newpos = _position}; _newunit = _x createvehicle (_newpos); } foreach _vehicletypes; //Set new parameters _params = [_lead] + _UCthis; //Exec UPSMON script _params SPAWN UPSMON; processInitCommands; }; }; }foreach KRON_UPS_TEMPLATES; if (true) exitwith{}; // ========================================================================================================= // Script for adding the action of follow player. // Version: 1.0 // Author: Monsada (smirall@hotmail.com) // --------------------------------------------------------------------------------------------------------- private ["_side","_soldiers"]; _side = _this select 0; _soldiers = switch (_side) do { case west: {KRON_AllWest}; case east: {KRON_AllEast}; case resistance: {KRON_AllRes}; }; { if ( leader _x == _x ) then { _x addaction ["Order your men to follow me", "scripts\UPSMON\actions\followme.sqf", [], 1, false]; } else { _x addaction ["Follow me", "scripts\UPSMON\actions\followme.sqf", [], 1, false]; }; }foreach _soldiers; if (true) exitWith {}; _leader = _this select 3 select 0; _object = _this select 3 select 1; _actions = _this select 3 select 2; player setPos[ getPos _leader select 0, (getPos _leader select 1) + 1.5 ]; [[],[],[],[_object, _actions]] execVM "teleport_remove.sqf";ÿþ//_unitCount = count units group player; //_players = units group player; _players = playableUnits; _unitCount = count playableUnits; _actions = []; (_this select 0) removeAction ateleport; for [{_x=0},{_x<_unitCount},{_x=_x+1}] do { if((_players select _x) != player) then { _action = (_this select 0) addAction["> " + (name (_players select _x)), "teleport.sqf", [(_players select _x), (_this select 0), _actions] ]; _actions set[_x, _action]; }; }; _removeAction = (_this select 0) addAction["B<5=0", "teleport_remove.sqf", [(_this select 0), _actions] ]; _actions set[count _actions, _removeAction]; ÿþ_object = _this select 3 select 0; _actions = _this select 3 select 1; for [{_x=0},{_x< count _actions},{_x=_x+1}] do { _object removeAction (_actions select _x); }; ateleport = _object addAction["KAB@>5 ?5@5<5I5=85", "teleport_init.sqf"];if ((!isServer) && (player != player)) then { waitUntil {player == player}; }; //Init UPSMON scritp (must be run on all clients) call compile preprocessFileLineNumbers "scripts\Init_UPSMON.sqf"; //Process statements stored using setVehicleInit processInitCommands; //Finish world initialization before mission is launched. finishMissionInit;RÇËý^‚iM‡{w¥äçғ\