Jump to content
xeno

co30 Domination! One Team

Recommended Posts

ok, need some help from the serious coders...

I'm still getting the JIP bug from this init.sqf:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">titleText ["", "BLACK FADED", 0.2];

X_INIT = false;

X_Server = false;

X_Client = false;

X_JIP = false;

X_SPE = false;

X_MP = (if (playersNumber east + playersNumber west + playersNumber resistance + playersNumber civilian > 0) then {true} else {false});

// Code checks if machine is server and for presence of players.

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;

};

};

setterraingrid 50;

// center position, name city, diameter for placing units

target_names = [[[9348.73,5923.4,0],"Cayo", 210],

[[10692.9,4953.4,0],"Iguana", 250],

[[7613.23,6424.32,0],"Arcadia", 235],

[[8241.74,9016.77,0],"Chantico", 200],

[[9170.43,8309.3,0],"Somato", 230],

[[10580.1,9430.44,0],"Paraiso", 300],

[[12399,7141.23,0],"Ortego",280],

[[11452,6075.97,0],"Dolores",300],

[[13351.8,8937.45,0],"Corazol",300],

[[14470,10773.5,0],"Obregan",240],

[[13172,11319.6,0],"Mercalillo",210],

[[14232.7,12525,0],"Bagango",230],

[[17291,14213.4,0],"Masbete",180],

[[19033.5,13814.3,0],"Pita",230],

[[12538.3,15004.2,0],"Eponia",210],

[[16595.8,9357.96,0],"Everon",200],

[[9773.03,14435.7,0],"Pacamac",150],

[[7771.72,15802.1,0],"Hunapu",150],

[[10592.5,16193.8,0],"Mataredo",150],

[[12426.8,13387.6,0],"Carmen",170],

[[2895.6,2890.64,0],"Rahmadi",180]

];

