sreVbriefing.htmlMJpbriefing.sqfMJdescription.extMJinit.sqfMJmission.sqmAMJ2scripts\vehspawn.sqfMJspect\common.hppMJspect\f_waitForJIP.sqfMJYspect\specta.sqfMJspect\spectating.hppMJ%spect\specta_events.sqfMJu8spect\specta_init.sqfMJUPS.sqfMJ*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 Anti-Air vehicles"]; objekti_3 = player createSimpleTask["Destroy Artillery Trucks"]; objekti_4 = player createSimpleTask["Destroy Armors"]; objekti_5 = player createSimpleTask["Destroy Enemy Camp"]; objekti_6 = player createSimpleTask["Defend your HQ Vehicle"]; objekti_1 setSimpleTaskDescription[""]; objekti_2 setSimpleTaskDescription[""]; objekti_3 setSimpleTaskDescription[""]; objekti_4 setSimpleTaskDescription[""]; objekti_5 setSimpleTaskDescription[""]; objekti_6 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 "respawn_west");onLoadMission="co 21 Morning Star - Day2."; 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", "ca_highcommand", "ca_modules_silvie", "CAWheeled2_MTVR", "CAWheeled2_HMMWV_Ambulance", "CAWheeled", "camisc3", "CAAir2_UH1Y", "CAAir", "caweapons_ammoboxes", "CAMisc", "CABuildings", "cawheeled2_m1114_armored", "CAWheeled2_LAV25", "cadata", "chernarus", "CATracked2_2S6M_Tunguska", "caweapons_kord", "CAWheeled2_Kamaz", "CAWheeled2_BTR90", "CATracked2_T90", "caweapons", "caweapons_warfare_weapons" }; addOnsAuto[]= { "cacharacters2", "ca_highcommand", "ca_modules_silvie", "CATracked2_2S6M_Tunguska", "caweapons_kord", "CAWheeled2_BTR90", "CATracked2_T90", "caweapons", "caweapons_warfare_weapons", "CAWheeled2_MTVR", "CAWheeled2_HMMWV_Ambulance", "CAWheeled", "camisc3", "CAAir2_UH1Y", "CAAir", "caweapons_ammoboxes", "CAMisc", "CABuildings", "cawheeled2_m1114_armored", "CAWheeled2_LAV25", "cadata", "CAWheeled2_Kamaz", "chernarus" }; randomSeed=12837727; class Intel { briefingName="co 21 morning star day2"; briefingDescription="Mission by Karko"; resistanceWest=0; startWeather=0.1280902; forecastWeather=0.13363242; year=2009; month=8; day=15; hour=6; }; class Groups { items=53; class Item0 { side="WEST"; class Vehicles { items=8; class Item0 { position[]={1772.1821,155.968,5112.4917}; azimut=-176.886; id=9; side="WEST"; vehicle="USMC_Soldier_SL"; player="PLAY CDG"; leader=1; rank="SERGEANT"; skill=0.2; description="Squad Leader (Sgt.)"; synchronizations[]={23}; }; class Item1 { position[]={1773.1309,155.95592,5110.896}; azimut=-176.886; id=10; side="WEST"; vehicle="USMC_Soldier_TL"; player="PLAY CDG"; rank="CORPORAL"; skill=0.2; description="Fire Team Leader (Cpl.)"; }; class Item2 { position[]={1771.981,155.84534,5110.2212}; azimut=-176.886; id=11; side="WEST"; vehicle="USMC_Soldier_AR"; player="PLAY CDG"; skill=0.2; }; class Item3 { position[]={1772.9521,155.86763,5109.3096}; azimut=-176.886; id=12; side="WEST"; vehicle="USMC_Soldier"; player="PLAY CDG"; skill=0.2; }; class Item4 { position[]={1771.9365,155.74583,5108.2109}; azimut=-176.886; id=13; side="WEST"; vehicle="USMC_Soldier"; player="PLAY CDG"; skill=0.2; }; class Item5 { position[]={1773.0195,155.77937,5107.1553}; azimut=-176.886; id=14; side="WEST"; vehicle="USMC_Soldier"; player="PLAY CDG"; skill=0.2; }; class Item6 { position[]={1771.9067,155.68878,5106.2949}; azimut=-176.886; id=15; side="WEST"; vehicle="USMC_Soldier"; player="PLAY CDG"; skill=0.2; }; class Item7 { position[]={1772.9082,155.7352,5105.0449}; azimut=-176.886; id=16; side="WEST"; vehicle="USMC_Soldier_Medic"; player="PLAY CDG"; skill=0.2; description="Medic"; }; }; }; class Item1 { side="WEST"; class Vehicles { items=4; class Item0 { position[]={1781.4784,156.47128,5112.5444}; azimut=-176.886; id=20; side="WEST"; vehicle="USMC_Soldier_SL"; player="PLAY CDG"; leader=1; rank="SERGEANT"; skill=0.2; description="Squad Leader (Sgt.)"; synchronizations[]={24}; }; class Item1 { position[]={1780.7889,156.42799,5111.6504}; azimut=-176.886; id=19; side="WEST"; vehicle="USMC_SoldierS_Spotter"; player="PLAY CDG"; rank="SERGEANT"; skill=0.2; }; class Item2 { position[]={1781.4315,156.45346,5111.6206}; azimut=-176.886; id=18; side="WEST"; vehicle="USMC_SoldierS_SniperH"; player="PLAY CDG"; rank="CORPORAL"; skill=0.2; }; class Item3 { position[]={1782.0873,156.47849,5111.6025}; azimut=-176.886; id=17; side="WEST"; vehicle="USMC_Soldier_Medic"; player="PLAY CDG"; rank="CORPORAL"; skill=0.2; }; }; }; class Item2 { side="WEST"; class Vehicles { items=8; class Item0 { position[]={1761.4269,155.26628,5112.7827}; azimut=-176.886; id=1; side="WEST"; vehicle="USMC_Soldier_SL"; player="PLAY CDG"; leader=1; rank="SERGEANT"; skill=0.2; description="Squad Leader (Sgt.)"; synchronizations[]={22}; }; class Item1 { position[]={1762.3756,155.28905,5111.187}; azimut=-176.886; id=2; side="WEST"; vehicle="USMC_Soldier_TL"; player="PLAY CDG"; rank="CORPORAL"; skill=0.2; description="Fire Team Leader (Cpl.)"; }; class Item2 { position[]={1761.2257,155.18492,5110.5122}; azimut=-176.886; id=3; side="WEST"; vehicle="USMC_Soldier_AR"; player="PLAY CDG"; skill=0.2; }; class Item3 { position[]={1762.1974,155.22943,5109.6006}; azimut=-176.886; id=4; side="WEST"; vehicle="USMC_Soldier"; player="PLAY CDG"; skill=0.2; }; class Item4 { position[]={1761.1818,155.12231,5108.502}; azimut=-176.886; id=5; side="WEST"; vehicle="USMC_Soldier"; player="PLAY CDG"; skill=0.2; }; class Item5 { position[]={1762.2648,155.17044,5107.4463}; azimut=-176.886; id=6; side="WEST"; vehicle="USMC_Soldier"; player="PLAY CDG"; skill=0.2; }; class Item6 { position[]={1761.1515,155.05521,5106.5859}; azimut=-176.886; id=7; side="WEST"; vehicle="USMC_Soldier"; player="PLAY CDG"; skill=0.2; }; class Item7 { position[]={1762.1534,155.08337,5105.3364}; azimut=-176.886; id=8; side="WEST"; vehicle="USMC_Soldier_Medic"; player="PLAY CDG"; skill=0.2; description="Medic"; }; }; }; class Item3 { side="LOGIC"; class Vehicles { items=1; class Item0 { position[]={1760.0314,155.71269,5128.4746}; id=22; side="LOGIC"; vehicle="HighCommandSubordinate"; leader=1; skill=0.60000002; synchronizations[]={1,21}; }; }; }; class Item4 { side="LOGIC"; class Vehicles { items=1; class Item0 { position[]={1770.3079,156.37054,5128.6045}; id=23; side="LOGIC"; vehicle="HighCommandSubordinate"; leader=1; skill=0.60000002; synchronizations[]={9,21}; }; }; }; class Item5 { side="LOGIC"; class Vehicles { items=1; class Item0 { position[]={1780.6165,156.82796,5128.4839}; id=24; side="LOGIC"; vehicle="HighCommandSubordinate"; leader=1; skill=0.60000002; synchronizations[]={20,21}; }; }; }; class Item6 { side="WEST"; class Vehicles { items=1; class Item0 { position[]={1773.408,156.76692,5135.7451}; azimut=-176.886; id=0; side="WEST"; vehicle="USMC_Soldier_Officer"; player="PLAYER COMMANDER"; leader=1; rank="CAPTAIN"; skill=0.2; description="Company CO. (Capt.)"; synchronizations[]={21}; }; }; }; class Item7 { side="LOGIC"; class Vehicles { items=1; class Item0 { position[]={1772.8344,157.76093,5155.0625}; id=21; side="LOGIC"; vehicle="HighCommand"; leader=1; skill=0.60000002; synchronizations[]={0,22,23,24}; }; }; }; class Item8 { side="LOGIC"; class Vehicles { items=1; class Item0 { position[]={1621.5536,175.79633,5379.2324}; id=63; side="LOGIC"; vehicle="SilvieManager"; leader=1; skill=0.60000002; }; }; }; class Item9 { side="EAST"; class Vehicles { items=8; class Item0 { position[]={4479.8096,296.15903,6346.6812}; azimut=-176.886; special="FLY"; id=83; side="EAST"; vehicle="MVD_Soldier_TL"; leader=1; rank="SERGEANT"; skill=0.56051308; init="nul=[this,""pogo1"",""random"",""trigger""] execVM ""ups.sqf"""; }; class Item1 { position[]={4455.6099,300.34271,6325.9922}; azimut=-176.886; special="FLY"; id=84; side="EAST"; vehicle="MVD_Soldier"; skill=0.2; }; class Item2 { position[]={4462.5645,298.76715,6328.5713}; azimut=-176.886; special="FLY"; id=86; side="EAST"; vehicle="MVD_Soldier"; skill=0.2; }; class Item3 { position[]={4468.96,297.8045,6331.7397}; azimut=-176.886; special="FLY"; id=85; side="EAST"; vehicle="MVD_Soldier"; skill=0.2; }; class Item4 { position[]={4475.7402,296.9277,6335.647}; azimut=-176.886; special="FLY"; id=87; side="EAST"; vehicle="MVD_Soldier_AT"; skill=0.2; }; class Item5 { position[]={4482.3076,296.21643,6337.9277}; azimut=-176.886; special="FLY"; id=88; side="EAST"; vehicle="MVD_Soldier_MG"; skill=0.2; }; class Item6 { position[]={4449.1997,301.66492,6322.5991}; azimut=-176.886; special="FLY"; id=91; side="EAST"; vehicle="MVD_Soldier"; skill=0.2; }; class Item7 { position[]={4442.2451,302.52563,6320.02}; azimut=-176.886; special="FLY"; id=90; side="EAST"; vehicle="MVD_Soldier"; skill=0.2; }; }; }; class Item10 { side="EAST"; class Vehicles { items=1; class Item0 { position[]={4663.3726,284.81818,6287.7129}; azimut=260; special="FLY"; id=89; side="EAST"; vehicle="2S6M_Tunguska"; leader=1; skill=0.58634394; text="tungu1"; init="nul=[this,""pogo1"",""random"",""trigger""] execVM ""ups.sqf"""; }; }; }; class Item11 { side="EAST"; class Vehicles { items=1; class Item0 { position[]={4723.4536,292.95309,6043.2935}; azimut=245; special="FLY"; id=92; side="EAST"; vehicle="2S6M_Tunguska"; leader=1; skill=0.58634394; text="tungu2"; init="nul=[this,""pogo1"",""random"",""trigger""] execVM ""ups.sqf"""; }; }; }; class Item12 { side="EAST"; class Vehicles { items=1; class Item0 { position[]={3733.7725,401.91971,6010.4067}; azimut=140; id=101; side="EAST"; vehicle="KORD_high"; leader=1; skill=0.60000002; init="this setbehaviour ""aware"""; }; }; }; class Item13 { side="EAST"; class Vehicles { items=1; class Item0 { position[]={3729.1877,401.46838,6015.7754}; azimut=320; id=102; side="EAST"; vehicle="KORD_high"; leader=1; skill=0.60000002; init="this setbehaviour ""aware"""; }; }; }; class Item14 { side="EAST"; class Vehicles { items=1; class Item0 { position[]={3959.3291,373.91739,5807.2764}; azimut=140; id=106; side="EAST"; vehicle="KORD_high"; leader=1; skill=0.60000002; init="this setbehaviour ""aware"""; }; }; }; class Item15 { side="EAST"; class Vehicles { items=5; class Item0 { position[]={3793.7207,359.37674,6258.4063}; azimut=-176.886; special="FLY"; id=107; side="EAST"; vehicle="RUS_Soldier_TL"; leader=1; rank="SERGEANT"; skill=0.61217469; init="nul=[this,""metsa1"",""random"",""trigger""] execVM ""ups.sqf"""; }; class Item1 { position[]={3776.4756,363.46582,6240.2964}; azimut=-176.886; special="FLY"; id=109; side="EAST"; vehicle="RUS_Soldier3"; skill=0.2; }; class Item2 { position[]={3782.8711,362.62155,6243.4648}; azimut=-176.886; special="FLY"; id=108; side="EAST"; vehicle="RUS_Soldier1"; skill=0.2; }; class Item3 { position[]={3789.6514,361.59094,6247.3721}; azimut=-176.886; special="FLY"; id=110; side="EAST"; vehicle="RUS_Soldier1"; skill=0.2; }; class Item4 { position[]={3796.2188,360.83978,6249.6528}; azimut=-176.886; special="FLY"; id=111; side="EAST"; vehicle="RUS_Soldier1"; skill=0.2; }; }; }; class Item16 { side="EAST"; class Vehicles { items=5; class Item0 { position[]={3425.4617,320.84528,5854.7773}; azimut=-176.886; special="FLY"; id=112; side="EAST"; vehicle="RUS_Soldier_TL"; leader=1; rank="SERGEANT"; skill=0.59151018; init="nul=[this,""metsa1"",""random"",""trigger""] execVM ""ups.sqf"""; }; class Item1 { position[]={3408.2166,313.7659,5836.6675}; azimut=-176.886; special="FLY"; id=114; side="EAST"; vehicle="RUS_Soldier3"; skill=0.2; }; class Item2 { position[]={3414.6121,315.9617,5839.8359}; azimut=-176.886; special="FLY"; id=113; side="EAST"; vehicle="RUS_Soldier1"; skill=0.2; }; class Item3 { position[]={3421.3923,318.32321,5843.7432}; azimut=-176.886; special="FLY"; id=115; side="EAST"; vehicle="RUS_Soldier1"; skill=0.2; }; class Item4 { position[]={3427.9597,320.35254,5846.0239}; azimut=-176.886; special="FLY"; id=116; side="EAST"; vehicle="RUS_Soldier1"; skill=0.2; }; }; }; class Item17 { side="EAST"; class Vehicles { items=5; class Item0 { position[]={3827.3123,339.87201,5690.7534}; azimut=-176.886; special="FLY"; id=117; side="EAST"; vehicle="RUS_Soldier_TL"; leader=1; rank="SERGEANT"; skill=0.57084566; init="nul=[this,""metsa1"",""random"",""trigger""] execVM ""ups.sqf"""; }; class Item1 { position[]={3810.0671,334.29791,5672.6436}; azimut=-176.886; special="FLY"; id=119; side="EAST"; vehicle="RUS_Soldier3"; skill=0.2; }; class Item2 { position[]={3816.4626,335.53207,5675.812}; azimut=-176.886; special="FLY"; id=118; side="EAST"; vehicle="RUS_Soldier1"; skill=0.2; }; class Item3 { position[]={3823.2429,336.96786,5679.7192}; azimut=-176.886; special="FLY"; id=120; side="EAST"; vehicle="RUS_Soldier1"; skill=0.2; }; class Item4 { position[]={3829.8103,338.00848,5682}; azimut=-176.886; special="FLY"; id=121; side="EAST"; vehicle="RUS_Soldier1"; skill=0.2; }; }; }; class Item18 { side="EAST"; class Vehicles { items=1; class Item0 { position[]={4330.875,315.1879,6233.1626}; azimut=-176.886; special="FLY"; id=122; side="EAST"; vehicle="BTR90"; leader=1; skill=0.59151018; init="nul=[this,""pogo1"",""random"",""trigger""] execVM ""ups.sqf"""; }; }; }; class Item19 { side="EAST"; class Vehicles { items=1; class Item0 { position[]={4916.3389,299.88437,5928.4258}; azimut=-176.886; special="FLY"; id=123; side="EAST"; vehicle="BTR90"; leader=1; skill=0.55018085; init="nul=[this,""pogo1"",""random"",""trigger""] execVM ""ups.sqf"""; }; }; }; class Item20 { side="EAST"; class Vehicles { items=8; class Item0 { position[]={4485.9116,302.74326,6034.6274}; azimut=-176.886; special="FLY"; id=124; side="EAST"; vehicle="MVD_Soldier_TL"; leader=1; rank="SERGEANT"; skill=0.62767357; init="nul=[this,""pogo1"",""random"",""trigger""] execVM ""ups.sqf"""; }; class Item1 { position[]={4461.7119,305.40897,6013.9385}; azimut=-176.886; special="FLY"; id=125; side="EAST"; vehicle="MVD_Soldier"; skill=0.2; }; class Item2 { position[]={4468.6665,304.7724,6016.5176}; azimut=-176.886; special="FLY"; id=127; side="EAST"; vehicle="MVD_Soldier"; skill=0.2; }; class Item3 { position[]={4475.062,304.17505,6019.686}; azimut=-176.886; special="FLY"; id=126; side="EAST"; vehicle="MVD_Soldier"; skill=0.2; }; class Item4 { position[]={4481.8423,303.52939,6023.5933}; azimut=-176.886; special="FLY"; id=128; side="EAST"; vehicle="MVD_Soldier_AT"; skill=0.2; }; class Item5 { position[]={4488.4097,302.94244,6025.874}; azimut=-176.886; special="FLY"; id=129; side="EAST"; vehicle="MVD_Soldier_MG"; skill=0.2; }; class Item6 { position[]={4455.3018,306.07916,6010.5454}; azimut=-176.886; special="FLY"; id=131; side="EAST"; vehicle="MVD_Soldier"; skill=0.2; }; class Item7 { position[]={4448.3472,306.7879,6007.9663}; azimut=-176.886; special="FLY"; id=130; side="EAST"; vehicle="MVD_Soldier"; skill=0.2; }; }; }; class Item21 { side="EAST"; class Vehicles { items=8; class Item0 { position[]={4475.085,326.0564,5637.7861}; azimut=-176.886; special="FLY"; id=132; side="EAST"; vehicle="MVD_Soldier_TL"; leader=1; rank="SERGEANT"; skill=0.60700876; init="nul=[this,""pogo1"",""random"",""trigger""] execVM ""ups.sqf"""; }; class Item1 { position[]={4450.8853,329.05954,5617.0972}; azimut=-176.886; special="FLY"; id=133; side="EAST"; vehicle="MVD_Soldier"; skill=0.2; }; class Item2 { position[]={4457.8398,329.05771,5619.6763}; azimut=-176.886; special="FLY"; id=135; side="EAST"; vehicle="MVD_Soldier"; skill=0.2; }; class Item3 { position[]={4464.2354,328.78922,5622.8447}; azimut=-176.886; special="FLY"; id=134; side="EAST"; vehicle="MVD_Soldier"; skill=0.2; }; class Item4 { position[]={4471.0156,328.23654,5626.752}; azimut=-176.886; special="FLY"; id=136; side="EAST"; vehicle="MVD_Soldier_AT"; skill=0.2; }; class Item5 { position[]={4477.583,327.87604,5629.0327}; azimut=-176.886; special="FLY"; id=137; side="EAST"; vehicle="MVD_Soldier_MG"; skill=0.2; }; class Item6 { position[]={4444.4751,329.14172,5613.7041}; azimut=-176.886; special="FLY"; id=139; side="EAST"; vehicle="MVD_Soldier"; skill=0.2; }; class Item7 { position[]={4437.5205,328.94278,5611.125}; azimut=-176.886; special="FLY"; id=138; side="EAST"; vehicle="MVD_Soldier"; skill=0.2; }; }; }; class Item22 { side="EAST"; class Vehicles { items=8; class Item0 { position[]={4849.769,290.0675,6333.0225}; azimut=-176.886; special="FLY"; id=140; side="EAST"; vehicle="MVD_Soldier_TL"; leader=1; rank="SERGEANT"; skill=0.58117795; init="nul=[this,""pogo1"",""random"",""trigger""] execVM ""ups.sqf"""; }; class Item1 { position[]={4825.5693,289.42169,6312.3335}; azimut=-176.886; special="FLY"; id=141; side="EAST"; vehicle="MVD_Soldier"; skill=0.2; }; class Item2 { position[]={4832.5239,289.67319,6314.9126}; azimut=-176.886; special="FLY"; id=143; side="EAST"; vehicle="MVD_Soldier"; skill=0.2; }; class Item3 { position[]={4838.9194,289.87854,6318.0811}; azimut=-176.886; special="FLY"; id=142; side="EAST"; vehicle="MVD_Soldier"; skill=0.2; }; class Item4 { position[]={4845.6997,290.07394,6321.9883}; azimut=-176.886; special="FLY"; id=144; side="EAST"; vehicle="MVD_Soldier_AT"; skill=0.2; }; class Item5 { position[]={4852.2671,290.24573,6324.269}; azimut=-176.886; special="FLY"; id=145; side="EAST"; vehicle="MVD_Soldier_MG"; skill=0.2; }; class Item6 { position[]={4819.1592,289.16492,6308.9404}; azimut=-176.886; special="FLY"; id=147; side="EAST"; vehicle="MVD_Soldier"; skill=0.2; }; class Item7 { position[]={4812.2046,288.7854,6306.3613}; azimut=-176.886; special="FLY"; id=146; side="EAST"; vehicle="MVD_Soldier"; skill=0.2; }; }; }; class Item23 { side="EAST"; class Vehicles { items=8; class Item0 { position[]={4899.4204,311.23178,5808.9019}; azimut=-176.886; special="FLY"; id=148; side="EAST"; vehicle="MVD_Soldier_TL"; leader=1; rank="SERGEANT"; skill=0.59151018; init="nul=[this,""pogo1"",""random"",""trigger""] execVM ""ups.sqf"""; }; class Item1 { position[]={4875.2207,313.78421,5788.2129}; azimut=-176.886; special="FLY"; id=149; side="EAST"; vehicle="MVD_Soldier"; skill=0.2; }; class Item2 { position[]={4882.1753,313.4227,5790.792}; azimut=-176.886; special="FLY"; id=151; side="EAST"; vehicle="MVD_Soldier"; skill=0.2; }; class Item3 { position[]={4888.5708,312.97113,5793.9604}; azimut=-176.886; special="FLY"; id=150; side="EAST"; vehicle="MVD_Soldier"; skill=0.2; }; class Item4 { position[]={4895.3511,312.38354,5797.8677}; azimut=-176.886; special="FLY"; id=152; side="EAST"; vehicle="MVD_Soldier_AT"; skill=0.2; }; class Item5 { position[]={4901.9185,311.9025,5800.1484}; azimut=-176.886; special="FLY"; id=153; side="EAST"; vehicle="MVD_Soldier_MG"; skill=0.2; }; class Item6 { position[]={4868.8105,314.16501,5784.8198}; azimut=-176.886; special="FLY"; id=155; side="EAST"; vehicle="MVD_Soldier"; skill=0.2; }; class Item7 { position[]={4861.856,314.46863,5782.2407}; azimut=-176.886; special="FLY"; id=154; side="EAST"; vehicle="MVD_Soldier"; skill=0.2; }; }; }; class Item24 { side="EAST"; class Vehicles { items=1; class Item0 { position[]={4735.9668,287.23749,6100.2964}; azimut=-176.886; special="FLY"; id=156; side="EAST"; vehicle="RU_Soldier_AA"; leader=1; rank="SERGEANT"; skill=0.2; init="nul=[this,""pogo1"",""random"",""trigger""] execVM ""ups.sqf"""; }; }; }; class Item25 { side="EAST"; class Vehicles { items=1; class Item0 { position[]={4720.6558,288.5762,6088.6162}; azimut=-176.886; special="FLY"; id=157; side="EAST"; vehicle="RU_Soldier_Sniper"; leader=1; rank="SERGEANT"; skill=0.2; init="nul=[this,""pogo1"",""random"",""trigger""] execVM ""ups.sqf"""; }; }; }; class Item26 { side="EAST"; class Vehicles { items=3; class Item0 { position[]={3698.8464,402,5993.8184}; azimut=45; special="FLY"; id=158; side="EAST"; vehicle="RUS_Commander"; leader=1; rank="SERGEANT"; skill=0.59151018; }; class Item1 { position[]={3698.1201,402,5990.8433}; azimut=45; special="FLY"; id=159; side="EAST"; vehicle="RUS_Soldier_GL"; rank="SERGEANT"; skill=0.60184276; }; class Item2 { position[]={3695.3247,402,5993.71}; azimut=45; special="FLY"; id=160; side="EAST"; vehicle="RUS_Soldier_GL"; rank="SERGEANT"; skill=0.55534714; }; }; }; class Item27 { side="EAST"; class Vehicles { items=1; class Item0 { position[]={6547.4155,375.1243,5539.6172}; azimut=-176.886; special="FLY"; id=167; side="EAST"; vehicle="RU_Soldier_AA"; leader=1; rank="SERGEANT"; skill=0.2; init="nul=[this,""forest1"",""random"",""trigger""] execVM ""ups.sqf"""; }; }; }; class Item28 { side="EAST"; class Vehicles { items=1; class Item0 { position[]={6532.1045,364.69943,5527.937}; azimut=-176.886; special="FLY"; id=168; side="EAST"; vehicle="RU_Soldier_Sniper"; leader=1; rank="SERGEANT"; skill=0.2; init="nul=[this,""forest1"",""random"",""trigger""] execVM ""ups.sqf"""; }; }; }; class Item29 { side="EAST"; class Vehicles { items=6; class Item0 { position[]={6130.8735,224.86804,5791.522}; azimut=-176.886; special="FLY"; id=169; side="EAST"; vehicle="RU_Soldier_TL"; leader=1; rank="SERGEANT"; skill=0.57084566; init="nul=[this,""forest1"",""random"",""trigger""] execVM ""ups.sqf"""; }; class Item1 { position[]={6113.6284,219.64461,5773.4121}; azimut=-176.886; special="FLY"; id=171; side="EAST"; vehicle="RU_Soldier_MG"; skill=0.2; }; class Item2 { position[]={6120.0239,221.64616,5776.5806}; azimut=-176.886; special="FLY"; id=170; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item3 { position[]={6126.8042,223.76379,5780.4878}; azimut=-176.886; special="FLY"; id=172; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item4 { position[]={6133.3716,225.76564,5782.7686}; azimut=-176.886; special="FLY"; id=173; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item5 { position[]={6108.541,218.07697,5770.7139}; azimut=-176.886; special="FLY"; id=174; side="EAST"; vehicle="RU_Soldier_AT"; skill=0.2; }; }; }; class Item30 { side="EAST"; class Vehicles { items=6; class Item0 { position[]={6376.7295,301.96667,5547.5908}; azimut=-176.886; special="FLY"; id=175; side="EAST"; vehicle="RU_Soldier_TL"; leader=1; rank="SERGEANT"; skill=0.2; init="nul=[this,""forest1"",""random"",""trigger""] execVM ""ups.sqf"""; }; class Item1 { position[]={6359.4844,291.52689,5529.481}; azimut=-176.886; special="FLY"; id=177; side="EAST"; vehicle="RU_Soldier_MG"; skill=0.2; }; class Item2 { position[]={6365.8799,294.48315,5532.6494}; azimut=-176.886; special="FLY"; id=176; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item3 { position[]={6372.6602,297.85947,5536.5566}; azimut=-176.886; special="FLY"; id=178; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item4 { position[]={6379.2275,301.02408,5538.8374}; azimut=-176.886; special="FLY"; id=179; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item5 { position[]={6354.397,289.11267,5526.7827}; azimut=-176.886; special="FLY"; id=180; side="EAST"; vehicle="RU_Soldier_AT"; skill=0.2; }; }; }; class Item31 { side="EAST"; class Vehicles { items=6; class Item0 { position[]={6691.7983,342.03897,5761.6968}; azimut=-176.886; special="FLY"; id=181; side="EAST"; vehicle="RU_Soldier_TL"; leader=1; rank="SERGEANT"; skill=0.59151018; init="nul=[this,""forest1"",""random"",""trigger""] execVM ""ups.sqf"""; }; class Item1 { position[]={6674.5532,344.96878,5743.5869}; azimut=-176.886; special="FLY"; id=183; side="EAST"; vehicle="RU_Soldier_MG"; skill=0.2; }; class Item2 { position[]={6680.9487,344.27548,5746.7554}; azimut=-176.886; special="FLY"; id=182; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item3 { position[]={6687.729,343.53934,5750.6626}; azimut=-176.886; special="FLY"; id=184; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item4 { position[]={6694.2964,343.00082,5752.9434}; azimut=-176.886; special="FLY"; id=185; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item5 { position[]={6669.4658,345.54861,5740.8887}; azimut=-176.886; special="FLY"; id=186; side="EAST"; vehicle="RU_Soldier_AT"; skill=0.2; }; }; }; class Item32 { side="EAST"; class Vehicles { items=6; class Item0 { position[]={6022.5469,185.83092,5225.6328}; azimut=-176.886; special="FLY"; id=187; side="EAST"; vehicle="RU_Soldier_TL"; leader=1; rank="SERGEANT"; skill=0.61217469; init="nul=[this,""forest1"",""random"",""trigger""] execVM ""ups.sqf"""; }; class Item1 { position[]={6005.3018,181.1969,5207.5229}; azimut=-176.886; special="FLY"; id=189; side="EAST"; vehicle="RU_Soldier_MG"; skill=0.2; }; class Item2 { position[]={6011.6973,182.27992,5210.6914}; azimut=-176.886; special="FLY"; id=188; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item3 { position[]={6018.4775,183.58908,5214.5986}; azimut=-176.886; special="FLY"; id=190; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item4 { position[]={6025.0449,184.62238,5216.8794}; azimut=-176.886; special="FLY"; id=191; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item5 { position[]={6000.2144,180.34053,5204.8247}; azimut=-176.886; special="FLY"; id=192; side="EAST"; vehicle="RU_Soldier_AT"; skill=0.2; }; }; }; class Item33 { side="EAST"; class Vehicles { items=6; class Item0 { position[]={6697.1162,291.56009,5085.375}; azimut=-176.886; special="FLY"; id=193; side="EAST"; vehicle="RU_Soldier_TL"; leader=1; rank="SERGEANT"; skill=0.57601136; init="nul=[this,""forest1"",""random"",""trigger""] execVM ""ups.sqf"""; }; class Item1 { position[]={6679.8711,291.33649,5067.2651}; azimut=-176.886; special="FLY"; id=195; side="EAST"; vehicle="RU_Soldier_MG"; skill=0.2; }; class Item2 { position[]={6686.2666,290.85785,5070.4336}; azimut=-176.886; special="FLY"; id=194; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item3 { position[]={6693.0469,290.33206,5074.3408}; azimut=-176.886; special="FLY"; id=196; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item4 { position[]={6699.6143,289.49817,5076.6216}; azimut=-176.886; special="FLY"; id=197; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item5 { position[]={6674.7837,291.64005,5064.5669}; azimut=-176.886; special="FLY"; id=198; side="EAST"; vehicle="RU_Soldier_AT"; skill=0.2; }; }; }; class Item34 { side="EAST"; class Vehicles { items=1; class Item0 { position[]={6289.8223,265.82501,5520.1704}; azimut=-176.886; special="FLY"; id=199; side="EAST"; vehicle="BTR90"; leader=1; skill=0.58117795; init="nul=[this,""forest1"",""random"",""trigger""] execVM ""ups.sqf"""; }; }; }; class Item35 { side="EAST"; class Vehicles { items=1; class Item0 { position[]={3004.7075,313.01572,7836.4731}; azimut=-176.886; special="FLY"; id=200; side="EAST"; vehicle="T90"; leader=1; skill=0.60184276; text="armor1"; init="nul=[this,""pusto1"",""random"",""trigger""] execVM ""ups.sqf"""; }; }; }; class Item36 { side="EAST"; class Vehicles { items=1; class Item0 { position[]={3167.7905,294.57877,8102.8145}; azimut=-176.886; special="FLY"; id=201; side="EAST"; vehicle="T90"; leader=1; skill=0.61734098; text="armor2"; init="nul=[this,""pusto1"",""random"",""trigger""] execVM ""ups.sqf"""; }; }; }; class Item37 { side="EAST"; class Vehicles { items=1; class Item0 { position[]={2995.1643,298.97342,8047.5552}; azimut=-176.886; special="FLY"; id=202; side="EAST"; vehicle="T90"; leader=1; skill=0.61734098; text="armor3"; init="nul=[this,""pusto1"",""random"",""trigger""] execVM ""ups.sqf"""; }; }; }; class Item38 { side="EAST"; class Vehicles { items=1; class Item0 { position[]={3253.8894,299.01959,7972.1919}; azimut=-176.886; special="FLY"; id=203; side="EAST"; vehicle="T90"; leader=1; skill=0.58634394; text="armor4"; init="nul=[this,""pusto1"",""random"",""trigger""] execVM ""ups.sqf"""; }; }; }; class Item39 { side="EAST"; class Vehicles { items=6; class Item0 { position[]={3095.7632,314.22299,7773.3032}; azimut=-176.886; special="FLY"; id=204; side="EAST"; vehicle="RU_Soldier_TL"; leader=1; rank="SERGEANT"; skill=0.2; init="nul=[this,""pusto1"",""random"",""trigger""] execVM ""ups.sqf"""; }; class Item1 { position[]={3078.5181,316.63007,7755.1934}; azimut=-176.886; special="FLY"; id=206; side="EAST"; vehicle="RU_Soldier_AT"; skill=0.2; }; class Item2 { position[]={3084.9136,316.14349,7758.3618}; azimut=-176.886; special="FLY"; id=205; side="EAST"; vehicle="RU_Soldier_AA"; skill=0.2; }; class Item3 { position[]={3091.6938,315.54129,7762.269}; azimut=-176.886; special="FLY"; id=207; side="EAST"; vehicle="RU_Soldier_AA"; skill=0.2; }; class Item4 { position[]={3098.2612,315.11111,7764.5498}; azimut=-176.886; special="FLY"; id=208; side="EAST"; vehicle="RU_Soldier_MG"; skill=0.2; }; class Item5 { position[]={3073.4307,317.03152,7752.4951}; azimut=-176.886; special="FLY"; id=209; side="EAST"; vehicle="RU_Soldier_AT"; skill=0.2; }; }; }; class Item40 { side="EAST"; class Vehicles { items=6; class Item0 { position[]={3281.4397,299.19543,7928.8735}; azimut=-176.886; special="FLY"; id=210; side="EAST"; vehicle="RU_Soldier_TL"; leader=1; rank="SERGEANT"; skill=0.2; init="nul=[this,""pusto1"",""random"",""trigger""] execVM ""ups.sqf"""; }; class Item1 { position[]={3264.1946,299.80188,7910.7637}; azimut=-176.886; special="FLY"; id=212; side="EAST"; vehicle="RU_Soldier_AT"; skill=0.2; }; class Item2 { position[]={3270.5901,299.66684,7913.9321}; azimut=-176.886; special="FLY"; id=211; side="EAST"; vehicle="RU_Soldier_AA"; skill=0.2; }; class Item3 { position[]={3277.3704,299.51508,7917.8394}; azimut=-176.886; special="FLY"; id=213; side="EAST"; vehicle="RU_Soldier_AA"; skill=0.2; }; class Item4 { position[]={3283.9377,299.42804,7920.1201}; azimut=-176.886; special="FLY"; id=214; side="EAST"; vehicle="RU_Soldier_MG"; skill=0.2; }; class Item5 { position[]={3259.1072,299.9296,7908.0654}; azimut=-176.886; special="FLY"; id=215; side="EAST"; vehicle="RU_Soldier_AT"; skill=0.2; }; }; }; class Item41 { side="EAST"; class Vehicles { items=1; class Item0 { position[]={5336.5928,335.56064,8727.3887}; azimut=245; special="FLY"; id=225; side="EAST"; vehicle="D30_RU"; leader=1; skill=0.60184276; text="d30"; init="this setbehaviour ""aware"""; }; }; }; class Item42 { side="EAST"; class Vehicles { items=1; class Item0 { position[]={5338.0303,336.07684,8741.3457}; azimut=295; special="FLY"; id=226; side="EAST"; vehicle="D30_RU"; leader=1; skill=0.64317185; text="d30_2"; init="this setbehaviour ""aware"""; }; }; }; class Item43 { side="EAST"; class Vehicles { items=1; class Item0 { position[]={5420.084,332.69034,8725.1846}; azimut=70; special="FLY"; id=227; side="EAST"; vehicle="KORD_high"; leader=1; skill=0.58117795; init="this setbehaviour ""aware"""; }; }; }; class Item44 { side="EAST"; class Vehicles { items=1; class Item0 { position[]={5406.7788,331.66547,8702.2998}; azimut=175; special="FLY"; id=228; side="EAST"; vehicle="Igla_AA_pod_East"; leader=1; skill=0.60700876; init="this setbehaviour ""aware"""; }; }; }; class Item45 { side="EAST"; class Vehicles { items=1; class Item0 { position[]={5357.3784,338.80197,8492.6318}; azimut=-176.886; special="FLY"; id=232; side="EAST"; vehicle="T90"; leader=1; skill=0.60700876; text="tank1"; init="nul=[this,""camp1"",""random"",""trigger""] execVM ""ups.sqf"""; }; }; }; class Item46 { side="EAST"; class Vehicles { items=1; class Item0 { position[]={5436.8677,336.20227,8861.915}; azimut=-176.886; special="FLY"; id=233; side="EAST"; vehicle="BTR90"; leader=1; skill=0.58634394; text="tank2"; init="nul=[this,""camp1"",""random"",""trigger""] execVM ""ups.sqf"""; }; }; }; class Item47 { side="EAST"; class Vehicles { items=8; class Item0 { position[]={5588.3232,323.50818,8896.6807}; azimut=-176.886; special="FLY"; id=234; side="EAST"; vehicle="RU_Soldier_TL"; leader=1; rank="SERGEANT"; skill=0.60184276; init="nul=[this,""camp1"",""random"",""trigger""] execVM ""ups.sqf"""; }; class Item1 { position[]={5571.0781,323.96643,8878.5713}; azimut=-176.886; special="FLY"; id=236; side="EAST"; vehicle="RU_Soldier_AA"; skill=0.2; }; class Item2 { position[]={5577.4736,323.77686,8881.7402}; azimut=-176.886; special="FLY"; id=235; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item3 { position[]={5581.4092,323.65469,8883.5303}; azimut=-176.886; special="FLY"; id=237; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item4 { position[]={5587.9766,323.44998,8885.8115}; azimut=-176.886; special="FLY"; id=238; side="EAST"; vehicle="RU_Soldier_MG"; skill=0.2; }; class Item5 { position[]={5567.1816,324.05893,8876.4697}; azimut=-176.886; special="FLY"; id=239; side="EAST"; vehicle="RU_Soldier_AT"; skill=0.2; }; class Item6 { position[]={5584.9077,323.54401,8884.7002}; azimut=-176.886; special="FLY"; id=250; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item7 { position[]={5574.6875,323.86417,8880}; azimut=-176.886; special="FLY"; id=249; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; }; }; class Item48 { side="EAST"; class Vehicles { items=8; class Item0 { position[]={5186.2432,346.3378,8888.4033}; azimut=-176.886; special="FLY"; id=240; side="EAST"; vehicle="RU_Soldier_TL"; leader=1; rank="SERGEANT"; skill=0.58117795; init="nul=[this,""camp1"",""random"",""trigger""] execVM ""ups.sqf"""; }; class Item1 { position[]={5173.6338,346.13989,8875.252}; azimut=-176.886; special="FLY"; id=242; side="EAST"; vehicle="RU_Soldier_AA"; skill=0.2; }; class Item2 { position[]={5176.5254,346.1246,8876.5791}; azimut=-176.886; special="FLY"; id=241; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item3 { position[]={5184.8555,346.10239,8880.627}; azimut=-176.886; special="FLY"; id=243; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item4 { position[]={5188.4346,346.07782,8881.6416}; azimut=-176.886; special="FLY"; id=244; side="EAST"; vehicle="RU_Soldier_MG"; skill=0.2; }; class Item5 { position[]={5169.7437,346.16583,8873.126}; azimut=-176.886; special="FLY"; id=245; side="EAST"; vehicle="RU_Soldier_AT"; skill=0.2; }; class Item6 { position[]={5181.8672,346.11139,8879.3613}; azimut=-176.886; special="FLY"; id=248; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item7 { position[]={5178.9897,346.11667,8877.8477}; azimut=-176.886; special="FLY"; id=247; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; }; }; class Item49 { side="EAST"; class Vehicles { items=1; class Item0 { position[]={5371.6021,333.95285,8718.9004}; azimut=105; special="FLY"; id=246; side="EAST"; vehicle="RU_Commander"; leader=1; rank="COLONEL"; skill=0.59667617; text="officer1"; init="this setbehaviour ""aware"""; }; }; }; class Item50 { side="EAST"; class Vehicles { items=8; class Item0 { position[]={5105.0674,349.31396,8471.2764}; azimut=-176.886; special="FLY"; id=251; side="EAST"; vehicle="RU_Soldier_TL"; leader=1; rank="SERGEANT"; skill=0.58117795; init="nul=[this,""camp1"",""random"",""trigger""] execVM ""ups.sqf"""; }; class Item1 { position[]={5097.8208,349.59933,8451.7568}; azimut=-176.886; special="FLY"; id=253; side="EAST"; vehicle="RU_Soldier_AA"; skill=0.2; }; class Item2 { position[]={5104.2163,349.81644,8454.9258}; azimut=-176.886; special="FLY"; id=252; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item3 { position[]={5108.1519,349.93716,8456.7158}; azimut=-176.886; special="FLY"; id=254; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item4 { position[]={5114.7192,350.1355,8458.9971}; azimut=-176.886; special="FLY"; id=255; side="EAST"; vehicle="RU_Soldier_MG"; skill=0.2; }; class Item5 { position[]={5093.9243,349.45474,8449.6553}; azimut=-176.886; special="FLY"; id=256; side="EAST"; vehicle="RU_Soldier_AT"; skill=0.2; }; class Item6 { position[]={5111.6504,350.04239,8457.8857}; azimut=-176.886; special="FLY"; id=266; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item7 { position[]={5101.4302,349.73657,8453.1855}; azimut=-176.886; special="FLY"; id=265; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; }; }; class Item51 { side="EAST"; class Vehicles { items=8; class Item0 { position[]={5465.2666,347.13754,8275.4834}; azimut=-176.886; special="FLY"; id=257; side="EAST"; vehicle="RU_Soldier_TL"; leader=1; rank="SERGEANT"; skill=0.61734098; init="nul=[this,""camp1"",""random"",""trigger""] execVM ""ups.sqf"""; }; class Item1 { position[]={5455.2686,348.56238,8261.6211}; azimut=-176.886; special="FLY"; id=259; side="EAST"; vehicle="RU_Soldier_AA"; skill=0.2; }; class Item2 { position[]={5458.1602,348.24142,8262.9482}; azimut=-176.886; special="FLY"; id=258; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item3 { position[]={5466.4902,347.19849,8266.9961}; azimut=-176.886; special="FLY"; id=260; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item4 { position[]={5469.2246,346.841,8267.6807}; azimut=-176.886; special="FLY"; id=261; side="EAST"; vehicle="RU_Soldier_MG"; skill=0.2; }; class Item5 { position[]={5451.3784,348.98077,8259.4951}; azimut=-176.886; special="FLY"; id=262; side="EAST"; vehicle="RU_Soldier_AT"; skill=0.2; }; class Item6 { position[]={5463.502,347.58316,8265.7305}; azimut=-176.886; special="FLY"; id=264; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item7 { position[]={5460.6245,347.95483,8264.2168}; azimut=-176.886; special="FLY"; id=263; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; }; }; class Item52 { side="EAST"; class Vehicles { items=8; class Item0 { position[]={5689.3926,318.17615,8593.3779}; azimut=-176.886; special="FLY"; id=267; side="EAST"; vehicle="RU_Soldier_TL"; leader=1; rank="SERGEANT"; skill=0.56567907; init="nul=[this,""camp1"",""random"",""trigger""] execVM ""ups.sqf"""; }; class Item1 { position[]={5674.2925,319.47189,8579.1006}; azimut=-176.886; special="FLY"; id=269; side="EAST"; vehicle="RU_Soldier_AA"; skill=0.2; }; class Item2 { position[]={5680.688,318.93207,8582.2695}; azimut=-176.886; special="FLY"; id=268; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item3 { position[]={5684.6235,318.67047,8584.0596}; azimut=-176.886; special="FLY"; id=270; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item4 { position[]={5691.1909,318.17123,8586.3408}; azimut=-176.886; special="FLY"; id=271; side="EAST"; vehicle="RU_Soldier_MG"; skill=0.2; }; class Item5 { position[]={5670.396,319.63156,8576.999}; azimut=-176.886; special="FLY"; id=272; side="EAST"; vehicle="RU_Soldier_AT"; skill=0.2; }; class Item6 { position[]={5688.1221,318.40875,8585.2295}; azimut=-176.886; special="FLY"; id=274; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; class Item7 { position[]={5677.9019,319.21426,8580.5293}; azimut=-176.886; special="FLY"; id=273; side="EAST"; vehicle="RU_Soldier"; skill=0.2; }; }; }; }; class Vehicles { items=98; class Item0 { position[]={1809.3596,157.54724,5096.4282}; id=25; side="EMPTY"; vehicle="MtvrReammo"; skill=0.60000002; init="xhandle = [this,120] execVM ""scripts\vehspawn.sqf"""; }; class Item1 { position[]={1814.4683,157.78763,5096.4209}; id=26; side="EMPTY"; vehicle="MtvrRefuel"; skill=0.60000002; init="xhandle = [this,120] execVM ""scripts\vehspawn.sqf"""; }; class Item2 { position[]={1819.3751,158.11279,5096.4082}; id=27; side="EMPTY"; vehicle="MtvrRepair"; skill=0.60000002; init="xhandle = [this,120] execVM ""scripts\vehspawn.sqf"""; }; class Item3 { position[]={1827.4082,159.06424,5104.7559}; azimut=330; id=28; side="EMPTY"; vehicle="HMMWV_Ambulance"; skill=0.60000002; init="xhandle = [this,120] execVM ""scripts\vehspawn.sqf"""; }; class Item4 { position[]={1831.9504,159.6156,5106.7207}; azimut=330; id=29; side="EMPTY"; vehicle="HMMWV_Ambulance"; skill=0.60000002; init="xhandle = [this,120] execVM ""scripts\vehspawn.sqf"""; }; class Item5 { position[]={1813.781,158.41147,5114.3926}; azimut=50; id=30; side="EMPTY"; vehicle="HMMWV_M2"; skill=0.60000002; init="xhandle = [this,120] execVM ""scripts\vehspawn.sqf"""; }; class Item6 { position[]={1821.1023,159.39726,5119.2266}; azimut=50; id=31; side="EMPTY"; vehicle="HMMWV_M2"; skill=0.60000002; init="xhandle = [this,120] execVM ""scripts\vehspawn.sqf"""; }; class Item7 { position[]={1802.7936,157.46671,5108.7441}; azimut=75; id=32; side="EMPTY"; vehicle="MTVR"; skill=0.60000002; init="xhandle = [this,120] execVM ""scripts\vehspawn.sqf"""; }; class Item8 { position[]={1792.8495,156.89555,5105.3701}; azimut=75; id=33; side="EMPTY"; vehicle="MTVR"; skill=0.60000002; init="xhandle = [this,120] execVM ""scripts\vehspawn.sqf"""; }; class Item9 { position[]={1784.797,156.19652,5044.5581}; id=34; side="EMPTY"; vehicle="HeliH"; skill=0.60000002; }; class Item10 { position[]={1784.8854,156.1387,5048.8955}; id=35; side="EMPTY"; vehicle="UH1Y"; skill=0.60000002; init="xhandle = [this,120] execVM ""scripts\vehspawn.sqf"""; }; class Item11 { position[]={1814.1981,157.82713,5042.959}; id=36; side="EMPTY"; vehicle="MH60S"; skill=0.60000002; init="xhandle = [this,120] execVM ""scripts\vehspawn.sqf"""; }; class Item12 { position[]={1814.0822,157.80515,5044.8203}; id=37; side="EMPTY"; vehicle="HeliH"; skill=0.60000002; }; class Item13 { position[]={1749.2896,153.5287,5086.1621}; azimut=-176.886; id=38; side="EMPTY"; vehicle="USBasicWeaponsBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; synchronizations[]={21,22,23,24}; }; class Item14 { position[]={1749.1854,153.50912,5085.2598}; azimut=-176.886; id=39; side="EMPTY"; vehicle="USBasicWeaponsBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; synchronizations[]={21,22,23,24}; }; class Item15 { position[]={1749.048,153.49182,5084.2822}; azimut=-176.886; id=40; side="EMPTY"; vehicle="USBasicWeaponsBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; synchronizations[]={21,22,23,24}; }; class Item16 { position[]={1748.994,153.35092,5080.7881}; azimut=-176.886; id=41; side="EMPTY"; vehicle="USSpecialWeaponsBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; synchronizations[]={21,22,23,24}; }; class Item17 { position[]={1748.9137,153.29655,5079.8882}; azimut=-176.886; id=42; side="EMPTY"; vehicle="USSpecialWeaponsBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; synchronizations[]={21,22,23,24}; }; class Item18 { position[]={1748.9137,153.25032,5078.9463}; azimut=-176.886; id=43; side="EMPTY"; vehicle="USSpecialWeaponsBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; synchronizations[]={21,22,23,24}; }; class Item19 { position[]={1748.828,153.19319,5078.0039}; azimut=-176.886; id=44; side="EMPTY"; vehicle="USSpecialWeaponsBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; synchronizations[]={21,22,23,24}; }; class Item20 { position[]={1748.7852,153.16553,5076.9761}; azimut=-176.886; id=45; side="EMPTY"; vehicle="USSpecialWeaponsBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; synchronizations[]={21,22,23,24}; }; class Item21 { position[]={1748.7317,153.1745,5076.002}; azimut=-176.886; id=46; side="EMPTY"; vehicle="USSpecialWeaponsBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; synchronizations[]={21,22,23,24}; }; class Item22 { position[]={1748.6846,153.21373,5075.0728}; azimut=-176.886; id=47; side="EMPTY"; vehicle="USSpecialWeaponsBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; synchronizations[]={21,22,23,24}; }; class Item23 { position[]={1748.655,153.29349,5073.3047}; azimut=-176.886; id=48; side="EMPTY"; vehicle="USLaunchersBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; synchronizations[]={21,22,23,24}; }; class Item24 { position[]={1748.6407,153.33392,5072.4092}; azimut=-176.886; id=49; side="EMPTY"; vehicle="USLaunchersBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; synchronizations[]={21,22,23,24}; }; class Item25 { position[]={1748.5699,153.37054,5071.4932}; azimut=-176.886; id=50; side="EMPTY"; vehicle="USLaunchersBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; synchronizations[]={21,22,23,24}; }; class Item26 { position[]={1748.5466,153.41008,5070.6006}; azimut=-176.886; id=51; side="EMPTY"; vehicle="USLaunchersBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; synchronizations[]={21,22,23,24}; }; class Item27 { position[]={1748.484,153.43585,5069.7456}; azimut=-176.886; id=52; side="EMPTY"; vehicle="USLaunchersBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; synchronizations[]={21,22,23,24}; }; class Item28 { position[]={1746.8452,153.3199,5067.3901}; azimut=-176.886; id=53; side="EMPTY"; vehicle="USOrdnanceBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; synchronizations[]={21,22,23,24}; }; class Item29 { position[]={1746.9384,153.32475,5066.4497}; azimut=-176.886; id=54; side="EMPTY"; vehicle="USOrdnanceBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; synchronizations[]={21,22,23,24}; }; class Item30 { position[]={1792.96,156.65836,5043.3706}; azimut=-176.886; id=55; side="EMPTY"; vehicle="USVehicleBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; synchronizations[]={21,22,23,24}; }; class Item31 { position[]={1792.8993,156.63846,5044.6333}; azimut=-176.886; id=56; side="EMPTY"; vehicle="Barrel1"; leader=1; skill=0.2; description="Company CO. (Capt.)"; synchronizations[]={21,22,23,24}; }; class Item32 { position[]={1804.9706,157.29979,5042.6616}; azimut=-176.886; id=57; side="EMPTY"; vehicle="USVehicleBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; }; class Item33 { position[]={1805.2317,157.29892,5043.9243}; azimut=-176.886; id=58; side="EMPTY"; vehicle="Barrel1"; leader=1; skill=0.2; description="Company CO. (Capt.)"; }; class Item34 { position[]={1752.7751,154.20047,5098.29}; azimut=-176.886; id=59; side="EMPTY"; vehicle="FlagCarrierUSA"; leader=1; skill=0.2; description="Company CO. (Capt.)"; synchronizations[]={21,22,23,24}; }; class Item35 { position[]={1803.653,157.0697,5067.229}; azimut=-176.886; id=60; side="EMPTY"; vehicle="FlagCarrierUSA"; leader=1; skill=0.2; description="Company CO. (Capt.)"; synchronizations[]={21,22,23,24}; }; class Item36 { position[]={1756.0786,154.47629,5048.3711}; azimut=25; id=61; side="EMPTY"; vehicle="MASH"; leader=1; skill=0.2; synchronizations[]={21,22,23,24}; }; class Item37 { position[]={1836.8599,160.13594,5109.1812}; azimut=330; id=62; side="EMPTY"; vehicle="HMMWV_Armored"; skill=0.60000002; init="xhandle = [this,120] execVM ""scripts\vehspawn.sqf"""; }; class Item38 { position[]={1813.0051,157.63266,5073.313}; azimut=160; id=64; side="EMPTY"; vehicle="LAV25_HQ"; skill=0.60000002; text="usmchq"; }; class Item39 { position[]={1746.912,153.34785,5086.292}; azimut=-176.886; id=65; side="EMPTY"; vehicle="USBasicWeaponsBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; }; class Item40 { position[]={1746.8079,153.33412,5085.3896}; azimut=-176.886; id=66; side="EMPTY"; vehicle="USBasicWeaponsBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; }; class Item41 { position[]={1746.6704,153.29854,5084.4121}; azimut=-176.886; id=67; side="EMPTY"; vehicle="USBasicWeaponsBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; }; class Item42 { position[]={1746.5675,153.24338,5083.3911}; azimut=-176.886; id=68; side="EMPTY"; vehicle="USBasicWeaponsBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; }; class Item43 { position[]={1746.4634,153.19398,5082.4888}; azimut=-176.886; id=69; side="EMPTY"; vehicle="USBasicWeaponsBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; }; class Item44 { position[]={1746.3259,153.13925,5081.5112}; azimut=-176.886; id=70; side="EMPTY"; vehicle="USBasicWeaponsBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; }; class Item45 { position[]={1746.7374,153.31589,5065.5259}; azimut=-176.886; id=71; side="EMPTY"; vehicle="USOrdnanceBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; }; class Item46 { position[]={1746.8306,153.32071,5064.5854}; azimut=-176.886; id=72; side="EMPTY"; vehicle="USOrdnanceBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; }; class Item47 { position[]={1745.9451,153.04776,5076.4736}; azimut=-176.886; id=73; side="EMPTY"; vehicle="USOrdnanceBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; }; class Item48 { position[]={1746.0382,153.09151,5075.5332}; azimut=-176.886; id=74; side="EMPTY"; vehicle="USOrdnanceBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; }; class Item49 { position[]={1746.209,153.08789,5080.5815}; azimut=-176.886; id=75; side="EMPTY"; vehicle="USBasicWeaponsBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; }; class Item50 { position[]={1746.1049,153.0385,5079.6792}; azimut=-176.886; id=76; side="EMPTY"; vehicle="USBasicWeaponsBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; }; class Item51 { position[]={1745.9674,153,5078.7017}; azimut=-176.886; id=77; side="EMPTY"; vehicle="USBasicWeaponsBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; }; class Item52 { position[]={1779.9692,155.71146,5068.7295}; azimut=90; id=78; side="EMPTY"; vehicle="CampEast"; leader=1; skill=0.2; }; class Item53 { position[]={1797.6384,156.75432,5071.6763}; id=79; side="EMPTY"; vehicle="CampEast"; leader=1; skill=0.2; }; class Item54 { position[]={1813.1709,157.64363,5073.4229}; special="FLY"; id=80; side="EMPTY"; vehicle="Land_CamoNetB_NATO"; leader=1; lock="LOCKED"; skill=0.2; }; class Item55 { position[]={2703.9058,198.69443,5169.0879}; special="FLY"; id=81; side="EMPTY"; vehicle="RoadBarrier_long"; leader=1; lock="LOCKED"; skill=0.2; }; class Item56 { position[]={1841.2017,160.68582,5110.8833}; azimut=330; id=82; side="EMPTY"; vehicle="HMMWV_Armored"; skill=0.60000002; init="xhandle = [this,120] execVM ""scripts\vehspawn.sqf"""; }; class Item57 { position[]={3727.5776,401.38086,6016.1689}; azimut=325; id=93; side="EMPTY"; vehicle="Land_CncBlock_Stripes"; skill=0.60000002; }; class Item58 { position[]={3724.3105,401.3548,6013.9121}; azimut=325; id=94; side="EMPTY"; vehicle="Land_CncBlock_Stripes"; skill=0.60000002; }; class Item59 { position[]={3733.6648,401.98389,6008.9775}; azimut=325; id=95; side="EMPTY"; vehicle="Land_CncBlock_Stripes"; skill=0.60000002; }; class Item60 { position[]={3730.3977,401.96631,6006.7207}; azimut=325; id=96; side="EMPTY"; vehicle="Land_CncBlock_Stripes"; skill=0.60000002; }; class Item61 { position[]={3721.1414,401.33173,6011.7271}; azimut=325; id=97; side="EMPTY"; vehicle="Land_CncBlock"; skill=0.60000002; }; class Item62 { position[]={3727.137,401.9455,6004.4897}; azimut=325; id=98; side="EMPTY"; vehicle="Land_CncBlock"; skill=0.60000002; }; class Item63 { position[]={3691.1763,405.26041,6004.6553}; azimut=145; id=99; side="EMPTY"; vehicle="76n6ClamShell"; skill=0.60000002; text="radar1"; }; class Item64 { position[]={3691.4958,405.2601,6004.5981}; azimut=55; id=100; side="EMPTY"; vehicle="Land_CamoNet_EAST"; skill=0.60000002; }; class Item65 { position[]={3701.3997,402,5984.2832}; azimut=190; id=103; side="EMPTY"; vehicle="KamazOpen"; leader=1; skill=0.60000002; }; class Item66 { position[]={3960.7266,375.27722,5821.3364}; azimut=40; id=104; side="EMPTY"; vehicle="Land_Ind_Timbers"; skill=0.60000002; }; class Item67 { position[]={3959.8184,373.78091,5806.561}; azimut=320; id=105; side="EMPTY"; vehicle="Land_GuardShed"; skill=0.60000002; }; class Item68 { position[]={6586.9561,362.79404,5339.9326}; azimut=120; special="FLY"; id=161; side="EMPTY"; vehicle="Land_CamoNetB_EAST"; leader=1; skill=0.2; }; class Item69 { position[]={6595.1982,362.98001,5323.7397}; azimut=120; special="FLY"; id=162; side="EMPTY"; vehicle="Land_CamoNetB_EAST"; leader=1; skill=0.2; }; class Item70 { position[]={6603.9995,362.76877,5307.48}; azimut=120; special="FLY"; id=163; side="EMPTY"; vehicle="Land_CamoNetB_EAST"; leader=1; skill=0.2; }; class Item71 { position[]={6595.1987,362.98001,5323.5898}; azimut=240; special="FLY"; id=164; side="EMPTY"; vehicle="GRAD_RU"; leader=1; skill=0.2; text="grad2"; }; class Item72 { position[]={6588.1133,362.81009,5339.2534}; azimut=240; special="FLY"; id=165; side="EMPTY"; vehicle="GRAD_RU"; leader=1; skill=0.2; text="grad1"; }; class Item73 { position[]={6603.8511,362.76575,5307.3301}; azimut=240; special="FLY"; id=166; side="EMPTY"; vehicle="GRAD_RU"; leader=1; skill=0.2; text="grad3"; }; class Item74 { position[]={5360.6143,335.246,8736.0059}; azimut=-176.886; special="FLY"; id=216; side="EMPTY"; vehicle="Land_tent_east"; skill=0.2; }; class Item75 { position[]={5358.9995,334.50113,8721.2031}; azimut=-176.886; special="FLY"; id=217; side="EMPTY"; vehicle="Land_tent_east"; skill=0.2; }; class Item76 { position[]={5376.793,334.28815,8726.291}; azimut=-176.886; special="FLY"; id=218; side="EMPTY"; vehicle="Misc_cargo_cont_net3"; skill=0.2; }; class Item77 { position[]={5367.9712,334.65759,8728.4902}; azimut=-176.886; special="FLY"; id=219; side="EMPTY"; vehicle="FlagCarrierRU"; skill=0.2; }; class Item78 { position[]={5371.5288,333.04794,8707.0762}; azimut=-176.886; special="FLY"; id=220; side="EMPTY"; vehicle="Land_CamoNetVar_EAST"; skill=0.2; }; class Item79 { position[]={5370.6479,332.41083,8697.6572}; azimut=-176.886; special="FLY"; id=221; side="EMPTY"; vehicle="Land_CamoNetVar_EAST"; skill=0.2; }; class Item80 { position[]={5369.6865,332.14691,8686.8613}; azimut=-176.886; special="FLY"; id=222; side="EMPTY"; vehicle="Land_CamoNetVar_EAST"; skill=0.2; }; class Item81 { position[]={5411.001,332.25119,8713.627}; azimut=-176.886; special="FLY"; id=223; side="EMPTY"; vehicle="Land_CamoNetB_EAST"; skill=0.2; text="hq1"; }; class Item82 { position[]={5411.3218,332.19278,8713.0928}; azimut=285; special="FLY"; id=224; side="EMPTY"; vehicle="BTR90_HQ"; skill=0.2; }; class Item83 { position[]={5371.646,333.03601,8706.9648}; azimut=280; special="FLY"; id=229; side="EMPTY"; vehicle="KamazReammo"; leader=1; skill=0.2; text="uti1"; }; class Item84 { position[]={5370.6533,332.40738,8697.5742}; azimut=280; special="FLY"; id=230; side="EMPTY"; vehicle="KamazRefuel"; leader=1; skill=0.2; text="uti2"; }; class Item85 { position[]={5369.3359,332.15375,8686.4941}; azimut=280; special="FLY"; id=231; side="EMPTY"; vehicle="KamazRepair"; leader=1; skill=0.2; text="uti3"; }; class Item86 { position[]={1749.0591,153.50352,5063.6025}; azimut=-176.886; id=275; side="EMPTY"; vehicle="USLaunchersBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; }; class Item87 { position[]={1749.0448,153.50261,5062.707}; azimut=-176.886; id=276; side="EMPTY"; vehicle="USLaunchersBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; }; class Item88 { position[]={1748.974,153.509,5061.791}; azimut=-176.886; id=277; side="EMPTY"; vehicle="USLaunchersBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; }; class Item89 { position[]={1748.9507,153.52002,5060.8984}; azimut=-176.886; id=278; side="EMPTY"; vehicle="USLaunchersBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; }; class Item90 { position[]={1748.8881,153.50987,5060.0435}; azimut=-176.886; id=279; side="EMPTY"; vehicle="USLaunchersBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; }; class Item91 { position[]={1746.7377,153.31683,5063.7402}; azimut=-176.886; id=280; side="EMPTY"; vehicle="USOrdnanceBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; }; class Item92 { position[]={1746.8308,153.31013,5062.7998}; azimut=-176.886; id=281; side="EMPTY"; vehicle="USOrdnanceBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; }; class Item93 { position[]={1746.7711,153.29424,5061.8545}; azimut=-176.886; id=282; side="EMPTY"; vehicle="USOrdnanceBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; }; class Item94 { position[]={1746.6959,153.28517,5060.8481}; azimut=-176.886; id=283; side="EMPTY"; vehicle="USOrdnanceBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; }; class Item95 { position[]={1748.7992,153.47643,5067.1895}; azimut=-176.886; id=284; side="EMPTY"; vehicle="SpecialWeaponsBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; }; class Item96 { position[]={1748.8923,153.48595,5066.249}; azimut=-176.886; id=285; side="EMPTY"; vehicle="SpecialWeaponsBox"; leader=1; skill=0.2; description="Company CO. (Capt.)"; }; class Item97 { position[]={2776.738,208.99937,5381.6611}; special="FLY"; id=286; side="EMPTY"; vehicle="RoadBarrier_long"; leader=1; lock="LOCKED"; skill=0.2; }; }; class Markers { items=12; class Item0 { position[]={1769.4276,155.42094,5100.5728}; name="respawn_west"; text="US Base"; type="mil_start"; colorName="ColorGreen"; }; class Item1 { position[]={1769.3527,155.38116,5098.5977}; name="respawn_west_2"; type="Empty"; a=0.0099999998; b=0.0099999998; }; class Item2 { position[]={4642.916,299.70776,5963.7754}; name="pogo1"; markerType="RECTANGLE"; type="Empty"; colorName="ColorRed"; fillName="BDiagonal"; a=555; b=555; }; class Item3 { position[]={3737.7729,402.15298,5959.6396}; name="metsa1"; markerType="ELLIPSE"; type="Empty"; colorName="ColorRed"; fillName="BDiagonal"; a=333; b=333; }; class Item4 { position[]={4601.583,291.91486,6076.5347}; name="obj2m"; text="Destroy Anti-Air"; type="mil_destroy"; }; class Item5 { position[]={3701.7,402,5992.6079}; name="obj1m"; text="Destroy AA Radar"; type="mil_destroy"; }; class Item6 { position[]={6525.2173,343.60605,5376.502}; name="forest1"; markerType="ELLIPSE"; type="Empty"; colorName="ColorRed"; fillName="BDiagonal"; a=666; b=666; }; class Item7 { position[]={6583.9258,362.6351,5319.6211}; name="obj3m"; text="Destroy Artillery Trucks"; type="mil_destroy"; }; class Item8 { position[]={3114.2488,299.082,7970.1504}; name="pusto1"; markerType="ELLIPSE"; type="Empty"; colorName="ColorRed"; fillName="BDiagonal"; a=444; b=444; }; class Item9 { position[]={3086.6985,298.98001,7992.7808}; name="obj4m"; text="Destroy Armors"; type="mil_destroy"; }; class Item10 { position[]={5386.9297,332.2413,8662.7461}; name="camp1"; markerType="ELLIPSE"; type="Empty"; colorName="ColorRed"; fillName="BDiagonal"; a=444; b=444; }; class Item11 { position[]={5375.6753,333.51373,8714.2617}; name="obj5m"; text="Destroy Camp"; type="mil_destroy"; }; }; class Sensors { items=9; class Item0 { position[]={1764.9492,183.21185,5401.7051}; 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 Item1 { position[]={1806.996,184.44475,5400.0283}; 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 Item2 { position[]={4595.6333,289.55884,6198.582}; a=99999; b=99999; activationBy="ANY"; timeoutMin=1; timeoutMid=1; timeoutMax=1; interruptable=1; type="SWITCH"; age="UNKNOWN"; expCond="this && not alive tungu1 && not alive tungu2"; expActiv="hint ""Anti-Air Destroyed""; obj2=true; deletemarker obj2m;"; class Effects { }; }; class Item3 { position[]={3856.5432,378.20474,6132.4385}; a=99999; b=99999; activationBy="ANY"; timeoutMin=1; timeoutMid=1; timeoutMax=1; interruptable=1; type="SWITCH"; age="UNKNOWN"; expCond="this && not alive radar1"; expActiv="hint ""AA Radar Destroyed""; obj1=true; deletemarker obj1m;"; class Effects { }; }; class Item4 { position[]={6443.1221,307.00778,5857.1772}; a=99999; b=99999; activationBy="ANY"; timeoutMin=1; timeoutMid=1; timeoutMax=1; interruptable=1; type="SWITCH"; age="UNKNOWN"; expCond="this && not alive grad1 && not alive grad2 && not alive grad3"; expActiv="hint ""Artillery Trucks Destroyed""; obj3=true; deletemarker obj3m;"; class Effects { }; }; class Item5 { position[]={3352.5237,297.14456,7955.7954}; a=99999; b=99999; activationBy="ANY"; timeoutMin=1; timeoutMid=1; timeoutMax=1; interruptable=1; type="SWITCH"; age="UNKNOWN"; expCond="this && not alive armor1 && not alive armor2 && not alive armor3 && not alive armor4"; expActiv="hint ""Enemy Armor Destroyed""; obj4=true; deletemarker obj4m;"; class Effects { }; }; class Item6 { position[]={5524.0146,322.74875,8613.1836}; a=99999; b=99999; activationBy="ANY"; timeoutMin=1; timeoutMid=1; timeoutMax=1; interruptable=1; type="SWITCH"; age="UNKNOWN"; expCond="this && not alive uti1 && not alive uti2 && not alive uti3 && not alive hq1 && not alive d30 && not alive d30_2 && not alive tank1 && not alive tank2 && not alive officer1"; expActiv="hint ""Enemy Camp Destroyed""; obj5=true; deletemarker obj5m;"; class Effects { }; }; class Item7 { position[]={1762.7985,186.90388,5428.8921}; 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"; expActiv="hint ""All objectives are succesfully completed. Well done!"""; class Effects { }; }; class Item8 { position[]={1807.7502,187.5256,5430.8677}; a=99999; b=99999; activationBy="ANY"; timeoutMin=8; timeoutMid=8; timeoutMax=8; interruptable=1; type="END1"; age="UNKNOWN"; expCond="this && obj1 && obj2 && obj3 && obj4 && obj5"; class Effects { }; }; }; }; class Intro { addOns[]= { "chernarus" }; addOnsAuto[]= { "chernarus" }; randomSeed=13548886; 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=15910530; 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=11493740; 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; ]D2h#h