sreVbriefing.htmlLJpbriefing.sqfLJdescription.extLJinit.sqfLJmission.sqmDLJqscripts\vehspawn.sqfLJspect\common.hppLJspect\f_waitForJIP.sqfLJYspect\specta.sqfLJspect\spectating.hppLJ%spect\specta_events.sqfLJu8spect\specta_init.sqfLJUPS.sqfLJ*w Title

Mission accomplished


Good work!


player createDiaryRecord["Diary", ["Briefing", "Your mission is to destroy several enemy camps and vehicles."]]; objekti_1 = player createSimpleTask["Destroy AA radar"]; objekti_2 = player createSimpleTask["Destroy AA vehicle"]; objekti_3 = player createSimpleTask["Destroy HQ Vehicle"]; objekti_4 = player createSimpleTask["Destroy Artillery Barrage"]; objekti_5 = player createSimpleTask["Destroy Airplanes"]; objekti_6 = player createSimpleTask["Destroy Supply vehicles"]; objekti_7 = player createSimpleTask["Defend your HQ Vehicle"]; objekti_1 setSimpleTaskDescription[""]; objekti_2 setSimpleTaskDescription[""]; objekti_3 setSimpleTaskDescription[""]; objekti_4 setSimpleTaskDescription[""]; objekti_5 setSimpleTaskDescription[""]; objekti_6 setSimpleTaskDescription[""]; objekti_7 setSimpleTaskDescription["Your HQ Vehicle must not be destroyed or your mission is a failure."]; objekti_1 setSimpleTaskDestination (getMarkerPos "obj1m"); objekti_2 setSimpleTaskDestination (getMarkerPos "obj2m"); objekti_3 setSimpleTaskDestination (getMarkerPos "obj3m"); objekti_4 setSimpleTaskDestination (getMarkerPos "obj4m"); objekti_5 setSimpleTaskDestination (getMarkerPos "obj5m"); objekti_6 setSimpleTaskDestination (getMarkerPos "obj6m");onLoadMission="co 21 Morning Star - Day1."; onLoadIntroTime = false; onLoadMissionTime = false; class Header { gameType = Coop; //DM, Team, Coop, ... minPlayers = 1; //min # of players the mission supports maxPlayers = 21; //Max # of players the mission supports }; respawn = BASE; respawndelay = 20; disabledAI = 1; #include "spect\spectating.hpp"setViewDistance 2000; enableEnvironment false; execVM "briefing.sqf"; X_INIT = false; X_Server = false; X_Client = false; X_JIP = false;X_SPE = false; X_MP = isMultiplayer; if (isServer) then { X_Server = true; if (!(isNull player)) then {X_Client = true;X_SPE = true;}; X_INIT = true; } else { X_Client = true; if (isNull player) then { X_JIP = true; [] spawn {waitUntil {!(isNull player)};X_INIT = true}; } else { X_INIT = true; }; };version=11; class Mission { addOns[]= { "cacharacters2", "chernarus", "ca_highcommand", "BI_SRRS", "ca_missions_firstaidsystem", "ca_missions_battlefieldclearance", "ca_missions_alternativeinjurysimulation", "CAWheeled2_MTVR", "CAWheeled2_HMMWV_Ambulance", "CAWheeled", "camisc3", "CAAir2_UH1Y", "CAAir", "caweapons_ammoboxes", "CAMisc", "CABuildings", "CATracked2_2S6M_Tunguska", "CAWheeled2_BTR90", "caweapons", "CAWheeled2_Kamaz", "CAAir3_Su34", "CAWheeled2_GAZ39371", "cawheeled2_m1114_armored", "ca_modules_silvie", "CAWheeled2_LAV25", "CATracked2_T90", "CATracked2_BMP3", "cadata" }; addOnsAuto[]= { "cacharacters2", "ca_highcommand", "ca_modules_silvie", "CAWheeled", "CATracked2_T90", "CAWheeled2_BTR90", "CATracked2_BMP3", "CAWheeled2_MTVR", "CAWheeled2_HMMWV_Ambulance", "camisc3", "CAAir2_UH1Y", "CAAir", "caweapons_ammoboxes", "CAMisc", "CABuildings", "CATracked2_2S6M_Tunguska", "caweapons", "CAWheeled2_Kamaz", "CAAir3_Su34", "CAWheeled2_GAZ39371", "cawheeled2_m1114_armored", "CAWheeled2_LAV25", "cadata", "chernarus" }; randomSeed=7103449; class Intel { briefingName="co 21 morning star day1"; briefingDescription="Mission by Karko"; resistanceWest=0; startWeather=0.2500177; forecastWeather=0.26248759; year=2009; month=8; day=14; hour=6; }; class Groups { items=34; class Item0 { side="EAST"; class Vehicles { items=5; class Item0 { position[]={1780.9669,6.1645036,2106.936}; azimut=-176.886; special="FLY"; id=0; side="EAST"; vehicle="RU_Soldier_SL"; leader=1; rank="SERGEANT"; skill=0.2; init="nul=[this,""kamenka1"",""random"",""trigger""] execVM ""ups.sqf"""; }; class Item1 { position[]={1780.8724,6.2202787,2102.4153}; azimut=-176.886; special="FLY"; id=1; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item2 { position[]={1786.8822,6.2634964,2102.2119}; azimut=-176.886; special="FLY"; id=2; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item3 { position[]={1783.8583,6.2442608,2102.217}; azimut=-176.886; special="FLY"; id=3; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item4 { position[]={1789.396,6.2776504,2102.1497}; azimut=-176.886; special="FLY"; id=4; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; }; }; class Item1 { side="EAST"; class Vehicles { items=5; class Item0 { position[]={1761.7952,6.0936694,2107.1941}; azimut=-176.886; special="FLY"; id=5; side="EAST"; vehicle="RU_Soldier_SL"; leader=1; rank="SERGEANT"; skill=0.2; init="nul=[this,""kamenka1"",""random"",""trigger""] execVM ""ups.sqf"""; }; class Item1 { position[]={1761.7007,6.1479197,2102.6733}; azimut=-176.886; special="FLY"; id=6; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item2 { position[]={1767.7104,6.1640124,2102.47}; azimut=-176.886; special="FLY"; id=7; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item3 { position[]={1764.6865,6.1561294,2102.4751}; azimut=-176.886; special="FLY"; id=8; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item4 { position[]={1770.2242,6.1687927,2102.4077}; azimut=-176.886; special="FLY"; id=9; side="EAST"; vehicle="RU_Soldier_AT"; skill=0.2; }; }; }; class Item2 { side="EAST"; class Vehicles { items=5; class Item0 { position[]={1763.6086,5.921339,2121.4434}; azimut=-176.886; special="FLY"; id=10; side="EAST"; vehicle="RU_Soldier_SL"; leader=1; rank="SERGEANT"; skill=0.2; init="nul=[this,""kamenka1"",""random"",""trigger""] execVM ""ups.sqf"""; }; class Item1 { position[]={1763.5142,5.969492,2116.9226}; azimut=-176.886; special="FLY"; id=11; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item2 { position[]={1769.5239,5.9733176,2116.7192}; azimut=-176.886; special="FLY"; id=12; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item3 { position[]={1766.5,5.9716063,2116.7244}; azimut=-176.886; special="FLY"; id=13; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item4 { position[]={1772.0377,5.9799681,2116.657}; azimut=-176.886; special="FLY"; id=14; side="EAST"; vehicle="RU_Soldier_AA"; skill=0.2; }; }; }; class Item3 { side="EAST"; class Vehicles { items=5; class Item0 { position[]={1782.5216,5.9819837,2121.7024}; azimut=-176.886; special="FLY"; id=15; side="EAST"; vehicle="RU_Soldier_SL"; leader=1; rank="SERGEANT"; skill=0.2; init="nul=[this,""kamenka1"",""random"",""trigger""] execVM ""ups.sqf"""; }; class Item1 { position[]={1782.4271,6.0290556,2117.1816}; azimut=-176.886; special="FLY"; id=16; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item2 { position[]={1788.4369,6.0718098,2116.9783}; azimut=-176.886; special="FLY"; id=17; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item3 { position[]={1785.413,6.0515962,2116.9834}; azimut=-176.886; special="FLY"; id=18; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item4 { position[]={1790.9507,6.087275,2116.916}; azimut=-176.886; special="FLY"; id=19; side="EAST"; vehicle="RU_Soldier_MG"; skill=0.2; }; }; }; class Item4 { side="WEST"; class Vehicles { items=8; class Item0 { position[]={1772.2325,155.97313,5112.5269}; azimut=-176.886; id=29; side="WEST"; vehicle="USMC_Soldier_SL"; player="PLAY CDG"; leader=1; rank="SERGEANT"; skill=0.2; description="Bravo Squad Leader (Sgt.)"; synchronizations[]={43}; }; class Item1 { position[]={1773.1813,155.96104,5110.9312}; azimut=-176.886; id=30; side="WEST"; vehicle="USMC_Soldier_TL"; player="PLAY CDG"; rank="CORPORAL"; skill=0.2; description="Fire Team Leader (Cpl.)"; }; class Item2 { position[]={1772.0314,155.85046,5110.2563}; azimut=-176.886; id=31; side="WEST"; vehicle="USMC_Soldier_AR"; player="PLAY CDG"; skill=0.2; }; class Item3 { position[]={1773.0026,155.87273,5109.3447}; azimut=-176.886; id=32; side="WEST"; vehicle="USMC_Soldier"; player="PLAY CDG"; skill=0.2; }; class Item4 { position[]={1771.9869,155.75093,5108.2461}; azimut=-176.886; id=33; side="WEST"; vehicle="USMC_Soldier"; player="PLAY CDG"; skill=0.2; }; class Item5 { position[]={1773.0699,155.7834,5107.1904}; azimut=-176.886; id=34; side="WEST"; vehicle="USMC_Soldier"; player="PLAY CDG"; skill=0.2; }; class Item6 { position[]={1771.9572,155.69283,5106.3301}; azimut=-176.886; id=35; side="WEST"; vehicle="USMC_Soldier"; player="PLAY CDG"; skill=0.2; }; class Item7 { position[]={1772.9586,155.73924,5105.0801}; azimut=-176.886; id=36; side="WEST"; vehicle="USMC_Soldier_Medic"; player="PLAY CDG"; skill=0.2; description="Medic"; }; }; }; class Item5 { side="WEST"; class Vehicles { items=4; class Item0 { position[]={1781.5288,156.47383,5112.5796}; azimut=-176.886; id=40; side="WEST"; vehicle="USMC_Soldier_SL"; player="PLAY CDG"; leader=1; rank="SERGEANT"; skill=0.2; description="Support Squad Leader (Sgt.)"; synchronizations[]={44}; }; class Item1 { position[]={1780.8394,156.43169,5111.6855}; azimut=-176.886; id=39; side="WEST"; vehicle="USMC_Soldier_GL"; player="PLAY CDG"; rank="SERGEANT"; skill=0.2; }; class Item2 { position[]={1781.4819,156.45601,5111.6558}; azimut=-176.886; id=38; side="WEST"; vehicle="USMC_SoldierS_SniperH"; player="PLAY CDG"; rank="CORPORAL"; skill=0.2; }; class Item3 { position[]={1782.1377,156.48105,5111.6377}; azimut=-176.886; id=37; side="WEST"; vehicle="USMC_Soldier_Pilot"; player="PLAY CDG"; rank="CORPORAL"; skill=0.2; }; }; }; class Item6 { side="WEST"; class Vehicles { items=8; class Item0 { position[]={1761.4773,155.27101,5112.8179}; azimut=-176.886; id=21; side="WEST"; vehicle="USMC_Soldier_SL"; player="PLAY CDG"; leader=1; rank="SERGEANT"; skill=0.2; description="Alpha Squad Leader (Sgt.)"; synchronizations[]={42}; }; class Item1 { position[]={1762.426,155.29378,5111.2222}; azimut=-176.886; id=22; side="WEST"; vehicle="USMC_Soldier_TL"; player="PLAY CDG"; rank="CORPORAL"; skill=0.2; description="Fire Team Leader (Cpl.)"; }; class Item2 { position[]={1761.2761,155.18965,5110.5474}; azimut=-176.886; id=23; side="WEST"; vehicle="USMC_Soldier_AR"; player="PLAY CDG"; skill=0.2; }; class Item3 { position[]={1762.2478,155.23416,5109.6357}; azimut=-176.886; id=24; side="WEST"; vehicle="USMC_Soldier"; player="PLAY CDG"; skill=0.2; }; class Item4 { position[]={1761.2322,155.12715,5108.5371}; azimut=-176.886; id=25; side="WEST"; vehicle="USMC_Soldier"; player="PLAY CDG"; skill=0.2; }; class Item5 { position[]={1762.3152,155.17552,5107.4814}; azimut=-176.886; id=26; side="WEST"; vehicle="USMC_Soldier"; player="PLAY CDG"; skill=0.2; }; class Item6 { position[]={1761.2019,155.0603,5106.6211}; azimut=-176.886; id=27; side="WEST"; vehicle="USMC_Soldier"; player="PLAY CDG"; skill=0.2; }; class Item7 { position[]={1762.2039,155.08844,5105.3716}; azimut=-176.886; id=28; side="WEST"; vehicle="USMC_Soldier_Medic"; player="PLAY CDG"; skill=0.2; description="Medic"; }; }; }; class Item7 { side="LOGIC"; class Vehicles { items=1; class Item0 { position[]={1760.0818,155.71747,5128.5098}; id=42; side="LOGIC"; vehicle="HighCommandSubordinate"; leader=1; skill=0.60000002; synchronizations[]={21,41}; }; }; }; class Item8 { side="LOGIC"; class Vehicles { items=1; class Item0 { position[]={1772.1549,156.4559,5128.4771}; id=43; side="LOGIC"; vehicle="HighCommandSubordinate"; leader=1; skill=0.60000002; synchronizations[]={29,41}; }; }; }; class Item9 { side="LOGIC"; class Vehicles { items=1; class Item0 { position[]={1784.9678,156.97475,5127.8662}; id=44; side="LOGIC"; vehicle="HighCommandSubordinate"; leader=1; skill=0.60000002; synchronizations[]={40,41}; }; }; }; class Item10 { side="WEST"; class Vehicles { items=1; class Item0 { position[]={1773.0277,157.01488,5141.9077}; azimut=-176.886; id=20; side="WEST"; vehicle="USMC_Soldier_Officer"; player="PLAYER COMMANDER"; leader=1; rank="CAPTAIN"; skill=0.2; description="Company CO. (Capt.)"; synchronizations[]={41}; }; }; }; class Item11 { side="LOGIC"; class Vehicles { items=1; class Item0 { position[]={1772.8848,157.7659,5155.0977}; id=41; side="LOGIC"; vehicle="HighCommand"; leader=1; skill=0.60000002; synchronizations[]={20,42,43,44}; }; }; }; class Item12 { side="EAST"; class Vehicles { items=5; class Item0 { position[]={1740.9517,6.0555992,2109.5332}; azimut=-176.886; special="FLY"; id=97; side="EAST"; vehicle="RU_Soldier_SL"; leader=1; rank="SERGEANT"; skill=0.2; init="nul=[this,""kamenka1"",""random"",""trigger""] execVM ""ups.sqf"""; }; class Item1 { position[]={1740.8572,6.107676,2105.0125}; azimut=-176.886; special="FLY"; id=98; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item2 { position[]={1746.8669,6.112289,2104.8091}; azimut=-176.886; special="FLY"; id=99; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item3 { position[]={1743.843,6.1122284,2104.8142}; azimut=-176.886; special="FLY"; id=100; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item4 { position[]={1749.3807,6.1130357,2104.7468}; azimut=-176.886; special="FLY"; id=101; side="EAST"; vehicle="RU_Soldier_AA"; skill=0.2; }; }; }; class Item13 { side="EAST"; class Vehicles { items=5; class Item0 { position[]={1742.7651,5.8811879,2123.7825}; azimut=-176.886; special="FLY"; id=102; side="EAST"; vehicle="RU_Soldier_SL"; leader=1; rank="SERGEANT"; skill=0.2; init="nul=[this,""kamenka1"",""random"",""trigger""] execVM ""ups.sqf"""; }; class Item1 { position[]={1742.6707,5.9388585,2119.2617}; azimut=-176.886; special="FLY"; id=103; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item2 { position[]={1748.6804,5.9412975,2119.0583}; azimut=-176.886; special="FLY"; id=104; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item3 { position[]={1745.6565,5.941237,2119.0635}; azimut=-176.886; special="FLY"; id=105; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item4 { position[]={1751.1942,5.9420447,2118.9961}; azimut=-176.886; special="FLY"; id=106; side="EAST"; vehicle="RU_Soldier_AA"; skill=0.2; }; }; }; class Item14 { side="EAST"; class Vehicles { items=5; class Item0 { position[]={3350.7292,6,2247.165}; azimut=-176.886; special="FLY"; id=107; side="EAST"; vehicle="RU_Soldier_SL"; leader=1; rank="SERGEANT"; skill=0.2; init="nul=[this,""komarovo"",""random"",""trigger""] execVM ""ups.sqf"""; }; class Item1 { position[]={3350.6345,6,2242.6445}; azimut=-176.886; special="FLY"; id=108; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item2 { position[]={3356.6443,6.078464,2242.4409}; azimut=-176.886; special="FLY"; id=109; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item3 { position[]={3353.6204,6.0219178,2242.4463}; azimut=-176.886; special="FLY"; id=110; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item4 { position[]={3359.1582,6.1265502,2242.3789}; azimut=-176.886; special="FLY"; id=111; side="EAST"; vehicle="RU_Soldier_AA"; skill=0.2; }; }; }; class Item15 { side="EAST"; class Vehicles { items=5; class Item0 { position[]={3371.3416,6.2228546,2227.5869}; azimut=-176.886; special="FLY"; id=112; side="EAST"; vehicle="RU_Soldier_SL"; leader=1; rank="SERGEANT"; skill=0.2; init="nul=[this,""kamenka1"",""random""""trigger""] execVM ""ups.sqf"""; }; class Item1 { position[]={3371.2468,6.2564244,2223.0662}; azimut=-176.886; special="FLY"; id=113; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item2 { position[]={3377.2566,6.1838331,2222.8628}; azimut=-176.886; special="FLY"; id=114; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item3 { position[]={3374.2327,6.2200861,2222.8679}; azimut=-176.886; special="FLY"; id=115; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item4 { position[]={3379.7705,6.1541772,2222.8005}; azimut=-176.886; special="FLY"; id=116; side="EAST"; vehicle="RU_Soldier_MG"; skill=0.2; }; }; }; class Item16 { side="EAST"; class Vehicles { items=5; class Item0 { position[]={3410.2275,6.0060596,2207.6428}; azimut=-176.886; special="FLY"; id=117; side="EAST"; vehicle="RU_Soldier_SL"; leader=1; rank="SERGEANT"; skill=0.2; init="nul=[this,""kamenka1"",""random"",""trigger""] execVM ""ups.sqf"""; }; class Item1 { position[]={3410.1328,6.0063124,2203.1221}; azimut=-176.886; special="FLY"; id=118; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item2 { position[]={3416.1426,5.9944501,2202.9187}; azimut=-176.886; special="FLY"; id=119; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item3 { position[]={3413.1187,5.9983497,2202.9238}; azimut=-176.886; special="FLY"; id=120; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item4 { position[]={3418.6565,5.9942842,2202.8564}; azimut=-176.886; special="FLY"; id=121; side="EAST"; vehicle="RU_Soldier_AT"; skill=0.2; }; }; }; class Item17 { side="EAST"; class Vehicles { items=5; class Item0 { position[]={3410.561,5.9974384,2195.5698}; azimut=-176.886; special="FLY"; id=122; side="EAST"; vehicle="RU_Soldier_SL"; leader=1; rank="SERGEANT"; skill=0.2; init="nul=[this,""kamenka1"",""random"",""trigger""] execVM ""ups.sqf"""; }; class Item1 { position[]={3410.4663,5.9855094,2191.0491}; azimut=-176.886; special="FLY"; id=123; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item2 { position[]={3416.4761,5.9716516,2190.8457}; azimut=-176.886; special="FLY"; id=124; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item3 { position[]={3413.4521,5.9797297,2190.8508}; azimut=-176.886; special="FLY"; id=125; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item4 { position[]={3418.99,5.9647822,2190.7834}; azimut=-176.886; special="FLY"; id=126; side="EAST"; vehicle="RU_Soldier_AT"; skill=0.2; }; }; }; class Item18 { side="EAST"; class Vehicles { items=5; class Item0 { position[]={3371.2056,6.2940488,2216.8496}; azimut=-176.886; special="FLY"; id=127; side="EAST"; vehicle="RU_Soldier_SL"; leader=1; rank="SERGEANT"; skill=0.2; init="nul=[this,""kamenka1"",""random"",""trigger""] execVM ""ups.sqf"""; }; class Item1 { position[]={3371.1108,6.311995,2212.3289}; azimut=-176.886; special="FLY"; id=128; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item2 { position[]={3377.1206,6.224051,2212.1255}; azimut=-176.886; special="FLY"; id=129; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item3 { position[]={3374.0967,6.2639585,2212.1306}; azimut=-176.886; special="FLY"; id=130; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item4 { position[]={3379.6345,6.1938024,2212.0632}; azimut=-176.886; special="FLY"; id=131; side="EAST"; vehicle="RU_Soldier_MG"; skill=0.2; }; }; }; class Item19 { side="EAST"; class Vehicles { items=5; class Item0 { position[]={3370.1689,6.3176584,2205.2744}; azimut=-176.886; special="FLY"; id=132; side="EAST"; vehicle="RU_Soldier_SL"; leader=1; rank="SERGEANT"; skill=0.2; init="nul=[this,""kamenka1"",""random"",""trigger""] execVM ""ups.sqf"""; }; class Item1 { position[]={3370.0742,6.2983909,2200.7537}; azimut=-176.886; special="FLY"; id=133; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item2 { position[]={3376.084,6.2047033,2200.5503}; azimut=-176.886; special="FLY"; id=134; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item3 { position[]={3373.0601,6.2473326,2200.5554}; azimut=-176.886; special="FLY"; id=135; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item4 { position[]={3378.5979,6.177557,2200.488}; azimut=-176.886; special="FLY"; id=136; side="EAST"; vehicle="RU_Soldier_MG"; skill=0.2; }; }; }; class Item20 { side="EAST"; class Vehicles { items=5; class Item0 { position[]={4600.4966,5.9360242,2287.4541}; azimut=-176.886; special="FLY"; id=148; side="EAST"; vehicle="RU_Soldier_SL"; leader=1; rank="SERGEANT"; skill=0.2; init="nul=[this,""balota"",""random"",""trigger""] execVM ""ups.sqf"""; }; class Item1 { position[]={4600.4019,5.9279079,2282.9336}; azimut=-176.886; special="FLY"; id=149; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item2 { position[]={4606.4116,5.9188232,2282.73}; azimut=-176.886; special="FLY"; id=150; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item3 { position[]={4603.3882,5.9128942,2282.7354}; azimut=-176.886; special="FLY"; id=151; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item4 { position[]={4608.9258,5.9523497,2282.668}; azimut=-176.886; special="FLY"; id=152; side="EAST"; vehicle="RU_Soldier_AA"; skill=0.2; }; }; }; class Item21 { side="EAST"; class Vehicles { items=5; class Item0 { position[]={4608.6001,5.9132905,2269.8962}; azimut=-176.886; special="FLY"; id=153; side="EAST"; vehicle="RU_Soldier_SL"; leader=1; rank="SERGEANT"; skill=0.2; init="nul=[this,""balota"",""random"",""trigger""] execVM ""ups.sqf"""; }; class Item1 { position[]={4608.5054,5.9000001,2265.3755}; azimut=-176.886; special="FLY"; id=154; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item2 { position[]={4614.5151,5.929172,2265.1721}; azimut=-176.886; special="FLY"; id=155; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item3 { position[]={4611.4912,5.9000001,2265.1772}; azimut=-176.886; special="FLY"; id=156; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item4 { position[]={4617.0293,5.9618621,2265.1099}; azimut=-176.886; special="FLY"; id=157; side="EAST"; vehicle="RU_Soldier_AT"; skill=0.2; }; }; }; class Item22 { side="EAST"; class Vehicles { items=5; class Item0 { position[]={4608.9336,5.8567657,2257.8232}; azimut=-176.886; special="FLY"; id=158; side="EAST"; vehicle="RU_Soldier_SL"; leader=1; rank="SERGEANT"; skill=0.2; init="nul=[this,""balota"",""random"",""trigger""] execVM ""ups.sqf"""; }; class Item1 { position[]={4608.8389,5.9119325,2253.3025}; azimut=-176.886; special="FLY"; id=159; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item2 { position[]={4614.8486,5.9586763,2253.0991}; azimut=-176.886; special="FLY"; id=160; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item3 { position[]={4611.8247,5.9496064,2253.1042}; azimut=-176.886; special="FLY"; id=161; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item4 { position[]={4617.3623,5.9648314,2253.0369}; azimut=-176.886; special="FLY"; id=162; side="EAST"; vehicle="RU_Soldier_AT"; skill=0.2; }; }; }; class Item23 { side="EAST"; class Vehicles { items=5; class Item0 { position[]={4590.0044,5.6946301,2269.6584}; azimut=-176.886; special="FLY"; id=163; side="EAST"; vehicle="RU_Soldier_SL"; leader=1; rank="SERGEANT"; skill=0.2; init="nul=[this,""balota"",""random"",""trigger""] execVM ""ups.sqf"""; }; class Item1 { position[]={4589.9097,5.6204009,2265.1377}; azimut=-176.886; special="FLY"; id=164; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item2 { position[]={4595.9194,5.737349,2264.9343}; azimut=-176.886; special="FLY"; id=165; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item3 { position[]={4592.8955,5.676949,2264.9395}; azimut=-176.886; special="FLY"; id=166; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item4 { position[]={4598.4331,5.7844758,2264.8721}; azimut=-176.886; special="FLY"; id=167; side="EAST"; vehicle="RU_Soldier_MG"; skill=0.2; }; }; }; class Item24 { side="EAST"; class Vehicles { items=5; class Item0 { position[]={4588.9678,5.5256653,2258.0833}; azimut=-176.886; special="FLY"; id=168; side="EAST"; vehicle="RU_Soldier_SL"; leader=1; rank="SERGEANT"; skill=0.2; init="nul=[this,""balota"",""random"",""trigger""] execVM ""ups.sqf"""; }; class Item1 { position[]={4588.873,5.8213606,2253.5625}; azimut=-176.886; special="FLY"; id=169; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item2 { position[]={4594.8828,5.7734451,2253.3591}; azimut=-176.886; special="FLY"; id=170; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item3 { position[]={4591.8589,5.7532821,2253.3643}; azimut=-176.886; special="FLY"; id=171; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item4 { position[]={4597.397,5.8433914,2253.2969}; azimut=-176.886; special="FLY"; id=172; side="EAST"; vehicle="RU_Soldier_MG"; skill=0.2; }; }; }; class Item25 { side="EAST"; class Vehicles { items=6; class Item0 { position[]={4740.8613,5.9592466,2269.4434}; azimut=-176.886; special="FLY"; id=173; side="EAST"; vehicle="MVD_Soldier_TL"; leader=1; rank="SERGEANT"; skill=0.2; init="nul=[this,""balota2"",""random"",""trigger""] execVM ""ups.sqf"""; }; class Item1 { position[]={4740.7666,5.9010286,2264.9229}; azimut=-176.886; special="FLY"; id=174; side="EAST"; vehicle="MVD_Soldier"; skill=0.2; }; class Item2 { position[]={4743.7529,5.9036713,2264.7246}; azimut=-176.886; special="FLY"; id=176; side="EAST"; vehicle="MVD_Soldier"; skill=0.2; }; class Item3 { position[]={4746.7764,5.9037414,2264.7192}; azimut=-176.886; special="FLY"; id=175; side="EAST"; vehicle="MVD_Soldier"; skill=0.2; }; class Item4 { position[]={4749.2905,5.9045687,2264.6572}; azimut=-176.886; special="FLY"; id=177; side="EAST"; vehicle="MVD_Soldier_AT"; skill=0.2; }; class Item5 { position[]={4751.9893,5.9045687,2264.6572}; azimut=-176.886; special="FLY"; id=178; side="EAST"; vehicle="MVD_Soldier_MG"; skill=0.2; }; }; }; class Item26 { side="EAST"; class Vehicles { items=6; class Item0 { position[]={4759.127,5.9000001,2269.6008}; azimut=-176.886; special="FLY"; id=179; side="EAST"; vehicle="MVD_Soldier_TL"; leader=1; rank="SERGEANT"; skill=0.2; init="nul=[this,""balota2"",""random"",""trigger""] execVM ""ups.sqf"""; }; class Item1 { position[]={4759.0322,5.9000001,2265.0803}; azimut=-176.886; special="FLY"; id=180; side="EAST"; vehicle="MVD_Soldier"; skill=0.2; }; class Item2 { position[]={4762.0186,5.9000001,2264.8821}; azimut=-176.886; special="FLY"; id=182; side="EAST"; vehicle="MVD_Soldier"; skill=0.2; }; class Item3 { position[]={4765.042,5.9000001,2264.8767}; azimut=-176.886; special="FLY"; id=181; side="EAST"; vehicle="MVD_Soldier"; skill=0.2; }; class Item4 { position[]={4767.5562,5.9000001,2264.8147}; azimut=-176.886; special="FLY"; id=183; side="EAST"; vehicle="MVD_Soldier_AT"; skill=0.2; }; class Item5 { position[]={4770.2549,5.9000001,2264.8147}; azimut=-176.886; special="FLY"; id=184; side="EAST"; vehicle="MVD_Soldier_MG"; skill=0.2; }; }; }; class Item27 { side="EAST"; class Vehicles { items=2; class Item0 { position[]={3555.3271,22.988712,2673.0496}; azimut=-176.886; special="NONE"; id=185; side="EAST"; vehicle="RUS_Soldier_Marksman"; leader=1; skill=0.58634394; init="this setbehaviour ""aware"""; }; class Item1 { position[]={3561.4397,22.333899,2672.4263}; azimut=-176.886; special="NONE"; id=186; side="EAST"; vehicle="RUS_Soldier3"; skill=0.55534714; init="this setbehaviour ""aware"""; }; }; }; class Item28 { side="EAST"; class Vehicles { items=2; class Item0 { position[]={1983.8455,26.028635,2388.7354}; azimut=-176.886; special="NONE"; id=187; side="EAST"; vehicle="RUS_Soldier_Marksman"; leader=1; skill=0.60700876; init="this setbehaviour ""aware"""; }; class Item1 { position[]={1989.958,26.291988,2388.1121}; azimut=-176.886; special="NONE"; id=188; side="EAST"; vehicle="RUS_Soldier3"; skill=0.57084566; init="this setbehaviour ""aware"""; }; }; }; class Item29 { side="LOGIC"; class Vehicles { items=1; class Item0 { position[]={1621.604,175.80484,5379.2676}; id=194; side="LOGIC"; vehicle="SilvieManager"; leader=1; skill=0.60000002; }; }; }; class Item30 { side="EAST"; class Vehicles { items=1; class Item0 { position[]={1512.0039,5.9872575,2287.1934}; azimut=120; id=212; side="EAST"; vehicle="UAZ_RU"; leader=1; rank="CAPTAIN"; skill=0.87048256; init="this setbehaviour ""aware"""; synchronizations[]={41,42,43,44}; }; }; class Waypoints { items=3; class Item0 { position[]={1523.8608,6.1071448,2280.9355}; speed="NORMAL"; class Effects { }; showWP="NEVER"; }; class Item1 { position[]={5212.6157,5.7015438,2104.7791}; class Effects { }; showWP="NEVER"; }; class Item2 { position[]={1523.6187,6.1026506,2281.5747}; type="CYCLE"; class Effects { }; showWP="NEVER"; }; }; }; class Item31 { side="EAST"; class Vehicles { items=1; class Item0 { position[]={4699.9429,6,2223.428}; azimut=-176.886; special="FLY"; id=213; side="EAST"; vehicle="T90"; leader=1; skill=0.63283926; init="nul=[this,""balota"",""random"",""trigger""] execVM ""ups.sqf"""; }; }; }; class Item32 { side="EAST"; class Vehicles { items=1; class Item0 { position[]={3207.4973,6.1658869,2059.7327}; azimut=-176.886; special="FLY"; id=214; side="EAST"; vehicle="BTR90"; leader=1; skill=0.59667617; init="nul=[this,""komarovo"",""random"",""trigger""] execVM ""ups.sqf"""; }; }; }; class Item33 { side="EAST"; class Vehicles { items=1; class Item0 { position[]={2168.5359,5.6578765,2241.814}; azimut=-176.886; special="FLY"; id=215; side="EAST"; vehicle="BMP3"; leader=1; skill=0.61217469; init="nul=[this,""kamenka1"",""random"",""trigger""] execVM ""ups.sqf"""; }; }; }; }; class Vehicles { items=95; class Item0 { position[]={1809.41,157.54984,5096.4634}; id=45; side="EMPTY"; vehicle="MtvrReammo"; skill=0.60000002; init="xhandle = [this,120] execVM ""scripts\vehspawn.sqf"""; }; class Item1 { position[]={1814.5187,157.79112,5096.4561}; id=46; side="EMPTY"; vehicle="MtvrRefuel"; skill=0.60000002; init="xhandle = [this,120] execVM ""scripts\vehspawn.sqf"""; }; class Item2 { position[]={1819.4255,158.11726,5096.4434}; id=47; side="EMPTY"; vehicle="MtvrRepair"; skill=0.60000002; init="xhandle = [this,120] execVM ""scripts\vehspawn.sqf"""; }; class Item3 { position[]={1827.4586,159.07013,5104.791}; azimut=330; id=48; side="EMPTY"; vehicle="HMMWV_Ambulance"; skill=0.60000002; init="xhandle = [this,120] execVM ""scripts\vehspawn.sqf"""; }; class Item4 { position[]={1832.0009,159.62012,5106.7559}; azimut=330; id=49; side="EMPTY"; vehicle="HMMWV_Ambulance"; skill=0.60000002; init="xhandle = [this,120] execVM ""scripts\vehspawn.sqf"""; }; class Item5 { position[]={1813.8314,158.41681,5114.4277}; azimut=50; id=50; side="EMPTY"; vehicle="HMMWV_M2"; skill=0.60000002; init="xhandle = [this,120] execVM ""scripts\vehspawn.sqf"""; }; class Item6 { position[]={1821.1527,159.40564,5119.2617}; azimut=50; id=51; side="EMPTY"; vehicle="HMMWV_M2"; skill=0.60000002; init="xhandle = [this,120] execVM ""scripts\vehspawn.sqf"""; }; class Item7 { position[]={1802.844,157.47035,5108.7793}; azimut=75; id=52; side="EMPTY"; vehicle="MTVR"; skill=0.60000002; init="xhandle = [this,120] execVM ""scripts\vehspawn.sqf"""; }; class Item8 { position[]={1792.8999,156.89848,5105.4053}; azimut=75; id=53; side="EMPTY"; vehicle="MTVR"; skill=0.60000002; init="xhandle = [this,120] execVM ""scripts\vehspawn.sqf"""; }; class Item9 { position[]={1784.8474,156.19856,5044.5933}; id=54; side="EMPTY"; vehicle="HeliH"; skill=0.60000002; }; class Item10 { position[]={1784.9358,156.14116,5048.9307}; id=55; side="EMPTY"; vehicle="UH1Y"; skill=0.60000002; init="xhandle = [this,120] execVM ""scripts\vehspawn.sqf"""; }; class Item11 { position[]={1814.2485,157.82996,5042.9941}; id=56; side="EMPTY"; vehicle="MH60S"; skill=0.60000002; init="xhandle = [this,120] execVM ""scripts\vehspawn.sqf"""; }; class Item12 { position[]={1814.1326,157.80795,5044.8555}; id=57; side="EMPTY"; vehicle="HeliH"; skill=0.60000002; }; class Item13 { position[]={1749.34,153.53326,5086.1973}; azimut=-176.886; id=58; side="EMPTY"; vehicle="USBasicWeaponsBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; synchronizations[]={41,42,43,44}; }; class Item14 { position[]={1749.2358,153.51369,5085.2949}; azimut=-176.886; id=59; side="EMPTY"; vehicle="USBasicWeaponsBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; synchronizations[]={41,42,43,44}; }; class Item15 { position[]={1749.0984,153.49608,5084.3174}; azimut=-176.886; id=60; side="EMPTY"; vehicle="USBasicWeaponsBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; synchronizations[]={41,42,43,44}; }; class Item16 { position[]={1749.0444,153.35901,5080.8232}; azimut=-176.886; id=61; side="EMPTY"; vehicle="USSpecialWeaponsBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; synchronizations[]={41,42,43,44}; }; class Item17 { position[]={1748.9641,153.30466,5079.9233}; azimut=-176.886; id=62; side="EMPTY"; vehicle="USSpecialWeaponsBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; synchronizations[]={41,42,43,44}; }; class Item18 { position[]={1748.9641,153.25844,5078.9814}; azimut=-176.886; id=63; side="EMPTY"; vehicle="USSpecialWeaponsBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; synchronizations[]={41,42,43,44}; }; class Item19 { position[]={1748.8784,153.20132,5078.0391}; azimut=-176.886; id=64; side="EMPTY"; vehicle="USSpecialWeaponsBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; synchronizations[]={41,42,43,44}; }; class Item20 { position[]={1748.8356,153.17175,5077.0112}; azimut=-176.886; id=65; side="EMPTY"; vehicle="USSpecialWeaponsBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; synchronizations[]={41,42,43,44}; }; class Item21 { position[]={1748.7821,153.17715,5076.0371}; azimut=-176.886; id=66; side="EMPTY"; vehicle="USSpecialWeaponsBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; synchronizations[]={41,42,43,44}; }; class Item22 { position[]={1748.735,153.21638,5075.1079}; azimut=-176.886; id=67; side="EMPTY"; vehicle="USSpecialWeaponsBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; synchronizations[]={41,42,43,44}; }; class Item23 { position[]={1748.7054,153.29613,5073.3398}; azimut=-176.886; id=68; side="EMPTY"; vehicle="USLaunchersBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; synchronizations[]={41,42,43,44}; }; class Item24 { position[]={1748.6912,153.33659,5072.4443}; azimut=-176.886; id=69; side="EMPTY"; vehicle="USLaunchersBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; synchronizations[]={41,42,43,44}; }; class Item25 { position[]={1748.6204,153.3732,5071.5283}; azimut=-176.886; id=70; side="EMPTY"; vehicle="USLaunchersBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; synchronizations[]={41,42,43,44}; }; class Item26 { position[]={1748.597,153.41275,5070.6357}; azimut=-176.886; id=71; side="EMPTY"; vehicle="USLaunchersBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; synchronizations[]={41,42,43,44}; }; class Item27 { position[]={1748.5344,153.43973,5069.7808}; azimut=-176.886; id=72; side="EMPTY"; vehicle="USLaunchersBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; synchronizations[]={41,42,43,44}; }; class Item28 { position[]={1748.7147,153.46825,5067.1558}; azimut=-176.886; id=73; side="EMPTY"; vehicle="USOrdnanceBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; synchronizations[]={41,42,43,44}; }; class Item29 { position[]={1748.8079,153.47778,5066.2153}; azimut=-176.886; id=74; side="EMPTY"; vehicle="USOrdnanceBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; synchronizations[]={41,42,43,44}; }; class Item30 { position[]={1748.6439,153.46307,5063.9819}; azimut=-176.886; id=75; side="EMPTY"; vehicle="SpecialWeaponsBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; synchronizations[]={41,42,43,44}; }; class Item31 { position[]={1748.741,153.47295,5063.1201}; azimut=-176.886; id=76; side="EMPTY"; vehicle="SpecialWeaponsBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; synchronizations[]={41,42,43,44}; }; class Item32 { position[]={1748.6709,153.47325,5062.1343}; azimut=-176.886; id=77; side="EMPTY"; vehicle="SpecialWeaponsBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; synchronizations[]={41,42,43,44}; }; class Item33 { position[]={1793.0104,156.66045,5043.4058}; azimut=-176.886; id=78; side="EMPTY"; vehicle="USVehicleBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; synchronizations[]={41,42,43,44}; }; class Item34 { position[]={1792.9497,156.64053,5044.6685}; azimut=-176.886; id=79; side="EMPTY"; vehicle="Barrel1"; leader=1; skill=0.2; description="Company CO. (Capt.)"; synchronizations[]={41,42,43,44}; }; class Item35 { position[]={1805.021,157.30212,5042.6968}; azimut=-176.886; id=80; side="EMPTY"; vehicle="USVehicleBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; }; class Item36 { position[]={1805.2821,157.30125,5043.9595}; azimut=-176.886; id=81; side="EMPTY"; vehicle="Barrel1"; leader=1; skill=0.2; description="Company CO. (Capt.)"; }; class Item37 { position[]={1752.8256,154.2052,5098.3252}; azimut=-176.886; id=82; side="EMPTY"; vehicle="FlagCarrierUSA"; leader=1; skill=0.2; description="Company CO. (Capt.)"; synchronizations[]={41,42,43,44}; }; class Item38 { position[]={1803.7034,157.07245,5067.2642}; azimut=-176.886; id=83; side="EMPTY"; vehicle="FlagCarrierUSA"; leader=1; skill=0.2; description="Company CO. (Capt.)"; synchronizations[]={41,42,43,44}; }; class Item39 { position[]={1684.3317,6.5089064,2241.1936}; id=84; side="EMPTY"; vehicle="76n6ClamShell"; leader=1; skill=0.2; text="radar1"; synchronizations[]={41,42,43,44}; }; class Item40 { position[]={1756.129,154.47949,5048.4063}; azimut=25; id=85; side="EMPTY"; vehicle="MASH"; leader=1; skill=0.2; synchronizations[]={41,42,43,44}; }; class Item41 { position[]={1699.927,9.4020348,2256.9546}; azimut=30; id=86; side="EMPTY"; vehicle="Land_tent_east"; leader=1; skill=0.2; synchronizations[]={41,42,43,44}; }; class Item42 { position[]={1670.8726,6.5397716,2245.4795}; azimut=295; id=87; side="EMPTY"; vehicle="PowGen_Big"; leader=1; skill=0.2; synchronizations[]={41,42,43,44}; }; class Item43 { position[]={1669.5728,9.1610022,2261.7922}; azimut=345; id=88; side="EMPTY"; vehicle="Land_tent_east"; leader=1; skill=0.2; }; class Item44 { position[]={2014.4902,6.2380457,2276.6108}; azimut=180; special="FLY"; id=89; side="EMPTY"; vehicle="2S6M_Tunguska"; leader=1; lock="LOCKED"; skill=0.2; fuel=0; ammo=0; text="antiair1"; }; class Item45 { position[]={3727.8977,6.8298931,2516.4431}; azimut=180; special="FLY"; id=90; side="EMPTY"; vehicle="BTR90_HQ"; leader=1; lock="LOCKED"; skill=0.2; fuel=0; ammo=0; text="hq1"; }; class Item46 { position[]={3728.1716,6.8204575,2516.0745}; special="FLY"; id=91; side="EMPTY"; vehicle="Land_CamoNetB_EAST"; leader=1; lock="LOCKED"; skill=0.2; }; class Item47 { position[]={3495.8875,5.9574728,2455.6614}; azimut=335; special="FLY"; id=92; side="EMPTY"; vehicle="D30_RU"; leader=1; lock="LOCKED"; skill=0.2; ammo=0; text="artillery1"; }; class Item48 { position[]={3488.9827,5.7978978,2451.3069}; azimut=320; special="FLY"; id=93; side="EMPTY"; vehicle="D30_RU"; leader=1; lock="LOCKED"; skill=0.2; ammo=0; text="artillery2"; }; class Item49 { position[]={3494.4377,5.7596517,2450.3027}; azimut=320; special="FLY"; id=94; side="EMPTY"; vehicle="Land_CamoNetVar_EAST"; leader=1; lock="LOCKED"; skill=0.2; }; class Item50 { position[]={1690.917,6.5195589,2226.469}; azimut=350; special="FLY"; id=95; side="EMPTY"; vehicle="Kamaz"; leader=1; lock="LOCKED"; skill=0.2; }; class Item51 { position[]={1685.062,6.4000001,2221.5874}; azimut=350; special="FLY"; id=96; side="EMPTY"; vehicle="Kamaz"; leader=1; lock="LOCKED"; skill=0.2; }; class Item52 { position[]={4662.3247,9,2563.5955}; azimut=150; special="NONE"; id=137; side="EMPTY"; vehicle="Su34"; lock="LOCKED"; skill=0.2; fuel=0; ammo=0; text="plane1"; }; class Item53 { position[]={4692.9272,8.9844389,2545.7393}; azimut=150; special="NONE"; id=138; side="EMPTY"; vehicle="Su34"; lock="LOCKED"; skill=0.2; fuel=0; ammo=0; text="plane2"; }; class Item54 { position[]={4722.1079,9,2528.4346}; azimut=150; special="NONE"; id=139; side="EMPTY"; vehicle="Su34"; lock="LOCKED"; skill=0.2; fuel=0; ammo=0; text="plane3"; }; class Item55 { position[]={4710.082,8.9762697,2585.6377}; azimut=150; special="FLY"; id=140; side="EMPTY"; vehicle="FlagCarrierRU"; lock="LOCKED"; skill=0.2; }; class Item56 { position[]={4811.1963,8.9507141,2533.6675}; azimut=285; special="FLY"; id=141; side="EMPTY"; vehicle="GAZ_Vodnik_MedEvac"; lock="LOCKED"; skill=0.2; text="ambu1"; }; class Item57 { position[]={4777.3594,8.8999996,2511.48}; azimut=345; special="FLY"; id=142; side="EMPTY"; vehicle="KamazReammo"; lock="LOCKED"; skill=0.2; text="uti1"; }; class Item58 { position[]={4793.4111,8.9073696,2504.6411}; azimut=345; special="FLY"; id=143; side="EMPTY"; vehicle="KamazRefuel"; lock="LOCKED"; skill=0.2; text="uti2"; }; class Item59 { position[]={4807.8545,8.9968996,2497.7324}; azimut=345; special="FLY"; id=144; side="EMPTY"; vehicle="KamazRepair"; lock="LOCKED"; skill=0.2; text="uti3"; }; class Item60 { position[]={4809.9619,8.9165068,2521.2378}; azimut=285; special="FLY"; id=145; side="EMPTY"; vehicle="Land_tent_east"; lock="LOCKED"; skill=0.2; }; class Item61 { position[]={4795.8071,8.6999998,2543.5876}; azimut=260; special="FLY"; id=146; side="EMPTY"; vehicle="KamazReammo"; lock="LOCKED"; skill=0.2; text="uti4"; }; class Item62 { position[]={4810.0601,8.9167233,2521.2542}; azimut=345; special="FLY"; id=147; side="EMPTY"; vehicle="RUOrdnanceBox"; lock="LOCKED"; skill=0.2; }; class Item63 { position[]={2016.1173,5.8566985,2279.8042}; azimut=-176.886; special="NONE"; id=189; side="EMPTY"; vehicle="Land_fort_bagfence_corner"; leader=1; skill=0.2; }; class Item64 { position[]={2013.0817,6.3212109,2280.1138}; azimut=90; special="NONE"; id=190; side="EMPTY"; vehicle="Land_fort_bagfence_corner"; leader=1; skill=0.2; }; class Item65 { position[]={2015.8917,6.0357618,2273.0437}; azimut=270; special="NONE"; id=191; side="EMPTY"; vehicle="Land_fort_bagfence_corner"; leader=1; skill=0.2; }; class Item66 { position[]={2012.8873,6.1001954,2273.2214}; special="NONE"; id=192; side="EMPTY"; vehicle="Land_fort_bagfence_corner"; leader=1; skill=0.2; }; class Item67 { position[]={1836.9103,160.14017,5109.2163}; azimut=330; id=193; side="EMPTY"; vehicle="HMMWV_Armored"; skill=0.60000002; init="xhandle = [this,120] execVM ""scripts\vehspawn.sqf"""; }; class Item68 { position[]={1813.0555,157.63602,5073.3481}; azimut=160; id=195; side="EMPTY"; vehicle="LAV25_HQ"; skill=0.60000002; text="usmchq"; }; class Item69 { position[]={1746.9624,153.35139,5086.3271}; azimut=-176.886; id=196; side="EMPTY"; vehicle="USBasicWeaponsBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; }; class Item70 { position[]={1746.8583,153.33659,5085.4248}; azimut=-176.886; id=197; side="EMPTY"; vehicle="USBasicWeaponsBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; }; class Item71 { position[]={1746.7208,153.30273,5084.4473}; azimut=-176.886; id=198; side="EMPTY"; vehicle="USBasicWeaponsBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; }; class Item72 { position[]={1746.6179,153.24759,5083.4263}; azimut=-176.886; id=199; side="EMPTY"; vehicle="USBasicWeaponsBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; }; class Item73 { position[]={1746.5138,153.1982,5082.5239}; azimut=-176.886; id=200; side="EMPTY"; vehicle="USBasicWeaponsBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; }; class Item74 { position[]={1746.3763,153.14346,5081.5464}; azimut=-176.886; id=201; side="EMPTY"; vehicle="USBasicWeaponsBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; }; class Item75 { position[]={1746.6531,153.31105,5067.2461}; azimut=-176.886; id=202; side="EMPTY"; vehicle="USOrdnanceBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; }; class Item76 { position[]={1746.7462,153.31589,5066.3057}; azimut=-176.886; id=203; side="EMPTY"; vehicle="USOrdnanceBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; }; class Item77 { position[]={1746.5823,153.30943,5064.0723}; azimut=-176.886; id=204; side="EMPTY"; vehicle="SpecialWeaponsBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; }; class Item78 { position[]={1746.6793,153.31097,5063.2104}; azimut=-176.886; id=205; side="EMPTY"; vehicle="SpecialWeaponsBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; }; class Item79 { position[]={1746.6093,153.28281,5062.2246}; azimut=-176.886; id=206; side="EMPTY"; vehicle="SpecialWeaponsBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; }; class Item80 { position[]={1745.9955,153.04611,5076.5088}; azimut=-176.886; id=207; side="EMPTY"; vehicle="USOrdnanceBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; }; class Item81 { position[]={1746.0886,153.08986,5075.5684}; azimut=-176.886; id=208; side="EMPTY"; vehicle="USOrdnanceBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; }; class Item82 { position[]={1746.2594,153.09209,5080.6167}; azimut=-176.886; id=209; side="EMPTY"; vehicle="USBasicWeaponsBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; }; class Item83 { position[]={1746.1553,153.04269,5079.7144}; azimut=-176.886; id=210; side="EMPTY"; vehicle="USBasicWeaponsBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; }; class Item84 { position[]={1746.0178,153,5078.7368}; azimut=-176.886; id=211; side="EMPTY"; vehicle="USBasicWeaponsBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; }; class Item85 { position[]={1780.0197,155.71454,5068.7646}; azimut=90; id=216; side="EMPTY"; vehicle="CampEast"; leader=1; skill=0.2; }; class Item86 { position[]={1797.6888,156.75735,5071.7114}; id=217; side="EMPTY"; vehicle="CampEast"; leader=1; skill=0.2; }; class Item87 { position[]={1813.2213,157.64699,5073.458}; special="FLY"; id=218; side="EMPTY"; vehicle="Land_CamoNetB_NATO"; leader=1; lock="LOCKED"; skill=0.2; }; class Item88 { position[]={2703.9561,198.69839,5169.123}; special="FLY"; id=219; side="EMPTY"; vehicle="RoadBarrier_long"; leader=1; lock="LOCKED"; skill=0.2; }; class Item89 { position[]={1841.2521,160.69286,5110.9185}; azimut=330; id=220; side="EMPTY"; vehicle="HMMWV_Armored"; skill=0.60000002; init="xhandle = [this,120] execVM ""scripts\vehspawn.sqf"""; }; class Item90 { position[]={1744.0507,153.18849,5073.314}; azimut=-176.886; id=221; side="EMPTY"; vehicle="USLaunchersBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; }; class Item91 { position[]={1744.0364,153.18782,5072.4185}; azimut=-176.886; id=222; side="EMPTY"; vehicle="USLaunchersBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; }; class Item92 { position[]={1743.9656,153.18452,5071.5024}; azimut=-176.886; id=223; side="EMPTY"; vehicle="USLaunchersBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; }; class Item93 { position[]={1743.9423,153.18344,5070.6099}; azimut=-176.886; id=224; side="EMPTY"; vehicle="USLaunchersBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; }; class Item94 { position[]={1743.8796,153.18066,5069.7549}; azimut=-176.886; id=225; side="EMPTY"; vehicle="USLaunchersBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; }; }; class Markers { items=13; class Item0 { position[]={1735.986,39.083664,2520.0403}; name="kamenka1"; markerType="ELLIPSE"; type="Empty"; colorName="ColorRed"; fillName="BDiagonal"; a=500; b=500; }; class Item1 { position[]={2015.2139,5.5999055,2265.6152}; name="obj2m"; text="Destroy Anti-Air"; type="mil_destroy"; }; class Item2 { position[]={1684.3033,6.4300342,2231.9741}; name="obj1m"; text="Destroy AA Radar"; type="mil_destroy"; }; class Item3 { position[]={3728.0342,6.9321918,2522.0298}; name="obj4m"; text="Destroy HQ Vehicle"; type="mil_destroy"; }; class Item4 { position[]={3497.3774,5.5652971,2445.7893}; name="obj3m"; text="Destroy Artillery"; type="mil_destroy"; }; class Item5 { position[]={3440.2178,20.780218,2554.5752}; name="komarovo"; markerType="ELLIPSE"; type="Empty"; colorName="ColorRed"; fillName="BDiagonal"; a=500; b=500; }; class Item6 { position[]={4336.3564,6.0161347,2644.2722}; name="balota"; markerType="ELLIPSE"; type="Empty"; colorName="ColorRed"; fillName="BDiagonal"; a=400; b=400; }; class Item7 { position[]={4931.2188,8.9195795,2462.3125}; name="balota2"; markerType="ELLIPSE"; type="Empty"; colorName="ColorRed"; fillName="BDiagonal"; a=250; b=400; }; class Item8 { position[]={4799.0771,9,2525.4011}; name="obj6m"; text="Destroy Supplies"; type="mil_destroy"; }; class Item9 { position[]={4684.981,9,2541.1799}; name="obj5m"; text="Destroy Airplanes"; type="mil_destroy"; }; class Item10 { position[]={4736.2305,8.6999998,2614.5879}; name="Airfield"; text="Airfield"; type="mil_flag"; colorName="ColorOrange"; }; class Item11 { position[]={1769.478,155.42422,5100.6079}; name="respawn_west"; text="US Base"; type="mil_start"; colorName="ColorGreen"; }; class Item12 { position[]={1769.4031,155.38507,5098.6328}; name="respawn_west_2"; type="Empty"; a=0.0099999998; b=0.0099999998; }; }; class Sensors { items=10; class Item0 { position[]={1705.0159,0.2281644,1860.4348}; a=99999; b=99999; activationBy="ANY"; interruptable=1; type="SWITCH"; age="UNKNOWN"; expCond="this && not alive radar1"; expActiv="hint ""Anti-Air Radar Destroyed!""; obj1=true; ""obj1m"" setMarkerSize [0,0];"; class Effects { }; }; class Item1 { position[]={1799.5859,0.41680175,1860.5182}; a=99999; b=99999; activationBy="ANY"; interruptable=1; type="SWITCH"; age="UNKNOWN"; expCond="this && not alive antiair1"; expActiv="hint ""Anti-Air Vehicle Destroyed!""; obj2=true; ""obj2m"" setMarkerSize [0,0];"; class Effects { }; }; class Item2 { position[]={3685.2036,0.2090566,1825.6888}; a=99999; b=99999; activationBy="ANY"; interruptable=1; type="SWITCH"; age="UNKNOWN"; expCond="this && not alive hq1"; expActiv="hint ""HQ Vehicle Destroyed!""; obj4=true; ""obj4m"" setMarkerSize [0,0];"; class Effects { }; }; class Item3 { position[]={3618.1257,0.053012162,1826.8333}; a=99999; b=99999; activationBy="ANY"; interruptable=1; type="SWITCH"; age="UNKNOWN"; expCond="this && not alive artillery1 && not alive artillery2"; expActiv="hint ""Artillery Barrage Destroyed!""; obj3=true; ""obj3m"" setMarkerSize [0,0];"; class Effects { }; }; class Item4 { position[]={4340.4907,0.12754592,1869.4867}; a=99999; b=99999; activationBy="ANY"; interruptable=1; type="SWITCH"; age="UNKNOWN"; expCond="this && not alive plane1 && not alive plane2 && not alive plane3"; expActiv="hint ""Airplanes Destroyed""; obj5=true; ""obj5m"" setMarkerSize [0,0];"; class Effects { }; }; class Item5 { position[]={4427.3823,0.35726708,1867.9899}; a=99999; b=99999; activationBy="ANY"; interruptable=1; type="SWITCH"; age="UNKNOWN"; expCond="this && not alive uti1 && not alive uti2 && not alive uti3 && not alive uti4 && not alive ambu1"; expActiv="hint ""Supplies Destroyed""; obj6=true; ""obj6m"" setMarkerSize [0,0];"; class Effects { }; }; class Item6 { position[]={3607.3806,-18.25934,1455.7681}; a=99999; b=99999; activationBy="ANY"; timeoutMin=3; timeoutMid=3; timeoutMax=3; interruptable=1; type="SWITCH"; age="UNKNOWN"; expCond="this && obj1 && obj2 && obj3 && obj4 && obj5 && obj6"; expActiv="hint ""All objectives are succesfully completed. Well done!"""; class Effects { }; }; class Item7 { position[]={3736.6479,0.38970238,1455.7681}; a=99999; b=99999; activationBy="ANY"; timeoutMin=6; timeoutMid=6; timeoutMax=6; interruptable=1; type="END1"; age="UNKNOWN"; expCond="this && obj1 && obj2 && obj3 && obj4 && obj5 && obj6"; class Effects { }; }; class Item8 { position[]={1764.9996,183.21829,5401.7402}; a=999999; b=999999; activationBy="ANY"; timeoutMin=1; timeoutMid=1; timeoutMax=1; interruptable=1; type="SWITCH"; age="UNKNOWN"; expCond="this && not alive usmchq"; expActiv="Hint ""USMC HQ Vehicle Destroyed!"""; class Effects { }; }; class Item9 { position[]={1807.0464,184.45013,5400.0635}; a=999999; b=999999; activationBy="ANY"; timeoutMin=4; timeoutMid=4; timeoutMax=4; interruptable=1; type="LOOSE"; age="UNKNOWN"; expCond="this && not alive usmchq"; class Effects { }; }; }; }; class Intro { addOns[]= { "chernarus" }; addOnsAuto[]= { "chernarus" }; randomSeed=14696287; class Intel { startWeather=0.25; forecastWeather=0.25; year=2008; month=10; day=11; hour=9; minute=20; }; }; class OutroWin { addOns[]= { "chernarus" }; addOnsAuto[]= { "chernarus" }; randomSeed=8787019; class Intel { startWeather=0.25; forecastWeather=0.25; year=2008; month=10; day=11; hour=9; minute=20; }; }; class OutroLoose { addOns[]= { "chernarus" }; addOnsAuto[]= { "chernarus" }; randomSeed=13920150; class Intel { startWeather=0.25; forecastWeather=0.25; year=2008; month=10; day=11; hour=9; minute=20; }; }; // Raunis vehispawn 1.0 private ["_vehicle", "_delay", "_startpos", "_startdir", "_type", "_disabled", "_empty"]; if (!isServer) exitWith{}; _vehicle = _this select 0; _delay = _this select 1; _startpos = getpos _vehicle; _startdir = getdir _vehicle; _type = typeof _vehicle; while {true} do { sleep (_delay + random 15); if (({alive _x} count (crew _vehicle)) == 0) then { _disabled = (if (damage _vehicle > 0.9) then {true} else {false}); if (_disabled || !(alive _vehicle)) then { deletevehicle _vehicle; sleep 0.5; _vehicle = _type createvehicle _startpos; _vehicle setpos _startpos; _vehicle setdir _startdir; }; }; }; #define ReadAndWrite 0 #define ReadAndCreate 1 #define ReadOnly 2 #define ReadOnlyVerified 3 #define true 1 #define false 0 class KEGsRscText { access = ReadAndWrite; type = 0; idc = -1; style = 0; w = 0.1; h = 0.05; font = "TahomaB"; sizeEx = 0.04; colorBackground[] = {0, 0, 0, 0}; colorText[] = {1, 1, 1, 1}; text = ""; }; class KEGsRscListBox { access = ReadAndWrite; type = 5; style = 0; w = 0.4; h = 0.4; font = "TahomaB"; sizeEx = 0.04; rowHeight = 0; colorText[] = {1, 1, 1, 1}; colorScrollbar[] = {1, 1, 1, 1}; colorSelect[] = {0, 0, 0, 1}; colorSelect2[] = {1, 0.5, 0, 1}; colorSelectBackground[] = {0.6, 0.6, 0.6, 1}; colorSelectBackground2[] = {0.2, 0.2, 0.2, 1}; colorBackground[] = {0, 0, 0, 1}; soundSelect[] = {"", 0.1, 1}; period = 1; }; class KEGsRscActiveText { access = ReadAndWrite; type = 11; style = 2; h = 0.05; w = 0.15; font = "TahomaB"; sizeEx = 0.04; color[] = {1, 1, 1, 1}; colorActive[] = {1, 0.5, 0, 1}; soundEnter[] = {"", 0.1, 1}; soundPush[] = {"", 0.1, 1}; soundClick[] = {"", 0.1, 1}; soundEscape[] = {"", 0.1, 1}; text = ""; default = 0; }; class KEGsRscMapControl { access = ReadAndWrite; type = 101; idc = 51; style = 48; colorBackground[] = {1, 1, 1, 1}; colorText[] = {0, 0, 0, 1}; font = "TahomaB"; sizeEx = 0.04; colorSea[] = {0.56, 0.8, 0.98, 0.5}; colorForest[] = {0.6, 0.8, 0.2, 0.5}; colorRocks[] = {0.5, 0.5, 0.5, 0.5}; colorCountlines[] = {0.65, 0.45, 0.27, 0.5}; colorMainCountlines[] = {0.65, 0.45, 0.27, 1}; colorCountlinesWater[] = {0, 0.53, 1, 0.5}; colorMainCountlinesWater[] = {0, 0.53, 1, 1}; colorForestBorder[] = {0.4, 0.8, 0, 1}; colorRocksBorder[] = {0.5, 0.5, 0.5, 1}; colorPowerLines[] = {0, 0, 0, 1}; colorNames[] = {0, 0, 0, 1}; colorInactive[] = {1, 1, 1, 0.5}; colorLevels[] = {0, 0, 0, 1}; fontLabel = "Zeppelin32"; sizeExLabel = 0.027; fontGrid = "Zeppelin32"; sizeExGrid = 0.027; fontUnits = "Zeppelin32"; sizeExUnits = 0.027; fontNames = "Zeppelin32"; sizeExNames = 0.027; fontInfo = "Zeppelin32"; sizeExInfo = 0.027; fontLevel = "Zeppelin32"; sizeExLevel = 0.027; text = "#(argb,8,8,3)color(1,1,1,1)"; stickX[] = {0.2, {"Gamma", 1, 1.5}}; stickY[] = {0.2, {"Gamma", 1, 1.5}}; ptsPerSquareSea = 6; ptsPerSquareTxt = 8; ptsPerSquareCLn = 8; ptsPerSquareExp = 8; ptsPerSquareCost = 8; ptsPerSquareFor = "4.0f"; ptsPerSquareForEdge = "10.0f"; ptsPerSquareRoad = 2; ptsPerSquareObj = 10; class Bunker { icon = "\ca\ui\data\map_bunker_ca.paa"; color[] = {0.55, 0.64, 0.43, 1}; size = 16; importance = 1.5 * 14 * 0.05; coefMin = 0.25; coefMax = 4; }; class Bush { icon = "\ca\ui\data\map_bush_ca.paa"; color[] = {0.55, 0.64, 0.43, 1}; size = 16; importance = 0.2 * 14 * 0.05; coefMin = 0.25; coefMax = 4; }; class BusStop { icon = "\ca\ui\data\map_busstop_ca.paa"; color[] = {0, 0, 1, 1}; size = 10; importance = 1 * 10 * 0.05; coefMin = 0.25; coefMax = 4; }; class Cross { icon = "\ca\ui\data\map_cross_ca.paa"; color[] = {0.55, 0.64, 0.43, 1}; size = 16; importance = 0.7 * 16 * 0.05; coefMin = 0.25; coefMax = 4; }; class Fortress { icon = "\ca\ui\data\map_bunker_ca.paa"; color[] = {0.55, 0.64, 0.43, 1}; size = 16; importance = 2 * 16 * 0.05; coefMin = 0.25; coefMax = 4; }; class Fuelstation { icon = "\ca\ui\data\map_fuelstation_ca.paa"; color[] = {0.55, 0.64, 0.43, 1}; size = 16; importance = 2 * 16 * 0.05; coefMin = 0.75; coefMax = 4; }; class Fountain { icon = "\ca\ui\data\map_fountain_ca.paa"; color[] = {0, 0.35, 0.7, 1}; size = 12; importance = 1 * 12 * 0.05; coefMin = 0.25; coefMax = 4; }; class Hospital { icon = "\ca\ui\data\map_hospital_ca.paa"; color[] = {0.78, 0, 0.05, 1}; size = 16; importance = 2 * 16 * 0.05; coefMin = 0.5; coefMax = 4; }; class Chapel { icon = "\ca\ui\data\map_chapel_ca.paa"; color[] = {0.55, 0.64, 0.43, 1}; size = 16; importance = 1 * 16 * 0.05; coefMin = 0.9; coefMax = 4; }; class Church { icon = "\ca\ui\data\map_church_ca.paa"; color[] = {0.55, 0.64, 0.43, 1}; size = 16; importance = 2 * 16 * 0.05; coefMin = 0.9; coefMax = 4; }; class Lighthouse { icon = "\ca\ui\data\map_lighthouse_ca.paa"; color[] = {0.78, 0, 0.05, 1}; size = 20; importance = 3 * 16 * 0.05; coefMin = 0.9; coefMax = 4; }; class Quay { icon = "\ca\ui\data\map_quay_ca.paa"; color[] = {0.55, 0.64, 0.43, 1}; size = 16; importance = 2 * 16 * 0.05; coefMin = 0.5; coefMax = 4; }; class Rock { icon = "\ca\ui\data\map_rock_ca.paa"; color[] = {0.55, 0.64, 0.43, 1}; size = 12; importance = 0.5 * 12 * 0.05; coefMin = 0.25; coefMax = 4; }; class Ruin { icon = "\ca\ui\data\map_ruin_ca.paa"; color[] = {0.78, 0, 0.05, 1}; size = 16; importance = 1.2 * 16 * 0.05; coefMin = 1; coefMax = 4; }; class SmallTree { icon = "\ca\ui\data\map_smalltree_ca.paa"; color[] = {0.55, 0.64, 0.43, 1}; size = 16; importance = 0.6 * 12 * 0.05; coefMin = 0.25; coefMax = 4; }; class Stack { icon = "\ca\ui\data\map_stack_ca.paa"; color[] = {0.55, 0.64, 0.43, 1}; size = 20; importance = 2 * 16 * 0.05; coefMin = 0.9; coefMax = 4; }; class Tree { icon = "\ca\ui\data\map_tree_ca.paa"; color[] = {0.55, 0.64, 0.43, 1}; size = 16; importance = 0.9 * 16 * 0.05; coefMin = 0.25; coefMax = 4; }; class Tourism { icon = "\ca\ui\data\map_tourism_ca.paa"; color[] = {0.78, 0, 0.05, 1}; size = 16; importance = 1 * 16 * 0.05; coefMin = 0.7; coefMax = 4; }; class Transmitter { icon = "\ca\ui\data\map_transmitter_ca.paa"; size = 20; color[] = {0, 0.35, 0.7, 1}; importance = 2 * 16 * 0.05; coefMin = 0.9; coefMax = 4; }; class ViewTower { icon = "\ca\ui\data\map_viewtower_ca.paa"; size = 16; color[] = {0, 0.35, 0.7, 1}; importance = 2.5 * 16 * 0.05; coefMin = 0.5; coefMax = 4; }; class Watertower { icon = "\ca\ui\data\map_watertower_ca.paa"; color[] = {0, 0.35, 0.7, 1}; size = 32; importance = 1.2 * 16 * 0.05; coefMin = 0.9; coefMax = 4; }; class Waypoint { icon = "\ca\ui\data\map_waypoint_ca.paa"; size = 16; color[] = {0, 0.35, 0.7, 1}; importance = 2.5 * 16 * 0.05; coefMin = 0.5; coefMax = 4; }; class WaypointCompleted { icon = "\ca\ui\data\map_waypoint_completed_ca.paa"; size = 16; color[] = {0, 0.35, 0.7, 1}; importance = 2.5 * 16 * 0.05; coefMin = 0.5; coefMax = 4; }; }; class KEGsRscControlsGroup { type = 15; idc = -1; style = 0; x = 0; y = 0; w = 1; h = 1; class VScrollbar { color[] = {1, 1, 1, 1}; width = 0.021; autoScrollRewind=0; autoScrollDelay=5; autoScrollSpeed=-1; }; class HScrollbar { color[] = {1, 1, 1, 1}; height = 0.028; }; class Controls {}; };// BAS f - waitForJIP // Version: 0-0-1 (2007-07-23) // Author(s): Raedor | zx64 // Thanks: zx64 for conversion to include format. // ==================================================================================== if ( (!isServer) && (player != player) ) then { waitUntil {player == player}; waitUntil {time > 10}; }; // JIP CHECK // Prevents the script executing until the player has synchronised correctly: #include "f_waitForJIP.sqf" // Spectating Script for Armed Assault // by Kegetys // Modifyed for Evoloution by KilJoy. //_player = _this select 0; _player = player; _killer = _this select 1; //_seagull = _this select 2; _seagull = vehicle player; // If seagull is valid we came from the respawn scene /* if(typeName _seagull != "string") then { _seagull setpos[-1000, -1000, 1000]; sleep 1.5; titleCut["","BLACK OUT", 1.5]; }; */ // Globals etc. if (isnil'spectate_events') then { spectate_events = compile preprocessFileLineNumbers "spect\specta_events.sqf"; }; //dwarden, time for preprocessing :) KEGsMouseButtons = [false, false]; KEGsMouseScroll = 0; KEGsMouseCoord = [0.5, 0.5]; KEGsUseNVG = false; KEGsMissileCamActive = false; KEGsUseMissileCam = false; KEGsMarkerNames = false; // True = display marker names and arrows KEGsMarkerType = 1; // 0 = disabled, 1 = names, 2 = types KEGsTags =false; // Particlesource tags KEGsAIfilter = true; // Filter AI units (only players displayed) KEGsFORMLfilter = true; KEGsClientAddonPresent = false; // Is client-side addon present? KEGsMarkerSize = 0.8; // Full map marker size KEGsMinimapZoom = 0.5; // Minimap zoom KEGsSelect = 0; // Used to change selected target KEGs1stGunner = false; // Gunner view on 1st person camera? KEGsDroppedCamera = false; // Free camera dropped (non-targeted with free motion)? KEGsCamForward = false; KEGsCamBack = false; KEGsCamLeft = false; KEGsCamRight = false; KEGsNeedUpdateLB = false; _mouseDeltaX = 0; _mouseDeltaY = 0; _sdistance = 1; // camera distance _fangle = 0; // Free camera angle _fangleY = 15; _flybydst = 35; // Distance of flyby camera (adjusted based on target speed) _szoom = 0.976; _markers = []; // Map markers showing positions of all units KEGsTagSources = []; // Particle sources for tags _lastTgt = 0; _nameCache = []; // Used to store valid names since name command cannot be trusted _maxDistance = 50; // Maximum distance for camera _maxZoom = 0.05; // Maximum zoom level _minZoom = 2; // Unit sides shown - Show all if sides not set if(format["%1", KEGsShownSides] == "scalar bool array string 0xe0ffffef") then { if(debug) then {KEGsShownSides = [west, east, resistance, civilian, sideEnemy, sideFriendly, sideLogic,sideUnknown]}else{KEGsShownSides = [west]}; }; if ((name player) in admins) then { KEGsShownSides = [west, east, resistance, civilian, sideEnemy, sideFriendly, sideLogic,sideUnknown]; } else {KEGsShownSides = [(side player)]}; // format ["DwDebug#KEGsShownSides: %1",KEGsShownSides] createVehicleLocal [0,0,0]; deathCam = []; _ehVehicles = []; // Used to keep track of added eventhandlers KEGsAllUnits = []; // Create trigger for retrieving all vehicles _t = createTrigger["EmptyDetector", getpos _player]; _t setTriggerType "NONE"; _t setTriggerStatements ["this", "KEGsAllUnits = thislist", ""]; _t setTriggerArea[50000, 50000, 0, false]; _t setTriggerActivation["ANY", "PRESENT", false]; // Wait until trigger assigns the array waitUntil{count KEGsAllUnits > 0}; if(typeName _seagull != "string") then { sleep 1; titleCut ["","BLACK IN", 8]; } else { titleText["","BLACK IN", 0]; }; // Create dialog & assign keyboard handler createDialog "rscSpectate"; disableSerialization; //Disable saving of script containing this command. After this, script can work with the data types which do not support serialization (UI types). _disp = (findDisplay 55001); _disp displaySetEventHandler["KeyDown", "[""KeyDown"",_this] call spectate_events"]; _disp displaySetEventHandler["KeyUp", "[""KeyUp"",_this] call spectate_events"]; // Hide menus by default ["ToggleCameraMenu",0] call spectate_events; ["ToggleTargetMenu",0] call spectate_events; ["ToggleHelp",0] call spectate_events; ["ToggleMap",1] call spectate_events; // IDC's from rsc _cCamera = 55002; _cTarget = 55003; _cName = 55004; _cLBCameras = 55005; _cLBTargets = 55006; _cCamerasBG = 55007; _cTargetsBG = 55008; _cMap = 55013; _cMapFull = 55014; _cDebug = 55100; _nearest = objNull; // Create cameras _pos = [(getpos _player select 0)-1+random 2, (getpos _player select 1)-1+random 2, 2]; KEGscam_static = "camera" camCreate _pos; KEGscam_target = "camera" camCreate _pos; // "Dummy" target camera for smooth transitions KEGscam_free = "camera" camCreate _pos; KEGscam_flyby = "camera" camCreate _pos; KEGscam_topdown = "camera" camCreate _pos; KEGscam_1stperson = "camera" camCreate _pos; // Dummy camera KEGscam_missile = "camera" camCreate _pos; // Missile camera KEGscam_fullmap = "camera" camCreate _pos; // Full map view camera _cameras = [KEGscam_free, KEGscam_static, KEGscam_flyby, KEGscam_topdown, KEGscam_1stperson]; _cameraNames = ["Free", "Chase", "Flyby", "Top-down", "1st person"]; _dummy = "helihempty" createVehicleLocal [0,0,0]; // Dummy object for distance command KEGscameras = _cameras; // Hack to allow access from events.sqf // Add cameras to listbox lbClear _cLBCameras; {lbAdd[_cLBCameras, _x]} foreach _cameraNames; // Add separator & toggles //_cLbSeparator = lbAdd[_cLBCameras, "---"]; //lbSetColor[_cLBCameras, _cLbSeparator, [0.5, 0.5, 0.5, 0.5]]; _cLbMissileCam = lbAdd[_cLBCameras, "Missile camera"]; _cLbToggleNVG = lbAdd[_cLBCameras, "Night vision"]; _cLbToggleTags = lbAdd[_cLBCameras, "Unit tags"]; _cLbToggleAiFilter = lbAdd[_cLBCameras, "Filter AI"]; _cLbToggleFORMLFilter = lbAdd[_cLBCameras, "FORM Leader"]; KEGs_tgtIdx = 0; KEGs_cameraIdx = 0; showcinemaborder false; lbClear _cLBTargets; onMapSingleClick "[""MapClick"",_pos] call spectate_events"; ["EventLogAdd",["Initialize",[1,1,1,1]]] call spectate_events; /* dwarden, was disabled*/ // Check for client side addon _foo = "KEGsAddon10" createVehicleLocal[-1000,-1000,0]; // //_foo = "KEGspect_bar_yellow" createVehicleLocal[-1000,-1000,0]; //dwarden,was disbled x2 if(!isNull _foo) then { deletevehicle _foo; KEGsClientAddonPresent = true; }; /* ^^ was disabled*/ // Spawn thread to display help reminder after a few seconds [] spawn {sleep(3);if(dialog) then {cutText["\n\n\n\n\nPress F1 for help","PLAIN DOWN", 0.75]}}; _camSelLast = 0; _tgtSelLast = 0; _mouseLastX = 0.5; _mouseLastY = 0.5; _nNoDialog = 0; _lastCheckNewUnits = -100; _lastUpdateMarkers = -100; _lastUpdateMarkerTypes = -100; _lastUpdateTags = -100; _lastAutoUpdateLB = time; KEGsCamPos = [0,0,0]; _cxpos = 0; _cypos = 0; _czpos = 0; _cspeedx = 0; _cspeedy = 0; _tbase = 0.1; _h = 2; // Main loop - Ugly double loop to avoid exit after 10000 iterations while{dialog} do { while{dialog} do { call { // Check for listbox selections if(_camSelLast != lbCurSel _cLBCameras) then { _cs = lbCurSel _cLBCameras; //if(_cs == _cLbSeparator) then {_cs = _camSelLast}; // Special for toggling missile camera if(_cs == _cLbMissileCam) then { KEGsUseMissileCam = !KEGsUseMissileCam; _cs = _camSelLast; }; // Special for toggling NVG if(_cs == _cLbToggleNVG) then { KEGsUseNVG = !KEGsUseNVG; _cs = _camSelLast; }; // Special for toggling tags if(_cs == _cLbToggleTags) then { KEGsTags = !KEGsTags; ["ToggleTags", [KEGsTags, (_cameras select KEGs_cameraIdx)]] call spectate_events; _cs = _camSelLast; }; // Special for toggling AI filter if(_cs == _cLbToggleAiFilter) then { KEGsAIfilter = !KEGsAIfilter; _cs = _camSelLast; KEGsNeedUpdateLB = true; // Request listbox update }; // Special for toggling FORMATION LEADER filter if(_cs == _cLbToggleFORMLFilter) then { KEGsFORMLfilter = !KEGsFORMLfilter; _cs = _camSelLast; KEGsNeedUpdateLB = true; // Request listbox update }; if(_cs != _camSelLast) then { // Selected another camera - disable dropped cam KEGsDroppedCamera = false; }; KEGs_cameraIdx = _cs; }; if(lbCurSel _cLBTargets > lbSize _cLBTargets) then { lbSetCurSel[_cLBTargets, lbSize _cLBTargets]; // Selection outside listbox size }; // Update selected target from listbox if(KEGsSelect != 0) then { lbSetCurSel[_cLBTargets, ((lbCurSel _cLBTargets)+KEGsSelect)]; KEGsSelect = 0; }; if(_tgtSelLast != lbCurSel _cLBTargets) then { KEGsDroppedCamera = false; KEGs_tgtIdx = lbValue[_cLBTargets, (lbCurSel _cLBTargets)]; }; // Process mouse movement _mouseDeltaX = _mouseLastX - (KEGsMouseCoord select 0); _mouseDeltaY = _mouseLastY - (KEGsMouseCoord select 1); if(!(KEGsMouseButtons select 0) and (KEGsMouseButtons select 1)) then { // Right mouse button - Adjust position _fangle = _fangle - (_mouseDeltaX*360); _fangleY=_fangleY + (_mouseDeltaY*180); if(_fangleY > 89) then {_fangleY = 89}; if(_fangleY < -89) then {_fangleY = -89}; }; if((KEGsMouseButtons select 0) and !(KEGsMouseButtons select 1)) then { // Left mouse button - Adjust distance _sdistance = _sdistance - (_mouseDeltaY*10); if(_sdistance > _maxDistance) then {_sdistance = _maxDistance}; if(_sdistance < -_maxDistance) then {_sdistance = -_maxDistance}; }; if(KEGsMouseScroll != 0) then { // Mouse scroll wheel - Adjust distance _sdistance = _sdistance - (KEGsMouseScroll*0.11); KEGsMouseScroll = KEGsMouseScroll * 0.75; if(_sdistance > _maxDistance) then {_sdistance = _maxDistance}; if(_sdistance < -_maxDistance) then {_sdistance = -_maxDistance}; }; if((KEGsMouseButtons select 0) and (KEGsMouseButtons select 1)) then { // Both mousebuttons - Adjust zoom _szoom = _szoom - (_mouseDeltaY*3); if(_szoom > _minZoom) then {_szoom = _minZoom}; if(_szoom < _maxZoom) then {_szoom = _maxZoom}; }; // Check for new units every 2 seconds if(time - _lastCheckNewUnits > 3) then { //dwarden-changed to 3 _lastCheckNewUnits = time; _allUnits = []; _allVehicles = []; // Avoid game logics _foo = []; {if(side _x != sideLogic) then {_foo = _foo + [_x]}} foreach KEGsAllUnits; {_allUnits = _allUnits + (crew _x);_allVehicles = _allVehicles + [_x]} foreach _foo; _newUnits = _allUnits - deathCam; _newVehicles = _allVehicles - _ehVehicles; if(count _newVehicles > 0) then { // Add event handlers to new vehicles _ehVehicles = _ehVehicles + _newVehicles; { // Add fired eventhandler for map indication _fh = _x addeventhandler["fired", {["UnitFired",_this] call spectate_events}]; // _kh = _x addeventhandler["killed", {["UnitKilled",_this] call spectate_events}]; //dwarden, was disabled _x setVariable["KEGsEHfired", _fh]; // _x setVariable["KEGsEHkilled", _kh]; //dwarden,was disabled } foreach _newVehicles; }; if(count _newUnits > 0) then { // Add new units to end of list deathCam = deathCam + _newUnits; // Request listbox update KEGsNeedUpdateLB = true; // Create markers { // Create marker _m = createMarkerLocal[format["KEGsMarker%1", count _markers], getpos _player]; _m setMarkerTypeLocal "Dot"; _m setMarkerSizeLocal[0.4, 0.4]; _markers = _markers + [_m]; // Set marker color if(side _x == west) then {_m setMarkerColorLocal "ColorBlue";}; if(side _x == east) then {_m setMarkerColorLocal "ColorRed";}; if(side _x == resistance) then {_m setMarkerColorLocal "ColorGreen";}; if(side _x == civilian) then {_m setMarkerColorLocal "ColorWhite";}; if(_x in (units group _player)) then {_m setMarkerColorLocal "ColorYellow";}; // Create particle source _s_pos=_x modelToWorld [0,0,0]; _s = "#particlesource" createvehiclelocal _s_pos; //_s = "#particlesource" createvehiclelocal (getpos _x); KEGsTagSources = KEGsTagSources + [[_x, _s]]; // If tags are on, turn them off and back again to include new units if(KEGsTags) then { ["ToggleTags",[false, (_cameras select KEGs_cameraIdx)]] call spectate_events; ["ToggleTags",[true, (_cameras select KEGs_cameraIdx)]] call spectate_events; }; } foreach _newUnits; }; }; // Request listbox update every 4 seconds to update dead units or jip player names if(time - _lastAutoUpdateLB > 4) then { _lastAutoUpdateLB = time; KEGsNeedUpdateLB = true; }; if(KEGsNeedUpdateLB) then { // Clear and re-fill targets listbox lbClear _cLBTargets; for "_idx" from 0 to ((count deathCam)-1) do { _x = deathCam select _idx; _name = ""; if(alive _x) then { // Unit is alive, use name command _name = name _x; _nameCache set[_idx, _name]; } else { // Dead unit, use cached name //_name = _nameCache select _idx; //tmp fix _name = "Unknown"; }; if((!KEGsAIfilter or isPlayer _x) and ((side _x) in KEGsShownSides)) then { _i = lbAdd[_cLBTargets, _name]; lbSetValue[_cLBTargets, _i, _idx]; // Value used to id unit /* if(side _x == east) then {lbSetColor[_cLBTargets, _i, [1,0.8,0.8,1]]}; if(side _x == west) then {lbSetColor[_cLBTargets, _i, [0.8,0.8,1,1]]}; if(side _x == resistance) then {lbSetColor[_cLBTargets, _i, [0.8,1,0.8,1]]}; if(side _x == civilian) then {lbSetColor[_cLBTargets, _i, [1,1,1,1]]}; */ if(side _x == west) then {lbSetColor[_cLBTargets, _i, [0,0,1,1]]}; //if((isFormationLeader _x) and (side _x == west)) then {lbSetColor[_cLBTargets, _i, [0.25,0.25,1,1]]}; if(side _x == east) then {lbSetColor[_cLBTargets, _i, [1,0,0,1]]}; //if((isFormationLeader _x) and (side _x == east)) then {lbSetColor[_cLBTargets, _i, [1,0.25,0.25,1]]}; if(side _x == resistance) then {lbSetColor[_cLBTargets, _i, [0,1,0,1]]}; //if((isFormationLeader _x) and (side _x == resistance)) then {lbSetColor[_cLBTargets, _i, [0.25,1,0.25,1]]}; if(side _x == civilian) then {lbSetColor[_cLBTargets, _i, [0.5,0.5,0.5,1]]}; //if((isFormationLeader _x) and (side _x == civilian)) then {lbSetColor[_cLBTargets, _i, [0.75,0.75,0.75,1]]}; if(_x in (units group _player)) then {lbSetColor[_cLBTargets, _i, [1,1,0,1]]}; // Your group members, yellow if((isPlayer _x) and (_x in (units group _player))) then {lbSetColor[_cLBTargets, _i, [1,0,1,1]]}; // Your group player members, magenta if(_x == _player) then {lbSetColor[_cLBTargets, _i, [0,1,1,1]]}; //yourself,cyan if(not alive _x) then { // Whoops, unit is dead, change color lbSetColor[_cLBTargets, _i, [0.25,0.25,0.25,1]]; }; //if(_x == KEGs_target) then { // Select target // Not a good idea //lbSetCurSel[_cLBTargets, _i]; //}; }; /* experimental formation leader filter */ if((!KEGsFORMLfilter and isFormationLeader _x) and ((side _x) in KEGsShownSides)) then { _i = lbAdd[_cLBTargets, _name]; lbSetValue[_cLBTargets, _i, _idx]; // Value used to id unit //if(side _x == west) then {lbSetColor[_cLBTargets, _i, [0,0,1,1]]}; if((isFormationLeader _x) and (side _x == west)) then {lbSetColor[_cLBTargets, _i, [0.33,0.33,1,1]]}; //if(side _x == east) then {lbSetColor[_cLBTargets, _i, [1,0,0,1]]}; if((isFormationLeader _x) and (side _x == east)) then {lbSetColor[_cLBTargets, _i, [1,0.33,0.33,1]]}; //if(side _x == resistance) then {lbSetColor[_cLBTargets, _i, [0,1,0,1]]}; if((isFormationLeader _x) and (side _x == resistance)) then {lbSetColor[_cLBTargets, _i, [0.33,1,0.33,1]]}; //if(side _x == civilian) then {lbSetColor[_cLBTargets, _i, [0.5,0.5,0.5,1]]}; if((isFormationLeader _x) and (side _x == civilian)) then {lbSetColor[_cLBTargets, _i, [0.75,0.75,0.75,1]]}; //if(_x in (units group player)) then {lbSetColor[_cLBTargets, _i, [1,1,0,1]]}; // Your group members, yellow //if((isPlayer _x) and (_x in (units group player))) then {lbSetColor[_cLBTargets, _i, [1,0,1,1]]}; // Your group player members, magenta //if(_x == _player) then {lbSetColor[_cLBTargets, _i, [0,1,1,1]]}; //yourself,cyan /* if(not alive _x) then { // Whoops, unit is dead, change color lbSetColor[_cLBTargets, _i, [0.25,0.25,0.25,1]]; }; */ }; }; KEGsNeedUpdateLB = false; }; // Check limits if(KEGs_tgtIdx >= count deathCam) then {KEGs_tgtIdx = (count deathCam)-1;}; if(KEGs_tgtIdx < 0) then {KEGs_tgtIdx = 0}; if(KEGs_cameraIdx < 0) then {KEGs_cameraIdx = 0}; if(KEGs_cameraIdx >= count _cameras) then {KEGs_cameraIdx = (count _cameras)-1;}; // Select camera, get target if(!KEGsMissileCamActive) then { (_cameras select KEGs_cameraIdx) cameraEffect["internal", "BACK"]; KEGs_target = deathCam select KEGs_tgtIdx; }; lbSetCurSel[_cLBCameras, KEGs_cameraIdx]; if(lbValue[_cLBTargets, (lbCurSel _cLBTargets)] != KEGs_tgtIdx) then { // Find listbox element with matching value for "_idx" from 0 to (lbSize _cLBTargets) do { if(lbValue[_cLBTargets, (lbCurSel _cLBTargets)] == KEGs_tgtIdx) then { lbSetCurSel[_cLBTargets, _idx]; _found = true; }; }; }; //if(lbCurSel _cLBTargets != KEGs_tgtIdx) then { // lbSetCurSel[_cLBTargets, KEGs_tgtIdx]; // }; camUseNVG KEGsUseNVG; if(ctrlVisible _cMapFull) then { KEGscam_fullmap cameraEffect["internal", "BACK"]; }; //ctrlSetText[_cDebug, format["%1", count _markers]]; // Update tag particlesources if(time - _lastUpdateTags > (1/5)) then { _lastUpdateTags = time; if(KEGsTags) then { ["ToggleTags", [true, (_cameras select KEGs_cameraIdx)]] call spectate_events; }; }; // Update markers 10fps _rate = 30; if(count _markers > 100) then {_rate = 15}; // Update large number of markers less often if(count _markers > 200) then {_rate = 7.5}; // Update very large number of markers less often if(time - _lastUpdateMarkers > (1/_rate)) then { _lastUpdateMarkers = time; // setMarkerTypeLocal is very slow, call it only once per second _doMarkerTypes = false; if(time - _lastUpdateMarkerTypes > 1) then { _lastUpdateMarkerTypes = time; _doMarkerTypes = true; // Allow update marker types }; if(ctrlVisible _cMapFull) then { // Position camera in the middle of full map, for sound and // smoother marker motion (distant objects appear less smooth) _mapFull = _disp displayctrl _cMapFull; _mappos = _mapFull posScreenToWorld[0.5, 0.5]; KEGscam_fullmap camsettarget _mappos; KEGscam_fullmap camsetrelpos [0, -1, 150]; KEGscam_fullmap camcommit 0; }; _markedVehicles = []; // Keep track of vehicles with markers to avoid multiple markers for one vehicle for "_i" from 0 to ((count _markers)-1) do { _m = _markers select _i; _u = (deathCam select _i); _m setMarkerPosLocal (getpos vehicle _u); if(!((side _u) in KEGsShownSides)) then { // We arent' supposed to show this side unit - hide marker if(_doMarkerTypes) then {_m setMarkerTypeLocal "empty"}; } else { if(KEGsMarkerNames or KEGsMinimapZoom < 0.15) then { // Set full screen map marker types - Also zoomed minimap if(ctrlVisible _cMapFull) then { switch(KEGsMarkerType) do { case 0: { // No text _m setMarkerTextLocal ""; }; case 1: { // Names if(alive (vehicle _u)) then { if(name (vehicle _u) != "Error: no unit") then {_m setMarkerTextLocal name ( _u)}; }; }; case 2: { // Types _m setMarkerTextLocal getText (configFile >> "CfgVehicles" >> format["%1", typeOf (vehicle _u)] >> "DisplayName"); }; }; } else { // Minimap with detailed icons but no text _m setMarkerTextLocal ""; }; if(KEGsClientAddonPresent) then { // With client side addon use better icons _type = getText(configFile >> "CfgVehicles" >> format["%1", typeOf (vehicle _u)] >> "simulation"); _icon = "Arrow"; switch(_type) do { case "tank": {_icon = "KEGsTank"}; case "car": {_icon = "KEGsCar"}; case "soldier": {_icon = "KEGsMan"}; case "ship": {_icon = "KEGsShip"}; case "airplane": {_icon = "KEGsPlane"}; case "helicopter": {_icon = "KEGsHelicopter"}; case "motorcycle": {_icon = "KEGsMotorcycle"}; case "parachute": {_icon = "KEGsParachute"}; }; if(_doMarkerTypes) then {_m setMarkerTypeLocal _icon}; _m setMarkerSizeLocal[0.42*KEGsMarkerSize, 0.42*KEGsMarkerSize]; } else { // No client side addon - basic markers if(_doMarkerTypes) then {_m setMarkerTypeLocal "Arrow"}; if(_u == vehicle _u) then { _m setMarkerSizeLocal[0.33*KEGsMarkerSize, 0.27*KEGsMarkerSize]; } else { _m setMarkerSizeLocal[0.42*KEGsMarkerSize, 0.42*KEGsMarkerSize]; }; }; _m setMarkerDirLocal (getdir (vehicle _u)); } else { _m setMarkerTextLocal ""; if(_doMarkerTypes) then {_m setMarkerTypeLocal "Dot"}; _m setMarkerSizeLocal[0.4,0.4]; }; }; if(not alive _u) then { if(KEGsClientAddonPresent) then { // Switch to darker color, cant use side since the unit is already dead if(getMarkerColor _m == "ColorBlue") then {_m setMarkerColorLocal "KEGsDarkBlue"}; if(getMarkerColor _m == "ColorRed") then {_m setMarkerColorLocal "KEGsDarkRed"}; if(getMarkerColor _m == "ColorGreen") then {_m setMarkerColorLocal "KEGsDarkGreen"}; if(getMarkerColor _m == "ColorWhite") then {_m setMarkerColorLocal "KEGsGrey"}; } else { _m setMarkerColorLocal "ColorBlack" }; }; if(vehicle _u in _markedVehicles) then { // This vehicle was already marked, hide marker _m setMarkerTypeLocal "Empty"; } else { _markedVehicles = _markedVehicles + [vehicle _u]; }; }; // Follow target with small map _map = _disp displayctrl _cMap; ctrlMapAnimClear _map; if(KEGsDroppedCamera) then { // Center on dropped camera position _map ctrlMapAnimAdd[0.3, KEGsMinimapZoom, [_cxpos, _cypos,0]]; } else { // Center on target _map ctrlMapAnimAdd[0.3, KEGsMinimapZoom, getpos KEGs_target]; }; ctrlMapAnimCommit _map; }; // Check if target changed and center main map if(KEGs_tgtIdx != _lastTgt) then { _map = _disp displayctrl _cMapFull; ctrlMapAnimClear _map; _map ctrlMapAnimAdd [0.2, 1.0, getpos (deathcam select KEGs_tgtIdx)]; ctrlMapAnimCommit _map; }; if((_cameras select KEGs_cameraIdx) == KEGscam_1stperson) then { // 1st person view if(KEGs1stGunner) then { (vehicle KEGs_target) switchCamera "GUNNER"; } else { (vehicle KEGs_target) switchCamera "INTERNAL"; }; (vehicle KEGs_target) cameraEffect ["terminate","FRONT"]; }; // Get target properties _dir = getdir vehicle KEGs_target; _bb = boundingBox vehicle KEGs_target; //_h = ((_bb select 1) select 2) - ((_bb select 0) select 2); // Height //dwarden,was disabled _foo = ((_bb select 1) select 2) - ((_bb select 0) select 2); // Height _l = ((_bb select 1) select 1) - ((_bb select 0) select 1); // Length _w = ((_bb select 1) select 0) - ((_bb select 0) select 0); // Width _hstr = 0.15; _h = (_foo*_hstr)+(_h*(1-_hstr)); // Set UI texts _role = ""; if(vehicle KEGs_target != KEGs_target) then { /* if(KEGs_target == driver vehicle KEGs_target) then {_role = "(Driver)"}; if(KEGs_target == gunner vehicle KEGs_target) then {_role = "(1st Gunner)"}; //first gunner if(KEGs_target == commander vehicle KEGs_target) then {_role = "(Commander)"}; */ /* added by dwarden */ // _role = AssignedVehicleRole KEGs_target; /* [] - Not assigned to any vehicle ["Driver"] - Assigned as driver ["Cargo"] - Assigned as cargo ["TURRET", [turret path]] - Assigned to a turret ["TURRET", [[0]] - 1st Gunner ["TURRET", [[1]] - 2nd Gunner ["TURRET", [0,0]] - Commander */ _role0 = AssignedVehicleRole KEGs_target; //player groupchat format ["Role: %1",_role0]; //array with gunners and commanders if( _role0 select 0 == "TURRET" ) then { _gunners = _role0 select 1; _gunner = _gunners select 0; _gunnersc = count _gunners; if (_gunnersc==1) then { if (_gunner == 0)then { _role= "(Gunner)"; if (isFormationLeader KEGs_target) then { _role = _role + "(Form.Ldr)"; }; if (Leader KEGs_target == KEGs_Target) then { _role = _role + "(Grp.Ldr)"; }; } else { _role= format ["(Gunner 'position: %1')",(_gunner+1)] ; if (isFormationLeader KEGs_target) then { _role = _role + "(Form.Ldr)"; }; if (Leader KEGs_target == KEGs_Target) then { _role = _role + "(Grp.Ldr)"; }; }; } else { if (_gunnersc == 2) then { _commander = _gunners select 1; if (_commander == 0) then { _role= "(Commander)"; if (isFormationLeader KEGs_target) then { _role = _role + "(Form.Ldr)"; }; if (Leader KEGs_target == KEGs_Target) then { _role = _role + "(Grp.Ldr)"; }; } else { _role= format ["(Commander 'position: %1')",(_commander+1)] ; if (isFormationLeader KEGs_target) then { _role = _role + "(Form.Ldr)"; }; if (Leader KEGs_target == KEGs_Target) then { _role = _role + "(Grp.Ldr)"; }; }; }; }; }; /* if( _role0 select 0 == "TURRET" ) then { if (_gunner == 0) then { _role= "(Gunner)" } else { _role= format ["(Gunner 'position: %1')",(_gunner+1)] }; }; if( _role0 select 0 == "TURRET" ) then { if (_commander == 0) then { _role= "(Commander)" } else { _role= format ["(Commander 'position: %1')",(_commander+1)] }; }; */ if( _role0 select 0 == "Driver" ) then { if( (vehicle KEGs_target) isKindOf "Air" ) then { _altASL = round ((getposAsl (vehicle KEGs_target)) select 2); _objz = "Misc01" createVehicle[ 0,0,0 ]; _objz setPos[ ( getPos (vehicle KEGs_target) )select 0,(getPos (vehicle KEGs_target) )select 1,0 ]; _altAGL = round ((vehicle KEGs_target) distance _objz); deleteVehicle _objz; _role = "(Pilot)" ; if (isFormationLeader KEGs_target) then { _role = _role + "(Form.Ldr)"; }; if (Leader KEGs_target == KEGs_Target) then { _role = _role + "(Grp.Ldr)"; }; _role = format ["%1,altitude(ASL: %2)(AGL: %3)",_role,_altASL,_altAGL]; } else { _role = "(Driver)"; if (isFormationLeader KEGs_target) then { _role = _role + "(Form.Ldr)"; }; if (Leader KEGs_target == KEGs_Target) then { _role = _role + "(Grp.Ldr)"; }; }; }; if( _role0 select 0 == "Cargo" ) then { _role = "(Passenger)"; if (isFormationLeader KEGs_target) then { _role = _role + "(Form.Ldr)"; }; if (Leader KEGs_target == KEGs_Target) then { _role = _role + "(Grp.Ldr)"; }; }; //format ["#Role %1 /+/ In Vehicle: %2 unit got this role: %3",date,(vehicle KEGs_target),(AssignedVehicleRole KEGs_target)] createVehicleLocal [0,0,0]; /* */ }; _name = "Unknown"; if(alive KEGs_target) then { _name = name KEGs_target; if(_name == "Error: no unit") then {_name = "Unknown"}; }; if(KEGsDroppedCamera and isNull _nearest) then { // Dropped camera mode - no target _name = ""; _role = ""; }; if ((vehicle KEGs_target == KEGs_target) and (isFormationLeader KEGs_target)) then { _role = _role + "(Form.Ldr)"; }; if ((vehicle KEGs_target == KEGs_target) and (Leader KEGs_target == KEGs_Target)) then { _role = _role + "(Grp.Ldr)"; }; _healthstatus = damage KEGs_target; /* if ( _damagestatus < 0.0001 ) then { _damagestatus = 0; } ; if ( (_damagestatus < 0.1 ) AND (_damagestatus > 0 ) ) then { _damagestatus = 100*(_damagestatus); }; if ((damage (vehicle KEGs_target) ) > 0.1 ) then { _damagestatus = round (100*(_damagestatus)); }; */ _role = format ["%1,health:(%2)",_role,_healthstatus]; if(vehicle KEGs_target != KEGs_target) then { _fuelstatus = fuel (vehicle KEGs_target); if ( _fuelstatus < 0.0001 ) then { _fuelstatus = 0; } ; if ( (_fuelstatus < 0.1 ) AND (_fuelstatus > 0 ) ) then { _fuelstatus = 100*(_fuelstatus); }; if ((fuel (vehicle KEGs_target) ) > 0.1 ) then { _fuelstatus = round (100*(_fuelstatus)); }; _speed = round (speed (vehicle KEGs_target)); _damagestatus = damage (vehicle KEGs_target); /* if ( _damagestatus < 0.0001 ) then { _damagestatus = 0; } ; if ( (_damagestatus < 0.1 ) AND (_damagestatus > 0 ) ) then { _damagestatus = 100*(_damagestatus); }; if ((damage (vehicle KEGs_target) ) > 0.1 ) then { _damagestatus = round (100*(_damagestatus)); }; */ _role = format ["%1,fuel:(%2),spd:(%3),dmg:(%4)",_role,_fuelstatus,_speed,_damagestatus]; }; if(vehicle KEGs_target != KEGs_target) then { _vwArray = weapons (vehicle KEGs_target); _role = format ["%1,vw:(%2)",_role,_vwArray]; }; _iwArray = weapons KEGs_target; _role = format ["%1,iw:(%2)",_role,_iwArray]; ctrlSetText[_cName, format["%1 %2", _name, _role]]; ctrlSetText[_cCamera, format["Camera: %1", _cameraNames select KEGs_cameraIdx]]; // Set name color to gray if dropped cam _ccName = _disp displayctrl _cName; if(KEGsDroppedCamera) then { _ccName ctrlSetTextColor[0.6, 0.6, 0.6, 1]; } else { _ccName ctrlSetTextColor[1, 1, 1, 1]; }; // Set toggle text color for camera menu if(KEGsUseMissileCam) then {lbSetColor[_cLBCameras, _cLbMissileCam, [1, 0.5, 0, 1]]} else {lbSetColor[_cLBCameras, _cLbMissileCam, [1,1,1,0.33]]}; if(KEGsUseNVG) then {lbSetColor[_cLBCameras, _cLbToggleNVG, [1, 0.5, 0, 1]]} else {lbSetColor[_cLBCameras, _cLbToggleNVG, [1,1,1,0.33]]}; if(KEGsTags) then {lbSetColor[_cLBCameras, _cLbToggleTags, [1, 0.5, 0, 1]]} else {lbSetColor[_cLBCameras, _cLbToggleTags, [1,1,1,0.33]]}; if(KEGsAIfilter) then {lbSetColor[_cLBCameras, _cLbToggleAiFilter, [1, 0.5, 0, 1]]} else {lbSetColor[_cLBCameras, _cLbToggleAiFilter, [1,1,1,0.33]]}; if(KEGsFORMLfilter) then {lbSetColor[_cLBCameras, _cLbToggleFORMLFilter, [1, 0.5, 0, 1]]} else {lbSetColor[_cLBCameras, _cLbToggleFORMLFilter, [1,1,1,0.33]]}; if(KEGsDroppedCamera) then { // Dropped free camera, moved with WSAD keys if(KEGs_cameraIdx != 0) then { // User changed camera KEGsDroppedCamera = false; }; // Adjust speed from buttons held down _spd = (_sdistance max 1)*20; if(KEGsCamForward) then { _cspeedx = _cspeedx + ((_spd*_tbase)*sin _fangle); _cspeedy = _cspeedy + ((_spd*_tbase)*cos _fangle); }; if(KEGsCamBack) then { _cspeedx = _cspeedx + ((-_spd*_tbase)*sin _fangle); _cspeedy = _cspeedy + ((-_spd*_tbase)*cos _fangle); }; if(KEGsCamLeft) then { _cspeedx = _cspeedx + ((_spd*_tbase)*sin (_fangle-90)); _cspeedy = _cspeedy + ((_spd*_tbase)*cos (_fangle-90)); }; if(KEGsCamRight) then { _cspeedx = _cspeedx + ((-_spd*_tbase)*sin (_fangle-90)); _cspeedy = _cspeedy + ((-_spd*_tbase)*cos (_fangle-90)); }; // Move camera _cxpos = _cxpos + (_cspeedx*_tbase); _cypos = _cypos + (_cspeedy*_tbase); _czpos = 0; //_h = 2; // Static camera height _l = 2.2; // Slow down _bstr = 5; _cspeedx = _cspeedx * ((1.0-(_tbase*_bstr)) max 0); _cspeedy = _cspeedy * ((1.0-(_tbase*_bstr)) max 0); // Check for nearby targets _dummy setpos[_cxpos, _cypos, 1.5]; _objs = [_cxpos, _cypos, 1.5] nearObjects 5; _nearest = objNull; _dist = 10; { { _d = _dummy distance _x; if(_d < _dist and _x in deathCam and alive _x) then {_nearest = _x;_dist = _d;}; } foreach crew _x; } foreach _objs; if(!isNull _nearest) then {KEGs_tgtIdx = deathCam find _nearest}; } else { // Set targets for all cameras /* _cxpos = getpos vehicle KEGs_target select 0; _cypos = getpos vehicle KEGs_target select 1; _czpos = getpos vehicle KEGs_target select 2; */ _c_pos=(vehicle KEGs_target) modelToWorld [0,0,0]; _cxpos = _c_pos select 0; _cypos = _c_pos select 1; _czpos = _c_pos select 2; }; KEGscam_target camSetPos[_cxpos, _cypos, _czpos+(_h*0.7)]; KEGscam_static camSetTarget KEGscam_target; KEGscam_free camSetTarget[_cxpos, _cypos, _czpos+(_h*0.6)]; KEGscam_flyby camSetTarget KEGscam_target; KEGscam_topdown camSetTarget[_cxpos, _cypos, _czpos+(_h*0.6)]; {_x camSetFov _szoom} foreach _cameras; // Static camera, follows unit from behind KEGscam_static camSetRelPos[sin(_dir)*(-(_l*_sdistance)), cos(_dir)*(-(_l*_sdistance)), 0.6*abs _sdistance]; // Free camera, user rotates camera around target _d = (-(_l*(0.3 max _sdistance))); _z = sin(_fangleY)*(_l*(0.3 max _sdistance)); KEGscam_free camSetRelPos[(sin(_fangle)*_d)*cos(_fangleY), (cos(_fangle)*_d)*cos(_fangleY), _z]; KEGscam_free camCommit 0; // Flyby camera, no user control except zoom if(KEGs_target distance KEGscam_flyby > (_flybydst*1.1)) then { _flybydst = 20+(speed vehicle KEGs_target); KEGscam_flyby camSetRelPos[sin(_dir)*_flybydst, cos(_dir)*_flybydst, 1+((random _h)*1.5)]; KEGscam_flyby camCommit 0; KEGscam_target camCommit 0; }; // Top-down camera KEGscam_topdown camSetRelPos[0.0, -0.01, 2+((0 max _sdistance)*15)]; KEGscam_topdown camCommit 0; // Commit static and flyby cameras _comSpeed = 1.0 - ((speed vehicle KEGs_target)/70); if(_comSpeed < 0.0) then {_comSpeed = 0.0;}; if((vehicle KEGs_target) distance KEGscam_static > 650) then {_comSpeed = 0}; // Jump immediately to distant target KEGscam_static camCommit _comSpeed/2; KEGscam_target camCommit _comSpeed/3; KEGscam_flyby camCommit _comSpeed; _mouseLastX = KEGsMouseCoord select 0; _mouseLastY = KEGsMouseCoord select 1; _camSelLast = lbCurSel _cLBCameras; _tgtSelLast = lbCurSel _cLBTargets; _lastTgt = KEGs_tgtIdx; }; // Wait a moment. 150fps ought to be enough for everyone :-) _tt = time; sleep(1/180);//1/150 _tbase = time-_tt; }}; // Dialog closed with esc key titleText["","BLACK IN", 0.5]; // Destroy cameras, markers, particlesources, etc. {camDestroy _x} foreach _cameras; deletevehicle KEGscam_target; deletevehicle KEGscam_missile; deletevehicle KEGscam_fullmap; {deletemarkerlocal _x} foreach _markers; deletevehicle _t; camUseNVG false; KEGsTags = false; onMapSingleClick ""; {deletevehicle (_x select 1)} foreach KEGsTagSources; KEGsTagSources = []; // Remove eventhandlers TODO: does this work properly? { _fh = _x getVariable "KEGsEHfired"; // _kh = _x getVariable "KEGsEHkilled"; //dwarden,was disabled if(typeName _fh == "SCALAR") then {_x removeEventHandler["fired", _fh]}; // if(typeName _kh == "SCALAR") then {_x removeEventHandler["killed", _kh]}; //dwarden, was disabled } foreach _ehVehicles; /* // Create a butterfly for player to fly with _bpos = [(getpos (vehicle KEGs_target) select 0)-5+random 10, (getpos (vehicle KEGs_target) select 1)-5+random 10, 1]; _bird = "ButterFly" createVehicle _bpos; _bird setvelocity[0,0,5]; _bird setpos _bpos; _bird switchCamera "INTERNAL"; _bird cameraEffect["terminate","FRONT"]; _bird camCommand "manual on"; KEGsBird = _bird; onMapSingleClick "KEGsBird setpos [_pos select 0, _pos select 1, 2];KEGsBird setvelocity[0,0,5];"; cutText["\n\n\n\n\nLand on ground to return to spectating\nClick at map to jump to location","PLAIN DOWN", 0.75]; // Wait until landed, delete bird & restart script waitUntil{getpos _bird select 2 < 0.05 and speed _bird < 1}; */ _seagull switchCamera "INTERNAL"; _seagull cameraEffect["terminate","FRONT"]; [] call EVO_ResetClick;// // Spectating Script for Armed Assault // by Kegetys // #include "common.hpp" #define BORDERSIZE 0.06 #define BORDERXSIZE 0.015 #define CMENUWIDTH 0.1575 // Camera menu width #define TMENUWIDTH 0.200 // Target menu width #define MENUHEIGHT 0.25 #define MAPWIDTH 0.3 #define MAPHEIGHT 0.28 #define MAPTXTSIZE 0.02 #define ELOGWIDTH 0.900 //#define ELOGHEIGHT 0.1525 #define ELOGHEIGHT 0.0 #define IDC_MAIN 55001 #define IDC_CAMERA 55002 #define IDC_TARGET 55003 #define IDC_NAME 55004 #define IDC_MENUCAM 55005 #define IDC_MENUTGT 55006 #define IDC_MENUCAMB 55007 #define IDC_MENUTGTB 55008 #define IDC_BG1 55009 #define IDC_BG2 55010 #define IDC_TITLE 55011 #define IDC_HELP 55012 #define IDC_MAP 55013 #define IDC_MAPFULL 55014 #define IDC_MAPFULLBG 55015 #define IDC_EVENTLOG 50016 #define IDC_DEBUG 55100 #define COL_ORANGE {1, 0.5, 0, 1} #define COL_GRAY {0.2, 0.2, 0.2, 1} class rscSpectate { idd = IDC_MAIN; movingEnable = false; class controls { class mouseHandler: KEGsRscControlsGroup { class ScrollBar { color[] = {1,1,1,0.6}; colorActive[] = {1,1,1,1}; colorDisabled[] = {1,1,1,0.3}; thumb = "\ca\ui\data\ui_scrollbar_thumb_ca.paa"; arrowFull = "\ca\ui\data\ui_arrow_top_active_ca.paa"; arrowEmpty = "\ca\ui\data\ui_arrow_top_ca.paa"; border = "\ca\ui\data\ui_border_scroll_ca.paa"; }; onMouseMoving = "[""MouseMoving"",_this] call spectate_events"; onMouseButtonDown = "[""MouseButtonDown"",_this] call spectate_events"; onMouseButtonUp = "[""MouseButtonUp"",_this] call spectate_events"; onMouseZChanged = "[""MouseZChanged"",_this] call spectate_events"; idc = 123; x = 0.0; y = 0.0; w = 1.0; h = 1.0; colorBackground[] = {0.2, 0.0, 0.0, 0.0}; }; // Borders and title text class BackgroundTop: KEGsRscText { idc = IDC_BG1; x = -3.0; y = -1.0; w = 7.0; h = BORDERSIZE+1; colorBackground[] = {0.0, 0.0, 0.0, 1.0}; }; class BackgroundBottom: BackgroundTop { idc = IDC_BG2; y = 1.0-BORDERSIZE; }; class title : BackgroundTop { idc = IDC_TITLE; colorBackground[] = {0.0, 0.0, 0.0, 0.0}; text = "SPECTATING"; style = 2; sizeEx = 0.035; colorText[] = {1.0, 0.0, 0.0, 1.0}; shadow = true; y = 0.0; h = BORDERSIZE; font = "Zeppelin32"; } // Camera menu class menuCameras : KEGsRscText { idc = IDC_MENUCAMB; style = ST_HUD_BACKGROUND; x = BORDERXSIZE; y = BORDERSIZE; w = CMENUWIDTH; h = MENUHEIGHT; text = ; colorBackground[] = {0, 0, 0, 0.7}; }; class menuCamerasLB : KEGsRscListBox { class ScrollBar { color[] = {1,1,1,0.6}; colorActive[] = {1,1,1,1}; colorDisabled[] = {1,1,1,0.3}; thumb = "\ca\ui\data\ui_scrollbar_thumb_ca.paa"; arrowFull = "\ca\ui\data\ui_arrow_top_active_ca.paa"; arrowEmpty = "\ca\ui\data\ui_arrow_top_ca.paa"; border = "\ca\ui\data\ui_border_scroll_ca.paa"; }; autoScrollRewind=0; autoScrollDelay=5; autoScrollSpeed=-1; maxHistoryDelay=1; idc = IDC_MENUCAM; x = BORDERXSIZE; y = BORDERSIZE; w = CMENUWIDTH; h = MENUHEIGHT; colorSelect[] = COL_ORANGE; colorSelect2[] = COL_ORANGE; colorSelectBackground[] = COL_GRAY; colorSelectBackground2[] = COL_GRAY; sizeEx = 0.025; } // Targets menu class menuTargets : KEGsRscText { idc = IDC_MENUTGTB; style = ST_HUD_BACKGROUND; x = 1.0-BORDERXSIZE-TMENUWIDTH; y = BORDERSIZE; w = TMENUWIDTH; h = MENUHEIGHT; text = ; colorBackground[] = {0, 0, 0, 0.7}; }; class menuTargetsLB : KEGsRscListBox { class ScrollBar { color[] = {1,1,1,0.6}; colorActive[] = {1,1,1,1}; colorDisabled[] = {1,1,1,0.3}; thumb = "\ca\ui\data\ui_scrollbar_thumb_ca.paa"; arrowFull = "\ca\ui\data\ui_arrow_top_active_ca.paa"; arrowEmpty = "\ca\ui\data\ui_arrow_top_ca.paa"; border = "\ca\ui\data\ui_border_scroll_ca.paa"; }; autoScrollRewind=0; autoScrollDelay=5; autoScrollSpeed=-1; maxHistoryDelay=1; idc = IDC_MENUTGT; x = 1.0-BORDERXSIZE-TMENUWIDTH; y = BORDERSIZE; w = TMENUWIDTH; h = MENUHEIGHT; colorSelect[] = COL_ORANGE; colorSelect2[] = COL_ORANGE; colorSelectBackground[] = COL_GRAY; colorSelectBackground2[] = COL_GRAY; colorScrollbar[] = COL_ORANGE; colorText[] = {1, 1, 1, 1}; sizeEx = 0.025; period = 0; } // Top texts class tCamera : KEGsRscActiveText { idc = IDC_CAMERA; x = BORDERXSIZE; y = 0.0; w = 1.0-(2*BORDERXSIZE); h = BORDERSIZE; text = "Camera"; style = 0; sizeEx = 0.025; color[] = {1.0, 1.0, 1.0, 0.9}; shadow = true; font = "Zeppelin32"; onMouseButtonUp = "[""ToggleCameraMenu"",0] call spectate_events"; } class tTarget : tCamera { idc = IDC_TARGET; text = "Target"; style = 1; onMouseButtonUp = "[""ToggleTargetMenu"",0] call spectate_events"; } // Bottom texts class tName : KEGsRscText { idc = IDC_NAME; x = BORDERXSIZE;y= 1.0-BORDERSIZE; w = 1.0-(BORDERXSIZE); h = BORDERSIZE; text = "Unknown"; style = 0; sizeEx = 0.015; //0.030 colorText[] = {1.0, 1.0, 1.0, 0.9}; font = "Zeppelin32"; } // Help text class tHelp : KEGsRscText { type = 13; idc = IDC_HELP; x = BORDERXSIZE*3;y=BORDERSIZE*3; w = 1-(2*BORDERXSIZE*3); h = 1.0-(2*BORDERSIZE*2); text = "Spectating Script v1.01 by Kegetys

Click at the camera/target text at the top to open camera/target menus.
Units on the map can be clicked to target them

Keyboard controls:
A/D - Previous/Next target
W/S - Previous/Next camera
1-5 - Direct camera change
N - 3D view: Toggle night vision on/off
N - Full map: Toggle marker text off/names/types
T - Toggle unit tags on/off
F - Toggle AI filter on/off
G - Toggle Group/Formation Leader filter on/off
Tab - Toggle UI on/off
M - Toggle map on/full/off
Numpad plus/minus - Increase/decrease full map marker size
Space - Drop camera (W,S,A,D keys = movement)
Space - Toggle gunsight (1st person view)
Esc - Butterfly mode

Mouse controls:
Right button - Rotate camera (free camera mode only)
Left button - Move camera
Left and right button - Zoom

Download the client-side addon from
http://www.kegetys.net for enhanced functionality
Improvement modifications by Dwarden
"; style = 2; sizeEx = 0.025; size = 0.025; colorText[] = {1.0, 1.0, 1.0, 1.0}; color[] = {0.0, 0.0, 0.0, 1.0}; font = "LucidaConsoleB"; class Attributes{ font = "Bitstream"; color = "#ffffff"; align = "left"; shadow = true; }; } // Debug text class tDebug : tCamera { idc = IDC_DEBUG; text = ""; style = 2; x = 0; y = 0; w = 1; h = 1; action =""; } // Map class map : KEGsRscMapControl { colorOutside[] = {0,0,0,1}; colorRailWay[] = {0,0,0,1}; maxSatelliteAlpha = 0; alphaFadeStartScale = 1; alphaFadeEndScale = 1.1; class Task { icon = "\ca\ui\data\map_waypoint_ca.paa"; size = 20; color[] = {0,0.9,0,1}; importance = "1.2 * 16 * 0.05"; coefMin = 0.9; coefMax = 4; }; class CustomMark { icon = "\ca\ui\data\map_waypoint_ca.paa"; color[] = {0,0,1,1}; size = 18; importance = 1; coefMin = 1; coefMax = 1; }; idc = IDC_MAP; x = 1.0-MAPWIDTH;y=1.0-MAPHEIGHT; w = MAPWIDTH; h = MAPHEIGHT; colorBackground[] = {0.7, 0.7, 0.7, 0.75}; //sizeEx = 0.02; sizeExLabel = MAPTXTSIZE; sizeExGrid = MAPTXTSIZE; sizeExUnits = MAPTXTSIZE; sizeExNames = MAPTXTSIZE; sizeExInfo = MAPTXTSIZE; sizeExLevel = MAPTXTSIZE; showCountourInterval = "false"; onMouseZChanged = "[""MouseZChangedminimap"",_this] call spectate_events"; class Command { icon = "#(argb,8,8,3)color(1,1,1,1)"; color[] = {0, 0, 0, 1}; size = 18; importance = 1; coefMin = 1; coefMax = 1; }; class ActiveMarker { color[] = {0.3, 0.1, 0.9, 1}; size = 50; }; } // Fullscreen map class mapFullBG : BackgroundTop { idc = IDC_MAPFULLBG; x = -3;y=-3; w = 9;h=9; colorBackground[] = {0.0, 0.0, 0.0, 1.0}; } class mapFull : map { colorOutside[] = {0,0,0,1}; colorRailWay[] = {0,0,0,1}; maxSatelliteAlpha = 0; alphaFadeStartScale = 1; alphaFadeEndScale = 1.1; showCountourInterval = "true"; idc = IDC_MAPFULL; x = 0;y=BORDERSIZE; w = 1;h=1.0-(BORDERSIZE*2); colorBackground[] = {0.85, 0.85, 0.85, 1.0}; } // Fullscreen event log class mapFullEventLog : KEGsRscListBox { class ScrollBar { color[] = {1,1,1,0.6}; colorActive[] = {1,1,1,1}; colorDisabled[] = {1,1,1,0.3}; thumb = "\ca\ui\data\ui_scrollbar_thumb_ca.paa"; arrowFull = "\ca\ui\data\ui_arrow_top_active_ca.paa"; arrowEmpty = "\ca\ui\data\ui_arrow_top_ca.paa"; border = "\ca\ui\data\ui_border_scroll_ca.paa"; }; autoScrollRewind=0; autoScrollDelay=5; autoScrollSpeed=-1; maxHistoryDelay=1; idc = IDC_EVENTLOG; x = 0; y = 1-ELOGHEIGHT; w = ELOGWIDTH; h = ELOGHEIGHT; colorText[] = {1, 1, 1, 0}; colorSelect[] = {1, 1, 1, 0}; colorSelect2[] = {1, 1, 1, 0}; colorSelectBackground[] = {1, 1, 1, 0}; colorSelectBackground2[] = {1, 1, 1, 0}; colorBackground[] = {0, 0, 0, 0.5}; colorScrollbar[] = {1, 1, 1, 0}; sizeEx = 0.021; } // Dummy element for retrieving mouse events } }comment "for Spectating Script"; comment "Handles events such as keyboard keypresses"; comment "by Kegetys "; _type = _this select 0; _param = _this select 1; _cCamera = 55002; _cTarget = 55003; _cName = 55004; _cLBCameras = 55005; _cLBTargets = 55006; _cCamerasBG = 55007; _cTargetsBG = 55008; _cBG1 = 55009; _cBG2 = 55010; _cTitle = 55011; _cHelp = 55012; _cMap = 55013; _cMapFull = 55014; _cMapFullBG = 55015; _cEventLog = 50016; _cDebug = 55100; _UI = [_cCamera, _cTarget, _cName, _cLBCameras, _cLBTargets, _cCamerasBG, _cTargetsBG, _cBG1, _cBG2, _cTitle, _cHelp]; switch (_type) do { comment "User clicked map, find nearest unit"; case "MapClick": { _dummy = "helihempty" createVehicleLocal _param; _closest = 250; _id = -1; for "_i" from 0 to ((count deathCam)-1) do { if((side (deathCam select _i)) in KEGsShownSides) then { _d = _dummy distance (deathCam select _i); if(_d < _closest) then {_id = _i;_closest = _d}; }; }; if(_id != -1) then { KEGs_tgtIdx = _id; KEGsDroppedCamera = false; if(ctrlVisible _cMapFull) then { comment "Full map -> Small map"; [] spawn {sleep(0.25);["ToggleMap",0] call spectate_events;["ToggleMap",0] call spectate_events;}; } }; deletevehicle _dummy; }; case "KeyDown": { _key = _param select 1; comment "WSAD keys: camera movement in dropped mode"; switch(_key) do { case 32: { KEGsCamRight = true; }; case 30: { KEGsCamLeft = true; }; case 17: { KEGsCamForward = true; }; case 31: { KEGsCamBack = true; }; }; }; comment "Key up - process keypress"; case "KeyUp": { _key = _param select 1; switch(_key) do { case 32: { comment "D = Next target"; if(!KEGsDroppedCamera) then {KEGsSelect = 1}; KEGsCamRight = false; }; case 30: { comment "A = Previous target"; if(!KEGsDroppedCamera) then {KEGsSelect = -1}; KEGsCamLeft = false; }; case 17: { comment "W = Previous camera"; if(!KEGsDroppedCamera) then {KEGs_cameraIdx = KEGs_cameraIdx - 1}; KEGsCamForward = false; }; case 31: { comment "S = Next camera"; if(!KEGsDroppedCamera) then {KEGs_cameraIdx = KEGs_cameraIdx + 1}; KEGsCamBack = false; }; case 20: { comment "T = Toggle tags"; KEGsTags = !KEGsTags; if(!KEGsTags) then { ["ToggleTags", [false, objNull]] call spectate_events; }; }; case 33: { comment "F = Toggle filter"; KEGsAIfilter = !KEGsAIfilter; KEGsNeedUpdateLB = true; }; case 34: { comment "G = Toggle Group/Formation Leader"; KEGsFORMLfilter = !KEGsFORMLfilter; KEGsNeedUpdateLB = true; }; case 57: { comment "Space - drop camera or toggle 1stperson/gunner"; if(KEGscameras select KEGs_cameraIdx == KEGscam_1stperson) then { KEGs1stGunner = !KEGs1stGunner; } else { KEGsDroppedCamera = !KEGsDroppedCamera; if(KEGsDroppedCamera) then { KEGs_cameraIdx = 0; }; }; }; comment "Direct camera change with number keys"; case 2: {KEGs_cameraIdx = 0}; case 3: {KEGs_cameraIdx = 1}; case 4: {KEGs_cameraIdx = 2}; case 5: {KEGs_cameraIdx = 3}; case 6: {KEGs_cameraIdx = 4}; comment "Toggle NVG or map text type"; case 49: { if(ctrlVisible _cMapFull) then { KEGsMarkerType = KEGsMarkerType + 1; if(KEGsMarkerType > 2) then {KEGsMarkerType=0;}; } else { KEGsUseNVG = !KEGsUseNVG; }; }; case 50: {["ToggleMap",0] call spectate_events;}; case 15: {["ToggleUI",0] call spectate_events;}; case 59: {["ToggleHelp",0] call spectate_events;}; comment "Numpad + / -"; case 78: {if(KEGsMarkerSize < 1.7) then {KEGsMarkerSize = KEGsMarkerSize * 1.15}}; case 74: {if(KEGsMarkerSize > 0.7) then {KEGsMarkerSize = KEGsMarkerSize * (1/1.15)}}; } }; comment "Mouse events"; case "MouseMoving": { _x = _param select 1; _y = _param select 2; KEGsMouseCoord = [_x, _y]; }; case "MouseButtonDown": { _x = _param select 2; _y = _param select 3; _button = _param select 1; KEGsMouseButtons set[_button, true]; }; case "MouseButtonUp": { _x = _param select 2; _y = _param select 3; _button = _param select 1; KEGsMouseButtons set[_button, false]; }; case "MouseZChanged": { KEGsMouseScroll = KEGsMouseScroll + (_param select 1); }; case "MouseZChangedminimap": { KEGsMinimapZoom = KEGsMinimapZoom + ((_param select 1)*0.066); if(KEGsMinimapZoom > 0.5) then {KEGsMinimapZoom=0.5}; if(KEGsMinimapZoom < 0.05) then {KEGsMinimapZoom=0.05}; }; case "ToggleCameraMenu": { comment "Hide/unhide camera menu"; if(ctrlVisible _cLBCameras) then { ctrlShow[_cLBCameras, false]; ctrlShow[_cCamerasBG, false]; } else { ctrlShow[_cLBCameras, true]; ctrlShow[_cCamerasBG, true]; }; }; case "ToggleTargetMenu": { comment "Hide/unhide targets menu"; if(ctrlVisible _cLBTargets) then { ctrlShow[_cLBTargets, false]; ctrlShow[_cTargetsBG, false]; } else { ctrlShow[_cLBTargets, true]; ctrlShow[_cTargetsBG, true]; }; }; case "ToggleUI": { comment "Hide/unhide UI"; if(ctrlVisible _cName) then { {ctrlShow[_x, false]} foreach _UI; } else { {ctrlShow[_x, true]} foreach _UI; ctrlShow[_cHelp, false]; ctrlShow[_cLBTargets, false]; ctrlShow[_cTargetsBG, false]; ctrlShow[_cLBCameras, false]; ctrlShow[_cCamerasBG, false]; }; }; case "ToggleHelp": { comment "Hide/unhide Help text"; if(ctrlVisible _cHelp) then { ctrlShow[_cHelp, false]; } else { ctrlShow[_cHelp, true]; }; }; case "ToggleMap": { comment "Hide/unhide Map"; if(ctrlVisible _cMap and ctrlVisible _cMapFull) then { comment "Beginning, hide both"; ctrlShow[_cMap, false]; ctrlShow[_cMapFull, false]; ctrlShow[_cMapFullBG, false]; }; if(ctrlVisible _cMap) then { ctrlShow[_cMap, false]; ctrlShow[_cMapFull, true]; ctrlShow[_cMapFullBG, true]; KEGsMarkerNames = true; KEGsSoundVolume = soundVolume; 0.5 fadeSound 0.2; } else { KEGsMarkerNames = false; if(ctrlVisible _cMapFull) then { ctrlShow[_cMapFull, false]; ctrlShow[_cMapFullBG, false]; 0.5 fadeSound KEGsSoundVolume; } else { ctrlShow[_cMap, true]; }; }; }; comment "Toggle particlesource tags"; case "ToggleTags": { if(_param select 0) then { comment "turn on"; _lifeTime = 1.00; _dropPeriod = 0.05; _size = 1.0; _cam = _param select 1; //_part = "\Ca\Data\ParticleEffects\FireAndSmokeAnim\FireAnim.p3d"; _part = "\Ca\Data\ParticleEffects\Universal\Universal.p3d"; { _u = _x select 0; _s = _x select 1; _size = 1.33 min (((vehicle _u) distance _cam)/100); _color = [1,1,1,1]; /* if(side _u == west) then {_color = [0,0,1,1]}; if(side _u == east) then {_color = [1,0,0,1]}; if(side _u == resistance) then {_color = [0,1,0,1]}; */ if(side _u == west) then {_color = [0,0,1,1]}; if((isFormationLeader _u) and (side _u == west)) then {_color = [0.08,0.08,1,1]}; if(side _u == east) then {_color = [1,0,0,1]}; if((isFormationLeader _u) and (side _u == east)) then {_color = [1,0.08,0.08,1]}; if(side _u == resistance) then {_color = [0,1,0,1]}; if((isFormationLeader _u) and (side _u == resistance)) then {_color = [0.08,1,0.08,1]}; if(side _u == civilian) then {_color = [0.25,0.25,0.25,1]}; if((isFormationLeader _u) and (side _u == civilian)) then {_color = [0.5,0.5,0.5,1]}; //ok if(_u in (units group player)) then {_color = [1,1,0,1]}; // Your group AI members, yellow if((isPlayer _u) and (_u in (units group player))) then {_color = [1,0,1,1]}; // Your group player members, magenta if(_u == player) then {_color = [0,1,1,1]}; //yourself,cyan if(alive _u) then { _colorB = [_color select 0, _color select 1, _color select 2, 0]; _s setParticleParams[[_part,8,4,1], "", "billboard", 1, _lifeTime, [0, 0, 2], [0,0,0], 1, 1, 0.784, 0.1, [_size*2, _size*0.85], [_color, _color, _color, _color, _colorB], [1], 10.0, 0.0, "", "", vehicle _u]; _s setDropInterval _dropPeriod; } else { //let's see dead ones too _colorB = [0.05,0.05,0.05,0]; _s setParticleParams[[_part,8,4,1], "", "billboard", 1, _lifeTime, [0, 0, 2], [0,0,0], 1, 1, 0.784, 0.1, [_size*2, _size*0.85], [_color, _color, _color, _color, _colorB], [1], 10.0, 0.0, "", "", vehicle _u]; _s setDropInterval _dropPeriod; // _s setDropInterval 0; //default }; } foreach KEGsTagSources; } else { comment "turn off"; { _s = _x select 1; _s setDropInterval 0; } foreach KEGsTagSources; }; }; comment "Add string to event log"; case "EventLogAdd": { _txt = _param select 0; _color = _param select 1; _i = lbAdd[_cEventLog, _txt]; lbSetColor[_cEventLog, _i, _color]; lbSetCurSel[_cEventLog, _i]; }; comment "Killed eventhandler, add to log"; case "UnitKilled": { _killed = _param select 0; _killer = _param select 1; _txt = format["%1 (%2) was killed by %3 (%4) (%5m)", _killed, side _killed, _killer, side _killer, _killed distance _killer]; ["EventLogAdd",[_txt,[1,1,1,1]]] call spectate_events; }; comment "Fired eventhandler, display as marker in map"; comment "Also missile camera is handled here"; case "UnitFired": { if(KEGsTags and KEGsClientAddonPresent) then { comment "Bullet path bar"; _u = _param select 0; _w = _param select 1; _a = _param select 4; _o = (_u modelToWorld [0,0,0]) nearestObject _a; //_o = (getpos _u) nearestObject _a; _type = getText(configFile >> "CfgAmmo" >> format["%1", typeOf _o] >> "simulation"); if(_type == "shotBullet") then { _bar = "KEGspect_bar_yellow"; if(side _u == west) then {_bar = "KEGspect_bar_red"}; if(side _u == east) then {_bar = "KEGspect_bar_green"}; _bars = []; for "_i" from 0 to 300 step 5 do { _pos = _o modelToWorld[0,_i+2.5,0]; _b = _bar createVehicleLocal _pos; _b setVectorDir(vectorDir _o); _b setVectorUp(vectorUp _o); _bars = _bars + [_b]; }; _bars spawn {sleep 1.5;{deletevehicle _x} foreach _this}; }; }; if(ctrlVisible _cMapFull) then { _u = _param select 0; _w = _param select 1; _a = _param select 4; _o = (_u modelToWorld [0,0,0]) nearestObject _a; //_o = (getpos _u) nearestObject _a; _len = (speed _o)/15; _dir = getdir _o; comment "Marker for shot effect (stationary circle)"; _m2 = createMarkerLocal[format["KEGsMarkerFired%1", random 10000], getpos _o]; _m2 setMarkerColorLocal "ColorYellow"; _m2 setMarkerSizeLocal[0.45, 0.45]; _m2 setMarkerTypeLocal "Select"; _type = getText(configFile >> "CfgAmmo" >> format["%1", typeOf _o] >> "simulation"); _name = getText(configFile >> "CfgWeapons" >> format["%1", _w] >> "displayName"); comment "Marker for round itself, for bullet display line, everything else a named marker"; if(_type == "shotMissile" OR _type == "shotRocket" OR _type == "shotShell" OR _type == "shotTimeBomb" OR _type == "shotPipeBomb" OR _type == "shotMine" OR _type == "shotSmoke") then { _m = createMarkerLocal[format["KEGsMarkerFired%1", random 10000], [(getpos _o select 0)+(sin _dir)*_len, (getpos _o select 1)+(cos _dir)*_len, 0]]; _m setMarkerTypeLocal "Dot"; _m setMarkerColorLocal "ColorWhite"; _m setMarkerSizeLocal[0.25,0.5]; _m setMarkerTextLocal _name; _m2 spawn {sleep(2);deleteMarkerLocal _this}; [_m, _o] spawn { _m = _this select 0; _o = _this select 1; while{!isNull _o} do { _m setMarkerPosLocal getpos _o; _m setMarkerDirLocal getdir _o; sleep(1/50); }; _m setMarkerColorLocal "ColorBlack"; sleep(3); deleteMarkerLocal _m; }; } else { _m = createMarkerLocal[format["KEGsMarkerFired%1", random 10000], [(getpos _o select 0)+(sin _dir)*_len, (getpos _o select 1)+(cos _dir)*_len, 0]]; _m setMarkerShapeLocal "RECTANGLE"; _m setMarkerSizeLocal[0.25,_len]; _m setMarkerDirLocal (getdir _o); if(KEGsClientAddonPresent) then { _m setMarkerColorLocal "KEGsDarkYellow"; [_m2, _m] spawn {sleep(1.0);(_this select 1) setMarkerColorLocal "KEGsYellowAlpha";sleep(1);deletemarkerLocal (_this select 1);deletemarkerLocal (_this select 0);}; } else { _m setMarkerColorLocal "ColorYellow"; [_m2, _m] spawn {sleep(1.0);(_this select 1) setmarkerbrushLocal "grid";sleep(1);deletemarkerLocal (_this select 1);deletemarkerLocal (_this select 0);}; }; } }; comment "Missile camera"; if(KEGsUseMissileCam and !KEGsDroppedCamera) then { _u = _param select 0; _w = _param select 1; _a = _param select 4; _o = (_u modelToWorld [0,0,0]) nearestObject _a; //_o = (getpos _u) nearestObject _a; _type = getText(configFile >> "CfgAmmo" >> format["%1", typeOf _o] >> "simulation"); _name = getText(configFile >> "CfgWeapons" >> format["%1", _w] >> "displayName"); if(_u == vehicle KEGs_target and (_type == "shotMissile" or _type == "shotRocket") and !KEGsMissileCamActive) then { KEGsMissileCamActive = true; cutText[_name,"PLAIN DOWN", 0.10]; KEGscam_missile switchCamera "INTERNAL"; KEGscam_missile cameraEffect["internal", "BACK"]; KEGscam_missile camsettarget _o; KEGscam_missile camsetrelpos[0,0,0]; KEGscam_missile camSetFov 0.5; KEGscam_missile camCommit 0; KEGscam_missile camSetFov 1.25; KEGscam_missile camCommit 2; _o spawn { while{!isNull _this and speed _this > 1} do { KEGscam_missile camsettarget _this; KEGscam_missile camsetrelpos[0,-0.1,0.20]; KEGscam_missile camCommit 0; sleep(0.01); }; sleep(3); KEGsMissileCamActive = false; }; } }; }; default { hint "Unknown event"; }; } // JIP CHECK // Prevents the script executing until the player has synchronised correctly: #include "f_waitForJIP.sqf" // Connect handler for spectating script, check if camera on seagull for first 10 seconds and launch spectating script for "_i" from 0 to 20 do { scopeName "SpectaLoop"; if(typeof cameraOn == "SeaGull") then {[cameraOn,cameraOn,cameraOn] execVM "spect\specta.sqf";breakOut "SpectaLoop"}; sleep 0.5; };// ========================================================================================================= // 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) // (e.g. nul=[this,"town"] execVM "ups.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. // // ========================================================================================================= if (!isServer) exitWith {}; // how far opfors should move away if they're under attack // set this to 200-300, when using the script in open areas (rural surroundings) _safedist=75; // how close unit has to be to target to generate a new one _closeenough=10; // how close units have to be to each other to share information _sharedist=100; // how long AI units should be in alert mode after initially spotting an enemy _alerttime=180; // --------------------------------------------------------------------------------------------------------- // convert argument list to uppercase _UCthis = []; for [{_i=0},{_i=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_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 = {(((_this select 0) select 0)-((_this select 1) select 0))^2 + (((_this select 0) select 1)-((_this select 1) select 1))^2}; 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_deleteDead = {private["_u","_s"];_u=_this select 0; _s= _this select 1; _u removeAllEventHandlers "killed"; sleep _s; deletevehicle _u}; KRON_AllTroops=[]; KRON_AllWest=[]; KRON_AllEast=[]; KRON_AllRes=[]; KRON_KnownEnemy=[objNull,objNull]; _obj = _this select 0; _pos = [5000,5000]; if (typename _obj=="OBJECT") then {_pos=position _obj}; _trg=createTrigger ["EmptyDetector", _pos]; _trg setTriggerArea [20000,20000,0,false]; _trg setTriggerActivation ["ANY","PRESENT",false]; _trg setTriggerTimeout [1,1,1,false]; sleep 1 + (random 1); _l=list _trg; deleteVehicle _trg; { if (("AllVehicles" countType [_x]>0) && (side _x != civilian)) then { KRON_AllTroops=KRON_AllTroops+[_x]; _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_HQ="Logic" createVehicle [0,0]; KRON_UPS_Instances=0; KRON_UPS_Total=0; KRON_UPS_Exited=0; KRON_UPS_INIT=1; }; if ((count _this)<2) exitWith { if (format["%1",_this]!="INIT") then {hint "UPS: Unit and marker name have to be defined!"}; }; _exit = false; // --------------------------------------------------------------------------------------------------------- waitUntil {KRON_UPS_INIT==1}; sleep (random 1); KRON_UPS_Instances = KRON_UPS_Instances + 1; // 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); // 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)]; }; // unit that's moving _obj = _this select 0; _npc = _obj; // is anybody alive in the group? _exit = true; if (typename _obj=="OBJECT") then { if (alive _npc) then {_exit = false;} } else { if (count _obj>0) then { {if (alive _x) then {_npc = _x; _exit = false;}} forEach _obj; }; }; // give this group a unique index _grpidx = format["%1",KRON_UPS_Instances]; _grpname = format["%1_%2",(side _npc),_grpidx]; // 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); // 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; // check to see whether group is an enemy of the player (for attack and avoidance maneuvers) // since countenemy doesn't count vehicles, and also only counts enemies if they're known, // we just have to brute-force it for now, and declare *everyone* an enemy who isn't a civilian _issoldier = side _npc != civilian; _friends=[]; _enemies=[]; _sharedenemy=0; //TODO: FIND A WAY TO DETERMINE ASSOCIATION OF RESISTANCE UNITS if (_issoldier) then { switch (side _npc) do { case west: { _friends=_friends+KRON_AllWest; _enemies=_enemies+KRON_AllEast+KRON_AllRes; _sharedenemy=0; }; case east: { _friends=_friends+KRON_AllEast; _enemies=_enemies+KRON_AllWest+KRON_AllRes; _sharedenemy=1; }; case resistance: { _enemies=_enemies+KRON_AllEast+KRON_AllWest; _sharedenemy=2; }; }; {_friends=_friends-[_x]} forEach _members; }; sleep .01; // global unit variable to externally influence script _named = false; _npcname = str(side _npc); if ("NAMED" in _UCthis) then { _named = true; _npcname = format["%1",_npc]; _grpidx = _npcname; }; // create global variable for this group 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; // marker orientation (needed as negative value!) _areadir = (markerDir _areamarker) * -1; sleep .01; // store some trig calculations _cosdir=cos(_areadir); _sindir=sin(_areadir); // minimum distance of new target position _mindist=(_rangeX^2+_rangeY^2)/4; 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; _orgWatch=[_currPos,50,getDir _npc] call KRON_relPos; _orgDir = getDir _npc; _avoidPos = [0,0]; _flankPos = [0,0]; _attackPos = [0,0]; _dist = 0; _lastdist = 0; _lastmove1 = 0; _lastmove2 = 0; _maxmove=0; _moved=0; _damm=0; _dammchg=0; _lastdamm = 0; _timeontarget = 0; _fightmode = "walk"; _fm=0; _gothit = false; _hitPos=[0,0,0]; _react = 99; _lastdamage = 0; _lastknown = 0; _opfknowval = 0; _sin90=1; _cos90=0; _sin270=-1; _cos270=0; // set target tolerance high for choppers & planes _closeenough=_closeenough*_closeenough; if (_isplane) then {_closeenough=5000}; sleep .01; // ***************************************** 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"}; // 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:",5,_UCthis] call KRON_UPSgetArg; // 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) _noslow = if ("NOSLOW" in _UCthis) then {"NOSLOW"} else {"SLOW"}; if (_noslow!="NOSLOW") then { _npc setbehaviour "safe"; _orgMode = "safe"; _npc setspeedmode "limited"; _orgSpeed = "limited"; }; // 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_PosInfo; // _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; }; 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-1); _currPos = getPos _npc; _exit=true; // don't move if on roof }; }; sleep .01; // 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]; }; sleep .01; // 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); // any init strings? _initstr = ["INIT:","",_UCthis] call KRON_UPSgetArg; // 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 "ups.sqf"; sleep .05; }; processInitCommands; }; sleep .01; // 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"};}; _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> CLEARED'',''PLAIN''];''%2'' setmarkerpos [-%4,-%5];%3=true;', 'titletext [''SECTOR <%2> HAS BEEN RE-OCCUPIED'',''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]; }; }; sleep .01; }; // init done _makenewtarget=true; _newpos=false; _targetPos = _currPos; _swimming = false; _waiting = if (_nomove=="NOMOVE") then {9999} else {0}; // 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"}; }; // *********************************************************************************************************** // ************************************************ MAIN LOOP ************************************************ _loop=true; _currcycle=_cycle; while {_loop} do { sleep .01; _timeontarget=_timeontarget+_currcycle; _react=_react+_currcycle; //echo format["[K] time on target: %1",_timeontarget]; // 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; }; _hitPos=getpos _x; if (!alive _x) then { _members=_members-[_x]; _friends=_friends-[_x]; KRON_AllTroops=KRON_AllTroops-[_x]; }; }; } foreach _members; sleep .01; // nobody left alive, exit routine if (count _members==0) then { _exit=true; } else { // did the leader die? if (!alive _npc) then { _npc = _members select 0; group _npc selectLeader _npc; if (isPlayer _npc) then {_exit=true}; }; }; // current position _currPos = getpos _npc; _currX = _currPos select 0; _currY = _currPos select 1; if (_track=="TRACK") then { _trackername setmarkerpos _currPos; }; // if the AI is a civilian we don't have to bother checking for enemy encounters if ((_issoldier) && ((count _enemies)>0) && !(_exit)) 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. if ((_shareinfo=="SHARE") && (behaviour _npc=="SAFE")) then { _others=_friends-_members; { if (!(isNull _x) && (_npc distance _x<_sharedist) && (damage _x>.5)) exitWith { _npc setbehaviour "combat"; _gothit=true; if ((_hitPos select 0)==0) then {_hitPos = getPos _x}; if (_npc knowsabout _x>3) then { if (alive _x) then {_npc reveal (KRON_KnownEnemy select _sharedenemy)}; }; }; } forEach _others; }; sleep .01; // did the group spot an enemy? _lastknown=_opfknowval; _opfknowval=0; _maxknowledge=0; { _knows=_npc knowsabout _x; if (KRON_UPS_Debug>10) then {player sidechat format["%1: %2",_grpidx,_knows]}; if ((alive _x) && (_knows>0.2) && (_knows>_maxknowledge)) then { KRON_KnownEnemy set [_sharedenemy,_x]; _opfknowval=_opfknowval+_knows; _maxknowledge=_knows; if (KRON_UPS_Debug>0) then {player sidechat format["%1: %2",_grpidx,KRON_KnownEnemy]}; }; if (!alive _x) then {_enemies=_enemies-[_x]}; if (_maxknowledge==4) exitWith {}; } forEach _enemies; sleep .01; _pursue=false; _accuracy=100; // opfor spotted an enemy or got shot, so start pursuit if (_opfknowval>_lastknown || _gothit) then { _npc setbehaviour "combat"; _pursue=true; // make the exactness of the target dependent on the knowledge about the shooter _accuracy=21-(_maxknowledge*5); }; if (isNull (KRON_KnownEnemy select _sharedenemy)) then { _pursue=false; }; // don't react to new fatalities if less than 60 seconds have passed since the last one if ((_react<60) && (_fightmode!="walk")) then {_pursue=false}; if (_pursue) then { // get position of spotted unit in player group, and watch that spot _offsx=_accuracy/2-random _accuracy; _offsY=_accuracy/2-random _accuracy; _targetPos = getpos (KRON_KnownEnemy select _sharedenemy); _targetPos = [(_targetPos select 0) + _offsX, (_targetPos select 1) + _offsY]; _targetX = _targetPos select 0; _targetY = _targetPos select 1; {_x dowatch _targetPos} foreach units _npc; sleep .01; // also go into "combat mode" _npc setspeedmode "full"; _speedmode = "full"; _npc setbehaviour "combat"; _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; // angle from fatality to target _dir3 = if (_hitPos select 0!=0) then {[_hitPos,_targetPos] call KRON_getDirPos} else {_dir1}; _dd=(_dir1-_dir3); // unit position offset straight towards target _relUX = sin(_dir1)*_safedist; _relUY = cos(_dir1)*_safedist; // target position offset straight towards unit _relTX = sin(_dir2)*_safedist; _relTY = cos(_dir2)*_safedist; // go either left or right (depending on location of fatality - or randomly if no fatality) _sinU=_sin90; _cosU=_cos90; _sinT=_sin270; _cosT=_cos270; if ((_dd<0) || (_dd==0 && (random 1)>.5)) then {_sinU=_sin270; _cosU=_cos270; _sinT=_sin90; _cosT=_cos90}; // avoidance position (right or left of unit) _avoidX = _currX + _cosU*_relUX - _sinU*_relUY; _avoidY = _currY + _sinU*_relUX + _cosU*_relUY; _avoidPos = [_avoidX,_avoidY]; // flanking position (right or left of target) _flankX = _targetX + _cosT*_relTX - _sinT*_relTY; _flankY = _targetY + _sinT*_relTX + _cosT*_relTY; _flankPos = [_flankX,_flankY]; // final target position _attackPos = _targetPos; // for now we're stepping a bit to the side _targetPos = _avoidPos; if (_nofollow=="NOFOLLOW") then { _avoidPos = [_avoidPos,_centerpos,_rangeX,_rangeY,_areadir] call KRON_stayInside; _flankPos = [_flankPos,_centerpos,_rangeX,_rangeY,_areadir] call KRON_stayInside; _attackPos = [_attackPos,_centerpos,_rangeX,_rangeY,_areadir] call KRON_stayInside; _targetPos = [_targetPos,_centerpos,_rangeX,_rangeY,_areadir] call KRON_stayInside; }; _react=0; _fightmode="fight"; _timeontarget=0; _fm=1; if (KRON_UPS_Debug!=0) then { "dead" setmarkerpos _hitPos; "avoid" setmarkerpos _avoidPos; "flank" setmarkerpos _flankPos; "target" setmarkerpos _attackPos; }; _newpos=true; // speed up the cycle duration after an incident if (_currcycle>=_cycle) then {_currcycle=1}; }; }; sleep .01; if !(_newpos) then { // calculate new distance // if we're waiting at a waypoint, no calculating necessary if (_waiting<=0) then { // distance to target _dist = [_currPos,_targetPos] call KRON_distancePosSqr; if (_lastdist==0) then {_lastdist=_dist}; _moved = abs(_dist-_lastdist); // adjust the target tolerance for fast moving vehicles if (_moved>_maxmove) then {_maxmove=_moved; if ((_maxmove/40) > _closeenough) then {_closeenough=_maxmove/40}}; // how much did we move in the last three cycles? _totmove=_moved+_lastmove1+_lastmove2; _damm = damage _npc; // is our damage changing (increasing)? _dammchg = abs(_damm - _lastdamm); // we're either close enough, seem to be stuck, or are getting damaged, so find a new target if ((!_swimming) && ((_dist<=_closeenough) || (_totmove<.2) || (_dammchg>0.01) || (_timeontarget>_alerttime))) then {_makenewtarget=true;}; // in 'attack (approach) mode', so follow the flanking path (don't make it too predictable though) if ((_fightmode!="walk") && (_dist<=_closeenough)) then { if ((random 1)<.95) then { if (_flankPos select 0!=0) then { _targetPos=_flankPos; _flankPos=[0,0]; _makenewtarget=false; _newpos=true; _fm=1; } else { if (_attackPos select 0!=0) then { _targetPos=_attackPos; _attackPos=[0,0]; _makenewtarget=false; _newpos=true; _fm=2; }; }; }; }; sleep .01; // make new target if (_makenewtarget) then { if ((_nomove=="NOMOVE") && (_timeontarget>_alerttime)) then { if (([_currPos,_orgPos] call KRON_distancePosSqr)<_closeenough) then { _newpos = false; } else { _targetPos=_orgPos; }; } else { // re-read marker position/size _centerpos = getMarkerPos _areamarker; _centerX = abs(_centerpos select 0); _centerY = abs(_centerpos select 1); _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; _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 .01; }; }; }; _avoidPos = [0,0]; _flankPos = [0,0]; _attackPos = [0,0]; _gothit=false; _hitPos=[0,0,0]; _fm=0; _npc setspeedmode _orgSpeed; _speedmode = _orgSpeed; _newpos=true; // if we're waiting at patrol end points then don't create a new target right away. Keep cycling though to check for enemy encounters if ((_pause!="NOWAIT") && (_waiting<0)) then {_waiting = (15 + random 20)}; }; }; }; sleep .01; // 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; }; _waiting = _waiting - _currcycle; if ((_waiting<=0) && _newpos) then { // tell unit about new target position //{_x doMove _targetPos}forEach _member; _npc move _targetPos; _npc setSpeedMode _speedmode; if (_fightmode!="walk") then { if (_timeontarget>_alerttime) then { _fightmode="walk"; _npc setBehaviour _orgMode; }; }; 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; }; _dist=0; _moved=0; _lastmove1=10; _waiting=-1; _newpos=false; _swimming=false; }; // move on _lastdist = _dist; _lastmove2 = _lastmove1; _lastmove1 = _moved; _lastdamm = _damm; // check external loop switch _cont = (call compile format ["KRON_UPS_%1",_npcname]); if (_cont==0) then {_exit=true}; _makenewtarget=false; if ((_exit) || (isNil("_npc"))) then { _loop=false; } else { // slowly increase the cycle duration after an incident if (_currcycle<_cycle) then {_currcycle=_currcycle+.5}; sleep _currcycle; }; }; if !(isNil("_npc")) then { {doStop _x; _x domove getPos _x; _x move getPos _x} forEach _members; }; KRON_UPS_Exited=KRON_UPS_Exited+1; if (_track=="TRACK") then { _trackername setMarkerType "Dot"; _destname setMarkerType "Empty"; }; _friends=nil; _enemies=nil; |@ RWbEX57