for "_xxxxx" from 2 to ((count target_names) + 1) do {

call compile format ["""%1"" objStatus ""HIDDEN"";", _xxxxx];

};

// Define sides

d_own_side = "WEST";

d_enemy_side = "EAST"; // This variable may be defunct as it was used to define d_side_enemy, which is now clearly defined

d_side_enemy = east;

d_side_player = west;

d_version = "NORMAL";

d_side_player_str = "west";

d_own_side_trigger = "west";

// true = you will see player markers right after mission start

// false = you have to manually turn on player markers via settings

d_show_player_marker = false;

// show old intro

d_old_intro = false;

// if true then the old engineer (faster) script gets used

d_engineer_old = false;

// next variables turns on/off some internal AI features

// maybe you are using a mod like ECS which allready has an enhanced AI system

// turn on/off Rommels suppression script (true = on)

d_suppression = true;

// turn on/off smoke, means enemy will throw smoke grenades if true

d_smoke = true;

// turn on/off internal group link system

d_link = true;

// if true, internal weather system will be used

d_weather = true;

// if true, fog area will be used

d_weather_fog = true;

d_weather_sandstorm = false; // for islands like Sakakah set to true. Replaces rain with sandstorm

// choose false, if you don't want to use the backpack feature

d_use_backpack = true;

// choose false, if you don't want to use teamstatusdialog

d_use_teamstatusdialog = true;

d_rep_truck = "Truck5tRepair";

d_version_string = "west";

//default flag RACS

FLAG_BASE setflagtexture "\ca\misc\data\usa_vlajka.pac";

d_engineer = "SoldierWMiner";

d_artillery = "OfficerW";

// can build mash

d_medic = ["SoldierWMedic"];

// if you want to use the mgnest for machinegunners

d_with_mgnest = true;

// can build mg nest

d_mg_gunner = ["SoldierWMG"];

if (d_with_mgnest) then {

d_mg_nest = "WarfareBWestMGNest_M240";

};

// Side missions

// each row of sm_positions array represents one sidemission

// first element of the array is allways the exact position of the sidemission and the position of the sidemission target

// see x_scripts\x_getsidemission.sqf for server sided stuff and x_scripts\x_getsidemissionclient.sqf for client stuff

// to see what a specific sidemission does, edit the file x_scripts\x_getsidemission.sqf and uncomment the line

// //current_mission_index = 43; Now you are able to start the script in the editor and select an index

sm_positions = [[[14258.5,15169.1,0]], // index: 0, radar tower on Pico de Perez

[[17763.2,12139.8,0], [17717.1,12040.1,0]], // index: 1, Officer, Tres Valles, second array = position Shilka

[[18074.1,18206.8,0], [18151.5,18216.1,0]], // index: 2, steal plane prototype, Antigua, second array position armor

[[14750.5,13925.6,0], [14750.4,13935.4,0], [14712.9,13992.4,0]], // index: 3, steal tank prototype, Alcazar, array 2 and 3 = infantry and armor positions

[[12104.7,17750,0], [12114.3,17739.1,0], [12110.8,17656.7,0]], // index: 4, Water tower (chemical weapons) Cabo Santa Lucia

[[10269.6,7353.71,0], [10268.4,7313.75,0]], // index: 5, King of Sedia at hotel in Vallejo

[[13938.3,16718.8,0], [13904.7,16694.1,0], [13836.9,16705.1,0]], // index: 6, Hangar at Roca del Dror

[[6400.09,7472.16,0], [6611.5,7652.1,0]], // index: 7, Training facility in San Peregrino

[[13113,16509.7,0]], // index: 8, Radio tower at Pico de Revolucion

[[19225.5,13889.3,0], [19231.1,13939,0], [19236.2,13992.5,0], [19198.6,13912.9,0]], // index: 9, Helicopter Prototype at Pita Airfield

[[11424.7,8573.97,0], [11354.3,8554.22,0]], // index: 10, Artillery at top of mount San Esteban

[[16582.7,4690.99,0], [16430.9,4617.28,0]], // index: 11, Lighthouse on Isla del Zorra

[[7844.54,9738.02,0], [7903.75,9624.79,0]], // index: 12, Officer in Cabo Canino, attention, uses nearestObject ID

[[11008.5,8028.66,0], [11016.7,7938.81,0]], // index: 13, Prime Minister, Valle Azul

[[15681.9,11384.6,0], [15851.6,11431.2,0]], // index: 14, Radio tower at Monte Liberacion

[[10838.5,12636.7,0], [10886.6,12722.2,0]], // index: 15, Transformer station in Tlaloc

[[6107.75,16944.8,0], [6305.86,17354.5,0]], // index: 16, Radio tower near Cabo Valiente

[[15318.3,9870.91,0], [15368.8,9875.38,0]], // index: 17, Officer in Valor

[[9709.64,11010.8,0], [9655.45,11026.4,0]], // index: 18, Government member visitin Rashidah shipyard

[[10131.6,8377.25,0], [10115.8,8420.6,0]], // index: 19, Prime minister of Tadistan in Pesto

[[17452.8,13577.6,0], [11851.9,14376.5,0]], // index: 20, Convoy Ixel to Tandag, start and end position

[[12723,8729.78,0], [6946.93,8226.66,0]], // index: 21, Convoy Corazol to Estrella, start and end position

[[7736.82,15810.5,0], [14293.2,9450.24,0]], // index: 22, Convoy Hunapu to Modesta, start and end position

[[10312.7,13407.5,0], [10202.5,13416.8,0], [10309.9,13471.5,0],[10433.7,13239.7,0],[10319.8,13444.5,0],[10284,13425.8,0],[10326.3,13397.6,0],[10335.9,13354.9,0]], // index: 23, Special forces boats in a bay near Pacamac

[[7767.34,7500.25,0]], // index: 24, Fuel station in camp near Arcadia

[[4726.85,15689,0],[4385.75,15825.4,0],[4415.64,15790.9,0],[4375.74,15790.8,0],[4392.87,15521.3,0],[4532.88,15304.8,0],[4585.08,15287.2,0],[4978.4,15466.1,0],[4855.92,15535.1,0],[4930.69,15514.1,0],[4956.34,15760.8,0],[4949.85,15827.9,0],[4964.33,16067,0],[4987.25,15717.1,0],[4395.8,15350.6,0], [4574.74,15374.2,0],[4368.82,15737,0],[5044.83,15799.3,0],[4860.15,15679.2,0]], // index: 25, enemy officer on Isla del Vasal or Isla del Vida

[[7743.49,14452.7,0],[7959.68,14514.2], [7774.97,14422.1,0],[7667,14409.6,0]], // index: 26, Hangar on Trelobada

[[12535.7,12699.6,0]], // index: 27, Radio tower at farm near Bagango

[[10245.7,15784.9,0],[10276.6,15813.6,0],[10269.1,15751,0],[10287.4,15719.9,0]], // index: 28, Radio Tower at bunker near Mataredo

[[8166.81,17018.4,0], [8130.84,17010.5,0],[8121.2,16991.2,0],[8140.73,17030,0],[8149.6,17049.7,0], [8162.93,16994.6,0],[8154.33,16974.8,0] ], // index: 29, Tank depot at Cabo Juventudo

[[18239,2943.84,0],[18186.4,3081.09,0]], // index: 30, scientist on Monte Asharah

[[17563.9,9550.78,0], [17589,9571.56,0], [17572.9,9567.49,0], [17529.4,9573.4,0], [17563.9,9533.05,0], [17527.6,9532.41,0], [17600.9,9551.71,0]], // index: 31, Tank depot near Everon

[[11359.1,5325.78,0], [11346.2,5357.91,0],[11249.9,5286.24,0],[11200.1,5182.9,0],[11287.7,5280.05,0],[11347.4,5312.99,0]], // index: 32, Capture the flag, Parato

[[11184.8,8849.94,0], [11138.7,8869.54,0], [11195.2,8820.68,0], [11203.6,8857.68,0],[11149.1,8791.9,0],[11158.3,8860,0]], // index: 33, Capture the flag, Bonanza

[[11388.3,9848.09,0]], // index: 34, Transformer station near Paraiso

[[12492,10849,0],[12500.9,10883.5,0]], // index: 35, Government member Isla de Libertad (attention, the AI is placed in a Lighthouse, uses nearestObject ID)

[[11919.6,15361.8,0], [11967.2,15314.4,0],[11841.5,15302.9,0],[11935,15480.1,0],[11950.3,15395.7,0],[11897.4,15424.6,0]], // index: 36, Capture the flag, Pesadas

[[11300.6,16870.3,0]], // index: 37, Prison, Isla de Victoria

[[13978.5,15741.7,0]], // index: 38, Biological weapons near Passo Epone

[[16197.8,10336.2,0]], // index: 39, Radio tower on top of Monte Valor

[[9379.85,5221,0]], // index: 40, Prison camp, Tiberia

[[11619.9,14336.6,0]], // index: 41, Prison camp, Tandag

[[9626.99,16344.6,0]], // index: 42, Officer in forrest Selva de Caza

[[11531.7,6113.28,0], [11387.1,6130.63,0], [11431.5,5966.3,0],[11665.7,6210.15,0]], // // index: 43, Dolores bridges... bridge 1, bridge 2, bridge 3

[[9529.46,3492.03,0], [9570.09,3566.11,0]], // index: 44, Steal chopper prototype on San Thomas

[[14206.3,12523.6,0]], // index: 45, Destroy bank building in Bagango, attention, uses nearestObject ID

[[10673.1,8980.08,0]], // index: 46, Destroy factory building in Paraiso, attention, uses nearestObject ID

[[8975.58,8437.76,0]], // index: 47, Destroy factory building in Somato, attention, uses nearestObject ID

[[12956.3,8638.32,0]], // index: 48, Transformer station Corazol, attention, uses nearestObject ID

[[16551.3,12925.3,0]], // index: 49, Officer near Benoma

[[16592.5,11844.6,0]] // index: 50, Artillery base

];

// to add bonus vehicles just add a new position and direction to sm_bonus_positions and a new vehicle to sm_bonus_vehicle_array

// the number of the elements in the sm_bonus_positions and sm_bonus_vehicle_array must be equal (you don't have to change a script)

if (isServer) then {

sm_bonus_positions = [

[[9804.41,9997.06,0], 0], // A10/Su34B Position and direction

[[9838.57,9997.0,0], 0], // AH1/KA50 Position and direction

[[9839.79,10055.9,0], 180], // AH6/Mi17 Position and direction

[[9767.19,9996.12,0], 0], // AV8B/Su34 Position and direction

[[9767.19,9996.12,0], 0], // AV8B2/Su34 Position and direction

[[9839.79,10055.9,0], 180], // UH60/Mi17 Position and direction

[[9559.23,9890.8,0], 270], // M1/T72 Position and direction

[[9573.58,9890.8,0], 270] // Vulcan/ZSU Position and direction

];

};

sm_bonus_vehicle_array = (

switch (d_own_side) do {

case "RACS": {["A10","AH1W","AH6_RACS","AV8B","AV8B2","UH60","T72_RACS","Vulcan_RACS"]};

case "WEST": {["A10","AH1W","AH6","AV8B","AV8B2", "UH60", "M1Abrams","Vulcan"]};

case "EAST": {["Su34B","KA50","Mi17","Su34","Su34","Mi17","T72","ZSU"]};

}

);

// main target missions

// to add bonus vehicles just add a new position and direction to mt_bonus_positions and a new vehicle to mt_bonus_vehicle_array

// the number of the elements in the mt_bonus_positions and mt_bonus_vehicle_array must be equal (you don't have to change a script)

if (isServer) then {

mt_bonus_positions = [

[[9559.23,9874.15,0], 270], // Stryker_ICV_M2/BMP2 Position and direction

[[9559.23,9859.23,0], 270], // Stryker_ICV_MK19/BRDM2 Position and direction

[[9513.53,9841.47,0], 90], // HMMWV50/UAZMG Position and direction

[[9513.53,9856.57,0], 90], // HMMWVMK/UAZ_AGS30 Position and direction

[[9513.53,9856.57,0], 90], // HMMWVTOW/BRDM2_ATGM Position and direction

[[9559.23,9874.15,0], 270], // Stryker_TOW/BMP2 Position and direction

[[9513.53,9841.47,0], 90] // M113/BRDM2 Position and direction

];

};

mt_bonus_vehicle_array = (

switch (d_own_side) do {

case "RACS": {["Stryker_ICV_M2","Stryker_ICV_MK19","HMMWV50","HMMWVMK","HMMWVTOW","Stryker_TOW","M113_RACS"]};

case "WEST": {["Stryker_ICV_M2","Stryker_ICV_MK19","HMMWV50","HMMWVMK","HMMWVTOW","Stryker_TOW","M113"]};

case "EAST": {["BMP2","BRDM2","UAZMG","UAZ_AGS30","BRDM2_ATGM","BMP2","BRDM2"]};

}

);

if (isServer) then {

// _E = East

// _W = West

// _G = Racs/Guer

// this is what gets spawned

d_sleader_E = "SquadLeaderE";

d_sleader_W = "SquadLeaderW";

d_sleader_G = "SquadLeaderG";

d_crewman_E = "SoldierECrew";

d_crewman2_E = "SoldierEB";

d_crewman_W = "SoldierWCrew";

d_crewman2_W = "SoldierWB";

d_crewman_G = "SoldierGCrew";

d_crewman2_G = "SoldierGB";

d_pilot_E = "SoldierEPilot";

d_pilot_W = "SoldierWPilot";

d_pilot_G = "SoldierGPilot";

d_allmen_E = ["SoldierEB","SoldierEMedic","SoldierEG","SoldierE","SoldierENOG","SoldierEMG","SoldierEAT","SoldierEAA","SoldierESniper","SoldierEMiner"];

d_allmen_W = ["SoldierWB","SoldierWMedic","SoldierWG","SoldierW","SoldierWNOG","SoldierWMG","SoldierWAT","SoldierWAA","SoldierWSniper","SoldierWMiner"];

d_allmen_G = ["SoldierGB","SoldierGMedic","SoldierGG","SoldierG","SoldierGNOG","SoldierGMG","SoldierGAT","SoldierGAA","SoldierGSniper","SoldierGMiner"];

d_specops_E = ["SoldierESaboteur","SoldierESaboteurPipe","SoldierESaboteurBizon","SoldierESaboteurMarksman"];

d_specops_W = ["SoldierWSaboteur","SoldierWSaboteurPipe","SoldierWSaboteurPipe2","SoldierWSaboteurRecon","SoldierWSaboteurAssault","SoldierWSaboteurMarksman"];

d_specops_G = ["SoldierGCommando","SoldierGMarksman","SoldierGGuard"];

d_sabotage_E = ["SoldierESaboteur","SoldierESaboteurPipe"];

d_sabotage_W = ["SoldierWSaboteur","SoldierWSaboteurPipe","SoldierWSaboteurPipe2"];

d_sabotage_G = ["SoldierGCommando"];

d_veh_a_E = ["T72","BMP2","BRDM2","ZSU","UAZMG","UAZ_AGS30","DSHKM","AGS","D30","UralRefuel","UralRepair","UralReammo"];

d_veh_a_W = ["M1Abrams","Stryker_ICV_M2","M113","Vulcan","HMMWV50","HMMWVMK","M2StaticMG","AGS","M119","Truck5tRefuel","Truck5tRepair","Truck5tReammo"];

d_veh_a_G = ["M1Abrams","M113_RACS","M113_RACS","Vulcan_RACS","LandroverMG","HMMWVMK"];

d_arti_observer_E = "TeamLeaderE";

d_arti_observer_W = "TeamLeaderW";

d_arti_observer_G = "TeamLeaderG";

// position, where the attack or ai choppers and planes get spawned (flying)

d_airki_start_positions = [

[1155.8,13968.2,0],

[24739.8,9568.23,0]

];

// type of enemy plane that will fly over the main target

d_airki_attack_plane = (

if (d_enemy_side == "EAST") then {

"Su34B"

} else {

"A10"

}

);

// type of enemy chopper that will fly over the main target

d_airki_attack_chopper = (

if (d_enemy_side == "EAST") then {

"KA50"

} else {

"AH1W"

}

);

// enemy parachute troops transport chopper

d_transport_chopper = (

if (d_enemy_side == "EAST") then {

"Mi17"

} else {

"UH60"

}

);

// convoy start position and direction

// convoy waypoints 1 and 2 (1 or 2 gets randomly selected)

d_sm_convoy = [

[

[17452.8,13577.6,0],0,

[[16963.1,14105.9,0], [15399.6,13744,0], [15135.7,14049.8,0], [13983.5,13168.2,0], [13824.8,13116,0] , [12563.6,13406.7,0], [12395.6,14494,0], [11851.9,14376.5,0]],

[[16962.4,14106.6,0],[15371.1,12698.4,0],[14602.8,11861.4,0],[14103.6,12405.2,0],[13082.1,11276.8,0],[10100,14120.9,0],[11851.9,14376.5,0]]

],

[

[12723,8729.78,0],20.4149,

[[12737.5,8787.06,0], [10947.4,10623.1,0], [9614.35,11036.2,0], [8671.46,10084.4,0], [7618.55,9048.34,0], [7766.26,8822.9,0], [6946.93,8226.66,0]],

[[12737.5,8787.4,0],[10947.2,10623.3,0],[10517.3,9640.52,0],[10147.1,9317.35,0],[8952.3,8345.36,0],[8038.49,8893.38,0],[6946.93,8226.66,0]]

],

[

[8048.9,15783.5,0],101.542,

[[10100.4,14120.8,0],[10951.5,12658.1,0],[13082,11276,0],[13979.9,9841.15,0],[13816.5,9469.06,0],[14293.2,9450.24,0]],

[[10100.4,14120.8,0],[12394.8,14494.2,0],[12562.7,13406.4,0],[14124.8,12507.3,0],[13082,11276,0],[13979.9,9841.15,0],[13816.5,9469.06,0],[14293.2,9450.24,0]]

]

];

// these vehicles get spawned in a convoy sidemission (domination internal names)

d_sm_convoy_vehicles = (

switch (d_enemy_side) do {

case "EAST": {["BRDM2","BMP2", "ZSU", "UralRepair", "UralRefuel", "UralReammo", "T72"]};

case "WEST": {["Stryker_ICV_M2","M113", "Vulcan", "Truck5tRepair", "Truck5tRefuel", "Truck5tReammo", "M1Abrams"]};

}

);

// start positions of the choppers that will parachute new paratroopers over the main target (randomly chosen)

d_para_start_positions = [

[236.8,13889.7,0],

[812.8,9521.73,0],

[8172.8,865.727,0]

];

// end or delete positions of the choppers that will parachute new paratroopers over the main target (randomly chosen)

d_para_end_positions = [

[19500.8,6497.73,0],

[18956.8,17329.7,0],

[10476.8,20081.7,0]

];

// positions of the tanks in the sidemissions, where you have to destroy tanks

d_sm_tanks_dir_array = [

[114.952,114.952,114.952,114.952,292.444,292.444],

[178.861, 178.861, 178.861, 0, 0, 273.398]

];

// enemy ai skill: [base skill, random value (random 0.2) that gets added to the base skill]

d_skill_array = [0.3,0.2];

// Type of aircraft, that will air drop stuff

x_drop_aircraft = "UH60";

// max men for main target clear

d_man_count_for_target_clear = 6;

// max tanks for main target clear

d_tank_count_for_target_clear = 0;

// max cars for main target clear

d_car_count_for_target_clear = 0;

};

x_drop_array = (

switch (d_own_side) do {

case "RACS": {[["Drop Artillery", "M119"], ["Drop Landrover","Landrover_Closed"], ["Drop Ammo", "SpecialBoxGuer"]]};

case "WEST": {[["Drop Artillery", "M119"], ["Drop Humvee","HMMWV50"], ["Drop Ammo", "SpecialBoxWest"]]};

case "EAST": {[["Drop Artillery", "D30"], ["Drop Uaz","UAZ"], ["Drop Ammo", "SpecialBoxEast"]]};

}

);

// side of the pilot that will fly the drop air vehicle

x_drop_side = d_own_side;

// position of the player ammobox at base (created only on the players computer, refilled every 20 minutes)

d_player_ammobox_pos = [9659.13,9985.81,0];

// position base, a,b, for the enemy at base trigger and marker

d_base_array = [[9821.47,9971.04,0], 600, 200];

// this vehicle will be created if you use the "Create XXX" at a mobile respawn (old "Create Motorcycle")

d_create_bike = "M1030";

// vehicle reload time factor (for the chopper and plane service area).

x_reload_time_factor = 4;

// vehicle reload... turn engine off (false = don't turn engine off)

d_reload_engineoff = true;

// these vehicles can be lifted by the wreck lift chopper (previous chopper 4), but only, if they are completely destroyed

x_heli_wreck_lift_types = sm_bonus_vehicle_array + mt_bonus_vehicle_array;

if (X_SPE) then {

number_targets = count target_names;

} else {

number_targets = Param1;

};

skiptime param2;

current_target_index = -1;

number_side_missions = count sm_positions;

side_missions_random = [];

current_mission_index = -1;

current_mission_resolved_text = "";

side_mission_winner = 0;

side_mission_resolved_client = false;

resolved_targets = [];

update_target=false;

target_clear=false;

update_mission=false;

all_missions_resolved = false;

ammo_boxes = 0;

max_number_ammoboxes = 20;

the_end = false;

bonus_number = -1;

extra_bonus_number = -1;

mr1_in_air = false;

mr2_in_air = false;

sec_kind = 0;

sec_solved = "";

ari_available = true;

ari_type = "";

splashdown = "";

ari1 = 0;

ari2_available = true;

ari2_type = "";

splashdown2 = "";

announce_counterattack = "";

tele_array = [];

client_target_counter = 0;

current_mission_text = "Currently no side mission!";

vehicle_attached_list = [];

player_is_driver = false;

vec2_id = -1000;

vec_id = -1000;

sec_target_name = "";

actionID1 = -1;

actionID2 = -1;

objectID1 = objNull;

objectID2 = objNull;

rep_array = [];

new_jump_flag = objNull;

jump_flags = [];

weapon_array = [];

date_str = "";

ass = -1;

mr1_lift_chopper = objNull;

mr2_lift_chopper = objNull;

last_ammo_drop = -3423;

bike_created = false;

o_arti = [];

// static truck load

truck1_cargo_array = [];

truck2_cargo_array = [];

max_truck_cargo = 6;

current_truck_cargo_array = 0;

cargo_selected_index = -1;

currently_loading = false;

main_target_radiotower_pos = [0,0,0];

main_target_radiotower_down = false;

pbp_id = -1;

Observer1 = objNull;

Observer2 = objNull;

Observer3 = objNull;

d_create_box = [];

// you have to set respawndelay in the description.ext file to the same value

// for the revive version you have to set respawndelay in the description.ext to value 2 (respawndelay=20;=2;}

d_respawn_delay = 20;

// if you set d_with_respawn_dialog_after_death = false then you will respawn at your base, if true you'll see the respawn dialog allways if you die

d_with_respawn_dialog_after_death = true;

// for markers and revive (same like NORRN_player_units)

d_player_entities = ["RESCUE","RESCUE2","alpha_1","alpha_2","alpha_3","alpha_4","alpha_5","alpha_6","alpha_7","alpha_8","bravo_1","bravo_2","bravo_3","bravo_4","bravo_5","bravo_6","bravo_7","bravo_8","charlie_1","charlie_2","charlie_3","charlie_4","charlie_5","charlie_6","charlie_7","charlie_8","delta_1","delta_2","delta_3","delta_4"];

// This variable set to true for domination modes other than revive

x_weapon_respawn = true;

// Vars_array is the list passed to clients

vars_array = [];

if (isServer) then {

call compile preprocessFile "x_scripts\x_initx.sqf"; //server side code only, terminates by setting x_inited to true

waitUntil {x_inited};

if (d_weather) then {

[] execVM "scripts\weather\weathergen2.sqf";

};

// create random list of targets

targets_random = [];

for "_i" from 1 to number_targets do {

_ind = floor random (count target_names);

while {_ind in targets_random} do {_ind = floor random (count target_names);};

targets_random = targets_random + [_ind];

};

// create random list of side missions

for "_i" from 1 to number_side_missions do {

_ind = floor random number_side_missions;

while {_ind in side_missions_random} do {_ind = floor random number_side_missions;};

side_missions_random = side_missions_random + [_ind];

};

current_counter = 0;

current_mission_counter = 0;

side_mission_resolved = true;

counterattack = false;

extra_mission_remover_array = [];

extra_mission_vehicle_remover_array = [];

check_trigger = objNull;

xlink_running = false;

create_new_paras = false;

first_time_after_start = true;

nr_observers = 0;

//******************************************************************************************

**********************************

//***** Vehicle Respawn - Name of vehicle in Editor, Empty/Wrecked Delay, (numbered heli specific)/(base truck specific) *****

//******************************************************************************************

**********************************

x_helirespawn = compile preprocessFile "x_scripts\x_helirespawn.sqf";

x_vrespawn = compile preprocessFile "x_scripts\x_vrespawn.sqf";

x_vehirespawn = compile preprocessFile "x_scripts\x_vehirespawn.sqf";

[ch1,240,1,true] spawn x_helirespawn;

[ch2,240,2,true] spawn x_helirespawn;

[ch3,240,3,false] spawn x_helirespawn;

[ch4,240,4,false] spawn x_helirespawn;

[xvec1,240,1,"MR"] spawn x_vrespawn;

[xvec2,240,2,"MR"] spawn x_vrespawn;

[xvec3,240,1,"TR"] spawn x_vrespawn;

[xvec4,240,2,"TR"] spawn x_vrespawn;

[xvec5,240,3,"TR"] spawn x_vrespawn;

[xvec6,240,7,"TTR"] spawn x_vrespawn;

[xvec7,240,6,"TR"] spawn x_vrespawn;

[xvec8,240,5,"TR"] spawn x_vrespawn;

[xvec9,240,4,"TR"] spawn x_vrespawn;

[xvec10,240,8,"TTR"] spawn x_vrespawn;

[xmedvec,240,0,"MV"] spawn x_vrespawn;

[boat1,240] spawn x_vehirespawn;

[boat2,240] spawn x_vehirespawn;

[boat3,240] spawn x_vehirespawn;

[boat4,240] spawn x_vehirespawn;

[boat5,240] spawn x_vehirespawn;

[boat6,240] spawn x_vehirespawn;

[boat7,240] spawn x_vehirespawn;

[boat8,240] spawn x_vehirespawn;

[boat9,240] spawn x_vehirespawn;

[boat10,240] spawn x_vehirespawn;

[boat11,240] spawn x_vehirespawn;

[boat12,240] spawn x_vehirespawn;

[boat13,240] spawn x_vehirespawn;

[boat14,240] spawn x_vehirespawn;

[boat15,240] spawn x_vehirespawn;

[boat16,240] spawn x_vehirespawn;

[boat17,240] spawn x_vehirespawn;

[boat18,240] spawn x_vehirespawn;

[boat19,240] spawn x_vehirespawn;

[boat20,240] spawn x_vehirespawn;

[boat21,240] spawn x_vehirespawn;

[boat22,240] spawn x_vehirespawn;

[boat23,240] spawn x_vehirespawn;

[boat24,240] spawn x_vehirespawn;

[boat25,240] spawn x_vehirespawn;

[boat26,240] spawn x_vehirespawn;

[boat27,240] spawn x_vehirespawn;

[boat28,240] spawn x_vehirespawn;

[d_wreck_rep,"Wreck Repair Point",x_heli_wreck_lift_types] execVM "x_scripts\x_repwreck.sqf";

d_check_boxes = [];

no_more_observers = false;

main_target_ready = false;

[] execVM "x_scripts\x_setupserver.sqf";

[] execVM "x_scripts\x_infiltrate.sqf";

[] execVM "x_scripts\x_createnexttarget.sqf";

onPlayerConnected "[] exec ""x_scripts\x_serverOPC.sqf"""; // This script fills vars_array from variables and makes array public

if (d_version == "AI") then {

server_grp_array = [];

onPlayerDisconnected "xhandle=[_name] execVM ""x_scripts\x_serverOPDC.sqf""";

};

};

//X_INIT should always be true at this point

waitUntil {X_INIT};

//************************************

//***** Prepare to be dazzled... *****

//************************************

[]execVM "TurokGMT_Scripts\TurokGMTSERVERONLY.sqf";

if (!X_Client) exitWith {};

//******************************************************************************************

****

//***** X_Client will be set to true at start of init.sqf if client is running the script. *****

//***** Server will therefore exit init.sqf at this point *****

//***** All code beyond this point is client side only *****

//******************************************************************************************

****

// here you can change what chopper 1 - 3 can lift

// default is, all choppers can lift the same vehicles

d_helilift1_types = ["M113_MHQ","M113Ambul","M113AmbulRacs","Truck5tRepair","Truck5tRefuel","Truck5tReammo","Truck5tOpen","Truck5tMG","BMP2","Stryker_ICV_M2","Stryker_ICV_MK19","HMMWV50","HMMWVMK","UAZ_AGS30","D30","UAZMG","Stryker_TOW","HMMWVTOW","M113_RACS","BRDM2","BRDM2_ATGM","Vulcan_RACS","Vulcan"];

d_helilift2_types = []; //Heli 2 and 3 now altered to littlebirds - no need for underslung equipment!

d_helilift3_types = [];

ts_vec_id = -1;

ts_nearest = objNull;

ts_id = -1;

player_backpack = [];

prim_weap_player = "";

x_weapon_array = [];

waitUntil {count vars_array > 0}; //eg x_serverOPC.sqf has terminated successfully

//*********************************************************

//***** FOLLOWING LINES EXTRACTED FROM VARIABLE ARRAY *****

//*********************************************************

date_str = vars_array select 0;

current_target_index = vars_array select 1;

current_mission_index = vars_array select 2;

main_target_radiotower_down = vars_array select 3;

target_clear = vars_array select 4;

all_missions_resolved = vars_array select 5;

ammo_boxes = vars_array select 6;

the_end = vars_array select 7;

mr1_in_air = vars_array select 8;

mr2_in_air = vars_array select 9;

sec_kind = vars_array select 10;

ari_available = vars_array select 11;

ari2_available = vars_array select 12;

resolved_targets = vars_array select 13;

side_missions_random = vars_array select 14;

jump_flags = vars_array select 15;

truck1_cargo_array = vars_array select 16;

truck2_cargo_array = vars_array select 17;

main_target_radiotower_pos = vars_array select 18;

Observer1 = vars_array select 19;

Observer2 = vars_array select 20;

Observer3 = vars_array select 21;

client_target_counter = count resolved_targets;

//**************************************

//***** Again with the dazzling... *****

//**************************************

[]execVM "TurokGMT_Scripts\TurokGMTCLIENTONLY.sqf";

if (true) exitWith {};

I've managed to revreate the JIP bug as indicated earlier on this thread, but can't seem to find a way round it. I've left excution of my scripts until after all the domination code (see comments in code) but it's still occuring. Any ideas guys?

Share this post


Link to post
Share on other sites

***** NEW VERSION OF TUROKGMT EDIT RELEASED!! *****

Current version is now v0.5

major changes:

- JIP bug fixed!

- HUGE change for how I've implemented my code changes from vanilla domination - now just 3 new scripts

- some mando variables tweaked to tone down air support overkill

File link:

http://files.filefront.com/Dominat....fo.html

All feedback and testing welcome!

Share this post


Link to post
Share on other sites

Hello,

I had an odd thing happen last night whilst playing Domination 3.02. I had taken a 5tMG truck to an area just outside the target area. I left the truck for awhile, then came back to it. I got in the gunner's position. I looked at the gear available, then I hit close.

Then I died.

It said I was killed by friendly fire, but the only other blufor on the entire map was back at the base. I paradropped into the same location, and the 5t truck was gone. No wreck or anything. Just gone.

The only thing I could deduce was that maybe it had despawned when I was in it, and it counted me as a casualty.

Any other ideas? smile_o.gif

(Oh, and when I take down an enemy helo with the M-136, I don't think I get credit for it. But, I may have just damaged them.)

Thanks for all the work on this - it is MUCH fun!

Share this post


Link to post
Share on other sites

New version 3.03 available...

Changelog:

Quote[/b] ]

- added a new script that returns the weapons back to the player if he looses them in the water

- added air defense that gets randomly spawned on the island

- added illumination over the main target at night

- it is now possible to limit the weapons that a player will find in an ammocrate (init.sqf d_limit_weapons, depends on the type that the player is)

- added d_drop_ammobox_time to init.sqf

- fixed air drop of static weapons like M119 or D30

- player markers can now be completely turned off (d_dont_show_player_markers_at_all)

- changed markers (each player group has a different color) and vehicle markers are now arrows that show the direction of the vehicle too

- some small internal bug fixes

- some more things that I've allready forgotten (man, I'm getting old)

As a bonus the mission pack includes two new missions:

co30 Domination! One Team West,  Schmalfelden Edition

and

co25 Sahrani Battle v3

Sahrani Battle is a mission for you flyboys out there. It's based on Domination but you have to clear the islands with A10s, Harriers and Cobras.

A small team of specops can help you to light targets with laser designators. The specops team can parajump to the target area.

Planes can get reloaded by flying 50-300 m over the runway with a speed < 250 km/h.

It's a nice mission to improve your flying skills... But be aware, the enemy has a strong aa defense.

Download:

Domination! One Team 3.03 Mission Pack

Enjoy !

Xeno

Share this post


Link to post
Share on other sites

flyboy here - thanks Xeno xmas_o.gif

Share this post


Link to post
Share on other sites

More excellent work from the xeno stables!

Looking forward to tinkering with the schmalfelden version too - finally, a good excuse to learn a new map!

Share this post


Link to post
Share on other sites
***** NEW VERSION OF TUROKGMT EDIT RELEASED!! *****

Thanks Xeno and Turok!

I can't wait to see check out the new changes.. and see if we can do a quick merge into Turok's variant.

To all those doing these kind of modifications of differing code, there is a great program called WinMerge. It is open source, free and very nice!

WinMerge Page

I use it to make custom versions of these missions, along with the merging of code when Xeno releases updates. It is invaluable when working with others code.

Share this post


Link to post
Share on other sites

I've already ported over the existing features into domination 3.03 - xeno's code is very plug n play friendly, even for an amatuer code monkey like myself, especially with the new approach I took for v0.5 - hardly any of xeno's scripts needing editing anymore.

I'm currently working on adding some new features before releasing v0.6 of my edit rather than swamping the public with all these releases!

Feel free to add any further ideas on the thread for my version that I've started up - link in my sig.

Share this post


Link to post
Share on other sites

I've merged Turoks changes into Domination West 3.03 (sorry Turok smile_o.gif, I didn't use your scripts but added everything to the correct Domination scripts)

Available now is Domination West 3.03 and Sahrani Battle v3 with Mando missiles.

The mission pack is allready updated.

Download:

Domination! One Team 3.03 Mission Pack

If you don't want to download the complete mission pack again, you can download the two missions here:

Domination West 3.0 Mando and Sahrani Battle v3 Mando

Enjoy!

Xeno

Share this post


Link to post
Share on other sites

No problems here xeno!

I'm still continuing to tinker with bits and pieces for domination, so your new release will provide an excellent new starting platform for further additional changes.

Thanks for hard-coding my alterations in, 'tis truly an honour to have contributed!

EDIT - just did a quick editor test...which units have access to the air support console? In my edit, the action is assigned to drivers of the MHQ - who has it in your version? I can't find it!

EDIT - nevermind - figured I couldn't test it in editor as it's client side only, not player-server wink_o.gif Found it. All my changes appear implemented fine.

Share this post


Link to post
Share on other sites

Looking forward to testing it, especially the Schmalfelden version. I still haven't had any luck with the JIP bug in my own version, maybe I'll incorporate my changes (again!wink_o.gif into the latest - sigh - WHAT a job...  rofl.gif

A quick idea, since you're already on my track regarding the ammo limitation setting: Would it be easy to set this up so that limitations are not enforced until there is a certain amount of players available?

I have also put in a switch (typeOf _vehicle) in the ammo drop scripts, as different vehicles will hold different types and amounts of ammo. I.e. the assault squads M113 will drop ammo crates with more M136 ammo than the support squads MHQ which will have Javelin instead (support/supression supposed to be more distant from the front).

As for markers, I'm using colorcoded as well regarding which squad; yellow for assault, blue and green for support, black for blackops, and white for rescue operators. On my deployed AT and AA statics (only dedicated personell can do this from their special vehicle), I'm using the new Defend marker to show the position. The deployed MG nest (only machinegunners) gets the new Goto (?) marker, with the arrow pointing in the weapons direction. Also these are colorcoded. However, these are not synched on JIP, they are only created and deleted. Maybe I will put these together with the rest of the vehiclemarkers; move off map while not deployed. I don't use names on markers, only small role indicators, as names can look horrific on screen. Man down has been replaced with a red cross instead of blue flag, and revive doesn't overwrite certain vehicle colors anymore. I haven't been able to find out what is causing the MHQs markers to flicker yet. Using arrows was a great idea, nice for squad leaders and team leaders to follow up what is being done without noising up teamspeak. Vehicles typically now use the new warfare markers to indicate role, also color coded to squad.

Base area has also been updated, with a couple of basic MG nests for basic protection against airdrops. Also, you will now spawn inside a tent (barracks) avoiding AI spawn killers biggrin_o.gif The repairing areas is now lit at night, and is accompanied with a good looking warfare "factory". A couple of east tents with red night light for that extra mood tounge2.gif

I've included my own enemy artillery script, which will fire more frequently and also use DPICM (a bitch, believe me biggrin_o.gif), but increased survivability is possible since they tend to use spot rounds for destructive rounds (watch for red smoke or a single very random HE round). At night they will tactically deploy illumination *behind* their own forces, and a 3 piece flare is used on each point. If you are close enough, you WILL get blinded with this. NVGs are impossible to use due to the strong light. If you're too close to the enemy, they will use smoke instead. They will also combine rounds, i.e. a spotround combined with illumination, followed by regular rounds. It is not based on the observers knowsAbout value anymore, but it requires them to be alive. Apart from a very lucky HE spotround, it is now fully possible to survive an enemy artillery round. I think this adds a bit of tension and desire to get up close and personal to avoid being shelled with arty. Even though, yes I agree, it's not fully realistic.

Side missions has been toned down quite a bit in difficulty, should be possible to execute with 4-6 guys if played right - good for starting up the server. But I think I'll exchange the rewards so that side missions only get small rewards. The massive efforts needed for the main targets will get the big guns out. Then do static rewards for Main Target secondaries.

Every single class used now have special abilities, I'll try to list them here:

Officers - Rescue and artillery operators.

Squad Leaders - Call in air drops.

Team Leaders (M203) - Repair GL based statics.

Automatic Riflemen - Repair machinegun based statics.

Machineguinners - Ditto, but also build MG nest.

AT Specialists - Repair tube based statics (AA/AT). Access to all kinds to tube weapons, but limited.

Engineers - Repair/Refuel/Rearm all. Build sandbags for cover.

Medics - Build MASH.

Javelin Specialist - Deploy static AT from dedicated vehicle.

Stinger Specialist - Deploy static AA from dedicated vehicle.

Saboteurs - Climb fences, have a backpack.

Sniper - Call in heavy M198 artillery support (not in yet).

Spotter - Has the only laser designator, needed for copperheads.

The teams, tasks, and vehicles are still as before. One assault squad with only an M113 assigned. Two support squads with salvage trucks (engineer tasks), MHQ, Medevac M113, and UH60 chopper. And one Delta Blackops squad to be quick on the scene, which has the AT and AA vehicles as well as an MH6 chopper. These are sniper and spotter to recon the area, with two saboteurs to create a lane of entry if needed or create explosive diversions. The rest could spend some time on logistics and getting the vehicles out while recon in progress. AA and AT heavy specialists can either get their cars out, or join the MH6 which can also drop crates which have a few Javelins and Stingers available.

Although I'm a sucker for roleplay, and try to enforce this by limited weapons access to each role, I'm also allowing a slight cheat by putting i.e. a M136 tube in the AT specialists weapons crate. So if they "agree" on cheating, they can drop one M136 to whoever wants it. So even "cheating" requires a bit of teamplay biggrin_o.gif Ammo will be sparse anyway, to encourage Javelin for heavy armor.

Many ECS specific parameters has been put in, such as enabling bleeding effects while disabling first aid - revive based first aid has been chosen instead. Supressive fires, weapon jams frequencies, smoke and flare usage etc. I'm considering starting with damage (and bleeding) upon revival, requireing pathing up without using the revive heal action to stop it. Weather parameters are also being set randomly, but I need to hack the status dialog to display the current weather information.

Another option I'm looking into, is the ability for squad leaders to remotely lock and unlock squad vehicles, and for team leaders to unlock (not remotely) any vehicles. However, if a squad leader disconnects, I need to automatically unlock his squads vehicles (based on player slot, not group). Rescue operators might be able to remotely unlock all vehicles in case of bug smile_o.gif

I'm also considering a 10 man assault squad (now 6), using USMC based units (Delta Blackops are also based on these). Squad Leader and Corpseman in the back, with two 4 man fireteams up front.

Rescue controls Alpha Assault and Delta Blackops, which would look good in the same uniform. He is supposed to lead the operations at hand.

Rescue2 controls Bravo and Charlie Support, which has also same uniform. He is more in charge of logistics and plan for the next mission.

Upon starting the mission, a hintC is displayed for each player/role, informing how the role was "intented" to play out.

Also changed the mission ending. Added a killed eventhandler on players that puts a cross up not far from the base. Type of cross depends on the role. At mission end, I zoom out from this area instead, playing the Semper Fidelis theme - a final brief on how well the mission was played - there SHOULD be few crosses with helmets (officers and squad leaders) there nener.gif

Number of revives should be a factor of number of main missions left to do, and easy to adjust as a preference at least in init.sqf.

Yes, I'm writing this also as a note-to-self, as a reference biggrin_o.gif

Share this post


Link to post
Share on other sites

Bloody hell mate, impressive stuff!

My only concern is that with all the class specific abilities, low player servers will suffer from not gaining the best from your excellent ideas. Your overhauls sound excellent for clan matches though.

As for your question about only including weapon restrictions once a certain number of players rock up - why not extend it so that class-based abilities are affected in a similar fashion as well?

All you'd need is a variable that counts the number of players present:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

if (number of players > enough to make it fun) then {

d_limit_ammo_by_class = true; // or whatever name xeno's called it

c_my_diferent_ammo_boxes_from_different_vehicles_thing = true;

d_engineer = [array of engineer class soldiers];

d_medic = [array of medics];

d_my_mama_thinks_I'm_special = [cuz I do this job];

etc...

};

all it would take would be a little rearranging of when variables get defined in init.sqf and slap the lot into a huge if check - xeno's already defined all the scripts for class based differentiation, you just tell it to not kick in until there's enough players.

All I'd give is a caution though, that the number of servers likely to be running it will be inversely proportional to the amount of brain cells killed in reading the fucking manual...there's a reason why Evolution got popular - it was quick to get into, understand and play and could be played on a casual basis.

Put simply - the bastards don't appreciate all the hard work unless it they can make it all happen in a single mouse click wink_o.gif

I'll certainly be up for a guided tour once you get to the playtesting stage though wink_o.gif

Share this post


Link to post
Share on other sites

Hi.

I'm trying to modify the mission to use some of our dedi server addons, and to that point that is ok.

However, we have the L16A2 mortar addon and I have tried to use it with moderate success.

I have replicated the MG nest scripts to accomodate them for the mortar, having the granadier now the ability to deploy mortars and remove them. Everything is ok, I can deploy the mortar and remove it, but if I die I lose the ability.

Can somebody tell me what I am missing? I think I've gone through all the scripts, and I think I have copy the mortar modification along in any scripts that referenced the mg nest, but I still can get the ability back after respawn.

Let me explain what I've done(using latest version with mando missiles and bombs)

In the init.sqf file I have added this bit just after the mg nest(around line 198)

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">// if you want to use the mortars for granadiers

d_with_mortar = true;

// can build mortar

d_mg_mortarOp = (

switch (d_own_side) do {

case "RACS": {["SoldierGG"]};

case "EAST": {["SoldierEG"]};

case "WEST": {["SoldierWG"]};

}

);

if (d_with_mortar) then {

d_mg_mortar = (

switch (d_own_side) do {

case "RACS": {"llw_l16"};

case "EAST": {"llw_l16"};

case "WEST": {"llw_l16"};

}

);

};

I have created two new script copiying the mg nests ones

first, to deploy the mortar, called x_mortarDep.sqf(use the x to keep everything tidy)

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

private ["_dir_to_set","_m_name","_marker"];

if (count d_mortar_pos > 0) exitWith {

Server globalChat "You have already deployed a mortar. You have to remove it to deploy a new one.";

};

d_mortar_pos = player modeltoworld [0,2,0];

player playMove "AinvPknlMstpSlayWrflDnon_medic";

sleep 3;

WaitUntil {animationState player != "AinvPknlMstpSlayWrflDnon_medic"};

if (!(alive player)) exitWith {

d_mortar_pos = [];

Server globalChat "You died before your mortar was ready.";

};

_dir_to_set = getdir player;

mg_mortar = d_mg_mortar createvehicle d_mortar_pos;

mg_mortar setdir _dir_to_set;

Server globalChat "Mortar ready.";

_m_name = format ["Mortar %1", name player];

_marker = createMarker [_m_name, d_mortar_pos];

_m_name setMarkerShape "ICON";

_m_name setMarkerColor "ColorBlue";

_m_name setMarkerSize [0.5,0.5];

_m_name setMarkerType "Dot";

_m_name setMarkerText _m_name;

mg_mortar addAction ["Remove Mortar", "x_scripts\x_removeMortar.sqf"];

mg_mortar addEventHandler ["killed",{[_this select 0] spawn XMGMortarKilled;}];

player moveInGunner mg_mortar;

if (true) exitWith {};

then another script to remove the mortar called x_removeMortar.sqf

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">private ["_m_name"];

if (vehicle player == mg_mortar) exitWith {

Server globalChat "You have to get out of the mortar before you can remove it.";

};

player playMove "AinvPknlMstpSlayWrflDnon_medic";

sleep 3;

WaitUntil {animationState player != "AinvPknlMstpSlayWrflDnon_medic"};

if (!(alive player)) exitWith {

Server globalChat "You died before you could remove your mortar.";

};

deleteVehicle mg_mortar;

Server globalChat "Mortar removed.";

d_mortar_pos = [];

_m_name = format ["Mortar %1", name player];

deleteMarker _m_name;

if (true) exitWith {};

Then I've added this to the x_playerfuncs.sqf file

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

if ((typeOf player) in d_mg_mortarOp) then {

XMGMortarKilled = {

private ["_mgmortar","_m_name"];

_mgmortar = _this select 0;

_m_name = format ["Mortar %1", name player];

deleteMarker _m_name;

d_mgnest_pos = [];

Server globalChat "Your Mortar was destroyed !!!";

sleep 25.21;

if (!(isNull _mgmortar)) then {

deleteVehicle _mgmortar;

};

};

};

and this bit to the x_checkkill.sqf

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

if (d_with_mortar) then {

if ((typeOf player) in d_mg_mortarOp) then {

_killed removeAction mortaraction;

};

};

and to the x_setupplayer I added this

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">//for mortar

if (d_with_mortar) then {

if ((typeOf player) in d_mg_mortarOp) then {

d_mortar_pos = [];

mortaraction = _p addAction ["Deploy Mortar", "x_scripts\x_mortarDep.sqf",[],-1,false];

};

};

I think i put it everywhere needed, but I must be missing something since everytime I respawn I lose the ability to deploy mortars.... sad_o.gif

Any idea what I'm missing?

Thanks in advance.

Share this post


Link to post
Share on other sites

...you got me stumped...that's everything I can think of too!

XENO! Little help?

Share this post


Link to post
Share on other sites
...you got me stumped...that's everything I can think of too!

XENO! Little help?

yeah, that's what I thought, but I have to be missing something and I cannot find what....

Share this post


Link to post
Share on other sites
I think i put it everywhere needed, but I must be missing something since everytime I respawn I lose the ability to deploy mortars.... sad_o.gif

Take a look at x_playerweapons.sqf, that's the script where I add all player actions again smile_o.gif

Xeno

Share this post


Link to post
Share on other sites

@xeno

I've been trying to figure out how x_setupplayer.sqf and x_playerweapons.sqf are called on respawn to ready up the player again...but no joy!

What is the sequence of events when a player dies? Is a certain variable set to true/false which calls the scripts?

It would be really useful to know so I can easily make changes that need to get called each time a player gets spawned without having to edit your scripts directly...

Share this post


Link to post
Share on other sites

I've been trying to figure out how x_setupplayer.sqf and x_playerweapons.sqf are called on respawn to ready up the player again...but no joy!

What is the sequence of events when a player dies? Is a certain variable set to true/false which calls the scripts?

x_setupplayer gets only called once when a player connects (only local on the new connecter machine to set up all client functions, triggers and eventhandlers).

x_playerweapons is a loop which waits until the player dies (gets called only once from x_setupplayer and is running as long the mission lasts or the player disconnects), packs his magazines and weapons in an array and waits until the player is alive again and adds weapons, magazines and all action menu entries that the specific player needs.

The checkkill eventhandler gets called as soon as a player dies and removes all action menu entries and delets the dead player body after some time (and opens the respawn dialog). You could also put the code in checkkill that removes the action menu entries into x_playerweapons (waitUntil {!alive player})

Xeno

Share this post


Link to post
Share on other sites

Thanks for that xeno...

I'm thinking the easiest way to do what I need would be to add a new variable into x_playerweapons.sqf that is reset every cycle of the weapons script.

Then as long as my added actions remove themselves on player death as part of their scripting, I won't have to touch x_checkkill at all.

I'm trying to avoid mangling your scripts whenever possible to make it easier to port my modifications on your next release!

EDIT - actually, I may as well just call a masterscript from x_setupplayer.sqf and create my own (alive)/(!alive) loops...

Share this post


Link to post
Share on other sites

_Xeno_, what is the same across all these versions? For example, is mission.sqm exactly the same? I'm going to put my updates that I did to your v2.02 into this latest version.

Share this post


Link to post
Share on other sites

@delta

speaking as someone that's been hacking domination to shit since v3.0, mission.sqm hasn't ever changed.

The only changes that HAVE been made are usually to init.sqf plus a few new scripts in the x_scripts folder as xeno added new features.

Depending on HOW you added your features, you're probably safe to use your mission.sqm, but check the contents of any scripts you've altered directly.

Share this post


Link to post
Share on other sites

Thank you very much!  smile_o.gif

Now that works OK.

But I still got a small problem. I have added a couple of choppers more, an osprey and a chinnook, and a predator drone.

I kept the names as chxx where xx is the number,

However the three first choppers can drop ammo and lift vehicles, the fourth is the one for wrecks, and I am finding dificult to add the same abilities to the other three added by me.

I have manage to add the drop ammo to the osprey by giving it the name ch0 and extending the loop in x_playersetup(line 25) to 0 to 3, so the first four choppers, from 0 to 3 have the action to drop crates, but the osprey doesn't lift vehicles.

I don't get where tha HR comes from and where is it used.

The way I've done is like this

In the init I add the respawn for choppers and now it looks like this

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

[ch0,240,0,false] spawn x_helirespawn;//V22 osprey

[ch1,240,1,true] spawn x_helirespawn;//default uh60

[ch2,240,2,true] spawn x_helirespawn;/default uh60

[ch3,240,3,false] spawn x_helirespawn;/default uh60

[ch4,240,4,false] spawn x_helirespawn;//wreck uh60

[ch5,240,5,false] spawn x_helirespawn;//chinook

[ch6,240,6,false] spawn x_helirespawn;//predator

the predator is ok with only that(and adding all the stuff for mando missiles and bombs), so now all new helos and planes respawn fine.

Now in the x_playersetup is where I get lost

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

for "_xx" from 0 to 3 do {

call compile format ["

if (!(isNil ""HR%1"")) then {

HR%1 addeventhandler [""getin"", {_this execVM ""x_scripts\x_checkhelipilot.sqf"";}];

HR%1 addeventhandler [""getout"", {_this execVM ""x_scripts\x_checkhelipilotout.sqf"";}];

};

""HR%1"" addPublicVariableEventHandler {

HR%1 addeventhandler [""getin"", {_this execVM ""x_scripts\x_checkhelipilot.sqf"";}];

HR%1 addeventhandler [""getout"", {_this execVM ""x_scripts\x_checkhelipilotout.sqf"";}];

};

", _xx];

};

I changed the 1 to 0 in the for loop and the osprey has now the action to drop crates, but no to lift vehicles, but I looked into x_checkhelipilot and it should also lift vehicles.

I followed the code to x_helilift and add a default option in the switch statment for other that are not HR1,2 or 3 have a lifttypes array.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

_possible_types = (

switch (_vehicle) do {

case HR1: {d_helilift1_types};

case HR2: {d_helilift2_types};

case HR3: {d_helilift3_types};

default {d_helilift1_types};

}

);

I suppose that here is where I'm missing something or I'm not doing something ok, but I'm lost with that HR1, HR2 and HR3 that I don't know where it comes from.

Any idea?

Thanks in advance.

Share this post


Link to post
Share on other sites

@zorasht

the HR%1's I believe come from a loop within x_setvehiclemarker.sqf which creates the markers for all the vehicles used in domination.

The secret comes from how many times the loop is run.

HR%1 generates HR1, HR2, HR3 etc each time it goes round a loop in that script.

As part of the SAME loop, Chopper%1 is used, so HR1 refers to chopper1 etc.

This loop is run four times in x_setvehiclemarkers.sqf

In x_setuplayer.sqf, notice this bit of code:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

for "_xx" from 1 to 3 do {

call compile format ["

if (!(isNil ""HR%1"")) then {

HR%1 addeventhandler [""getin"", {_this execVM ""x_scripts\x_checkhelipilot.sqf"";}];

HR%1 addeventhandler [""getout"", {_this execVM ""x_scripts\x_checkhelipilotout.sqf"";}];

};

""HR%1"" addPublicVariableEventHandler {

HR%1 addeventhandler [""getin"", {_this execVM ""x_scripts\x_checkhelipilot.sqf"";}];

HR%1 addeventhandler [""getout"", {_this execVM ""x_scripts\x_checkhelipilotout.sqf"";}];

};

", _xx];

};

if (!(isNil "HR4")) then {

HR4 addeventhandler ["getin", {_this execVM "x_scripts\x_checkhelipilot_wreck.sqf";}];

HR4 addeventhandler ["getout", {_this execVM "x_scripts\x_checkhelipilotout.sqf";}];

};

"HR4" addPublicVariableEventHandler {

HR4 addeventhandler ["getin", {_this execVM "x_scripts\x_checkhelipilot_wreck.sqf";}];

HR4 addeventhandler ["getout", {_this execVM "x_scripts\x_checkhelipilotout.sqf";}];

};

this adds event handlers to choppers 1-3 and adds the wreck event handlers to chopper4.

I've added new choppers to domination, but not more UH-60's, so I didn't have to bother with adding the event handlers for air-lifting

If you want to add more without renumbering the wreck heli, just repeat that first loop, but instead of for 1-3, do it from 5-(number of helis you've got)

I think that should do it - IF you've followed the same naming convention...

PS - welcome to the intricate web of lightly commented scripts that is domination! It's taking me fucking AGES to understand what little I've worked out so far! Happy hunting!

Share this post


Link to post
Share on other sites
@delta

speaking as someone that's been hacking domination to shit since v3.0, mission.sqm hasn't ever changed.

The only changes that HAVE been made are usually to init.sqf plus a few new scripts in the x_scripts folder as xeno added new features.

Depending on HOW you added your features, you're probably safe to use your mission.sqm, but check the contents of any scripts you've altered directly.

Ok, great. My version requires about 11 triggers added to mission.sqm so I can probably copy that over to all the other versions. And also a very minor change to init.sqf. I don't touch any of Xeno's stuff other than that as my stuff should be self contained.

I did have a few fixes put into v2.x but Xeno seems to have put those into v3.x so I don't need to even do that any longer.

I guess I modify the briefing as well to add that it was updated by myself.

Share this post


Link to post
Share on other sites

New Domination version based on Xeno's Domination West 3.03.

I've made the same changes I did to Xeno's v2.22 Domination to the West 3.03 version.

There should be a thread here somewhere on the details of those changes but basically I've added enemy AI patrols all over the island. So now, you have a much better chance of running into the enemy en route to a mission. You can just easily travel to that destination without being fully ready to engage the enemy. Patrols are random so never the same anytime you start the mission.

Download from filefront here

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×