Skip to content

Commit

Permalink
Spawned vehicles will now have a loadout #5
Browse files Browse the repository at this point in the history
  • Loading branch information
Katalam committed Mar 9, 2019
1 parent 799dacd commit 84f586c
Show file tree
Hide file tree
Showing 10 changed files with 277 additions and 216 deletions.
14 changes: 8 additions & 6 deletions 10th_anizay_template.tem_anizay/initServer.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,11 @@ KAT_noLootingEVH = call KAT_fnc_noLooting;
[crate_logistic] call KAT_fnc_createCrateSpawn;

// fill editor placed vehicles with loadout
{
if !(isNil str _x) then {
private _l = [str _x] call KAT_fnc_getLoadoutName;
[_x, _l] call KAT_fnc_applyVehicleLoadout;
};
} count entities [["Helicopter", "Plane", "Tank", "Car", "Ship", "ReammoBox_F"], []];
[{
{
if !(isNil str _x) then {
private _l = [str _x] call KAT_fnc_getLoadoutName;
[_x, _l] call KAT_fnc_applyVehicleLoadout;
};
} count entities [["Helicopter", "Plane", "Tank", "Car", "Ship", "ReammoBox_F"], []];
}, [], 5] call CBA_fnc_waitAndExecute;
24 changes: 12 additions & 12 deletions 10th_anizay_template.tem_anizay/mission.sqm
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ class EditorData
};
class LayerIndexProvider
{
nextID=145;
nextID=165;
};
class Camera
{
pos[]={8478.7012,148.54941,6862.8184};
dir[]={-0.57955509,-0.46201703,-0.67150384};
up[]={-0.30196849,0.88678437,-0.34987473};
aside[]={-0.75712103,1.2377277e-006,0.65343577};
pos[]={8446.959,235.50998,6984.292};
dir[]={-0.67177731,-0.73579884,-0.087036125};
up[]={-0.72976083,0.67711997,-0.094546966};
aside[]={-0.12851048,-2.4078945e-006,0.99181378};
};
};
binarizationWanted=0;
Expand Down Expand Up @@ -3832,7 +3832,7 @@ class Mission
{
position[]={8398.6523,111.54,6975.938};
};
init="call{if (isServer) then {" \n "private _veh = ""rhsusf_M978A4_usarmy_d"" createVehicle (getPos this);" \n "_veh setDir (getDir this);" \n "[_veh, ""USAM_Veh_CAR""] call KAT_fnc_applyVehicleLoadout;" \n "};}";
init="call{if (isServer) then {" \n "private _veh = ""rhsusf_M978A4_usarmy_d"" createVehicle (getPos this);" \n "_veh setDir (getDir this);" \n "_veh setVehicleVarName ""USAM_Veh_CAR_1"";" \n "USAM_Veh_CAR_1 = _veh;" \n "};}";
id=178;
type="Logic";
};
Expand All @@ -3843,7 +3843,7 @@ class Mission
{
position[]={8392.6523,111.54,6975.938};
};
init="call{if (isServer) then {" \n "private _veh = ""rhsusf_M977A4_REPAIR_usarmy_d"" createVehicle (getPos this);" \n "_veh setDir (getDir this);" \n "[_veh, ""USAM_Veh_REPAIR""] call KAT_fnc_applyVehicleLoadout;" \n "};}";
init="call{if (isServer) then {" \n "private _veh = ""rhsusf_M977A4_REPAIR_usarmy_d"" createVehicle (getPos this);" \n "_veh setDir (getDir this);" \n "_veh setVehicleVarName ""USAM_Veh_REPAIR_2"";" \n "USAM_Veh_REPAIR_2 = _veh;" \n "};}";
id=179;
type="Logic";
};
Expand All @@ -3854,7 +3854,7 @@ class Mission
{
position[]={8386.6523,111.54,6975.938};
};
init="call{if (isServer) then {" \n "private _veh = ""rhsusf_M977A4_AMMO_usarmy_d"" createVehicle (getPos this);" \n "_veh setDir (getDir this);" \n "[_veh, ""USAM_Veh_REPAIR""] call KAT_fnc_applyVehicleLoadout;" \n "};}";
init="call{if (isServer) then {" \n "private _veh = ""rhsusf_M977A4_AMMO_usarmy_d"" createVehicle (getPos this);" \n "_veh setDir (getDir this);" \n "_veh setVehicleVarName ""USAM_Veh_REPAIR_1"";" \n "USAM_Veh_REPAIR_1 = _veh;" \n "};}";
id=180;
type="Logic";
};
Expand All @@ -3866,7 +3866,7 @@ class Mission
position[]={8359,111.54,6964};
angles[]={0,1.5707964,0};
};
init="call{if (isServer) then {" \n "private _veh = ""RHS_UH60M_d"" createVehicle (getPos this);" \n "_veh setDir (getDir this);" \n "[_veh] call KAT_fnc_clearVehicleInventory;" \n "};}";
init="call{if (isServer) then {" \n "private _veh = ""RHS_UH60M_d"" createVehicle (getPos this);" \n "_veh setDir (getDir this);" \n "_veh setVehicleVarName ""USAM_Veh_MED_1"";" \n "USAM_Veh_MED_1 = _veh;" \n "};}";
id=181;
type="Logic";
};
Expand All @@ -3878,7 +3878,7 @@ class Mission
position[]={8359,111.54,6944};
angles[]={0,4.712389,0};
};
init="call{if (isServer) then {" \n "private _veh = ""RHS_CH_47F_light"" createVehicle (getPos this);" \n "_veh setDir (getDir this);" \n "[_veh] call KAT_fnc_clearVehicleInventory;" \n "};}";
init="call{if (isServer) then {" \n "private _veh = ""RHS_CH_47F_light"" createVehicle (getPos this);" \n "_veh setDir (getDir this);" \n "_veh setVehicleVarName ""USAM_Veh_MED_2"";" \n "USAM_Veh_MED_2 = _veh;" \n "};}";
id=182;
type="Logic";
};
Expand All @@ -3890,7 +3890,7 @@ class Mission
position[]={8388.0557,111.54,6928.1362};
angles[]={0,1.5707964,0};
};
init="call{if (isServer) then {" \n "private _veh = ""rhsusf_M1078A1P2_D_fmtv_usarmy"" createVehicle (getPos this);" \n "_veh setDir (getDir this);" \n "[_veh, ""USAM_Veh_CAR""] call KAT_fnc_applyVehicleLoadout;" \n "};}";
init="call{if (isServer) then {" \n "private _veh = ""rhsusf_M1078A1P2_D_fmtv_usarmy"" createVehicle (getPos this);" \n "_veh setDir (getDir this);" \n "_veh setVehicleVarName ""USAM_Veh_CAR_3"";" \n "};}";
id=183;
type="Logic";
};
Expand All @@ -3902,7 +3902,7 @@ class Mission
position[]={8388.0557,111.54,6936.2661};
angles[]={0,1.5707964,0};
};
init="call{if (isServer) then {" \n "private _veh = ""rhsusf_M1078A1P2_D_fmtv_usarmy"" createVehicle (getPos this);" \n "_veh setDir (getDir this);" \n "[_veh, ""USAM_Veh_CAR""] call KAT_fnc_applyVehicleLoadout;" \n "};}";
init="call{if (isServer) then {" \n "private _veh = ""rhsusf_M1078A1P2_D_fmtv_usarmy"" createVehicle (getPos this);" \n "_veh setDir (getDir this);" \n "_veh setVehicleVarName ""USAM_Veh_CAR_2"";" \n "" \n "};}";
id=184;
type="Logic";
};
Expand Down
14 changes: 8 additions & 6 deletions 10th_rosche_template.WL_Rosche/initServer.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,11 @@ KAT_noLootingEVH = call KAT_fnc_noLooting;
[crate_logistic] call KAT_fnc_createCrateSpawn;

// fill editor placed vehicles with loadout
{
if !(isNil str _x) then {
private _l = [str _x] call KAT_fnc_getLoadoutName;
[_x, _l] call KAT_fnc_applyVehicleLoadout;
};
} count entities [["Helicopter", "Plane", "Tank", "Car", "Ship", "ReammoBox_F"], []];
[{
{
if !(isNil str _x) then {
private _l = [str _x] call KAT_fnc_getLoadoutName;
[_x, _l] call KAT_fnc_applyVehicleLoadout;
};
} count entities [["Helicopter", "Plane", "Tank", "Car", "Ship", "ReammoBox_F"], []];
}, [], 5] call CBA_fnc_waitAndExecute;
36 changes: 18 additions & 18 deletions 10th_rosche_template.WL_Rosche/mission.sqm
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ class EditorData
};
class LayerIndexProvider
{
nextID=42;
nextID=50;
};
class Camera
{
pos[]={641.76892,237.49451,4513.6792};
dir[]={0.40729538,-0.63787407,0.6538223};
up[]={0.33732837,0.77002001,0.54150385};
aside[]={0.84888661,-2.4958863e-006,-0.52880764};
pos[]={647.68652,211.55869,4600.2085};
dir[]={0.76031107,-0.63435942,0.14061445};
up[]={0.62388474,0.77291733,0.11538177};
aside[]={0.18188356,-2.5853224e-006,-0.9834432};
};
};
binarizationWanted=0;
Expand Down Expand Up @@ -3965,7 +3965,7 @@ class Mission
position[]={801.60303,15.13,4705.584};
angles[]={0,2.4101601,0};
};
init="call{if (isServer) then {" \n "private _veh = ""rhsusf_M978A4_usarmy_wd"" createVehicle (getPos this);" \n "_veh setDir (getDir this);" \n "[_veh, ""USAM_Veh_CAR""] call KAT_fnc_applyVehicleLoadout;" \n "};}";
init="call{if (isServer) then {" \n "private _veh = ""rhsusf_M978A4_usarmy_wd"" createVehicle (getPos this);" \n "_veh setDir (getDir this);" \n "_veh setVehicleVarName ""USAM_Veh_CAR_1"";" \n "USAM_Veh_CAR_1 = _veh;" \n "};}";
id=99;
type="Logic";
};
Expand All @@ -3977,7 +3977,7 @@ class Mission
position[]={807.44897,15.13,4710.7422};
angles[]={0,2.4101601,0};
};
init="call{if (isServer) then {" \n "private _veh = ""rhsusf_M977A4_REPAIR_usarmy_wd"" createVehicle (getPos this);" \n "_veh setDir (getDir this);" \n "[_veh, ""USAM_Veh_REPAIR""] call KAT_fnc_applyVehicleLoadout;" \n "};}";
init="call{if (isServer) then {" \n "private _veh = ""rhsusf_M977A4_REPAIR_usarmy_wd"" createVehicle (getPos this);" \n "_veh setDir (getDir this);" \n "_veh setVehicleVarName ""USAM_Veh_REPAIR_1"";" \n "USAM_Veh_REPAIR_1 = _veh;" \n "};}";
id=100;
type="Logic";
};
Expand All @@ -3989,7 +3989,7 @@ class Mission
position[]={813.14099,15.13,4715.8882};
angles[]={0,2.4101601,0};
};
init="call{if (isServer) then {" \n "private _veh = ""rhsusf_M977A4_AMMO_usarmy_wd"" createVehicle (getPos this);" \n "_veh setDir (getDir this);" \n "[_veh, ""USAM_Veh_REPAIR""] call KAT_fnc_applyVehicleLoadout;" \n "};}";
init="call{if (isServer) then {" \n "private _veh = ""rhsusf_M977A4_AMMO_usarmy_wd"" createVehicle (getPos this);" \n "_veh setDir (getDir this);" \n "_veh setVehicleVarName ""USAM_Veh_REPAIR_2"";" \n "USAM_Veh_REPAIR_2 = _veh;" \n "};}";
id=101;
type="Logic";
};
Expand All @@ -3998,10 +3998,10 @@ class Mission
dataType="Logic";
class PositionInfo
{
position[]={722.12378,15.13,4791.3086};
angles[]={0,3.9790413,0};
position[]={722.12402,15.13,4791.3091};
angles[]={0,3.9790363,0};
};
init="call{if (isServer) then {" \n "private _veh = ""RHS_UH60M_d"" createVehicle (getPos this);" \n "_veh setDir (getDir this);" \n "[_veh] call KAT_fnc_clearVehicleInventory;" \n "};}";
init="call{if (isServer) then {" \n "private _veh = ""RHS_UH60M_d"" createVehicle (getPos this);" \n "_veh setDir (getDir this);" \n "_veh setVehicleVarName ""USAM_Veh_MED_1"";" \n "USAM_Veh_MED_1 = _veh;" \n "};}";
id=102;
type="Logic";
};
Expand All @@ -4010,10 +4010,10 @@ class Mission
dataType="Logic";
class PositionInfo
{
position[]={749.87109,15.13,4760.083};
angles[]={0,4.0611134,0};
position[]={749.87097,15.13,4760.083};
angles[]={0,4.0611191,0};
};
init="call{if (isServer) then {" \n "private _veh = ""RHS_CH_47F_light"" createVehicle (getPos this);" \n "_veh setDir (getDir this);" \n "[_veh] call KAT_fnc_clearVehicleInventory;" \n "};}";
init="call{if (isServer) then {" \n "private _veh = ""RHS_CH_47F_light"" createVehicle (getPos this);" \n "_veh setDir (getDir this);" \n "_veh setVehicleVarName ""USAM_Veh_MED_2"";" \n "USAM_Veh_MED_2 = _veh;" \n "" \n "};}";
id=103;
type="Logic";
};
Expand All @@ -4025,7 +4025,7 @@ class Mission
position[]={837.25,15.13,4707.4102};
angles[]={0,3.9598553,0};
};
init="call{if (isServer) then {" \n "private _veh = ""rhsusf_M1078A1P2_WD_fmtv_usarmy"" createVehicle (getPos this);" \n "_veh setDir (getDir this);" \n "[_veh, ""USAM_Veh_CAR""] call KAT_fnc_applyVehicleLoadout;" \n "};}";
init="call{if (isServer) then {" \n "private _veh = ""rhsusf_M1078A1P2_WD_fmtv_usarmy"" createVehicle (getPos this);" \n "_veh setDir (getDir this);" \n "_veh setVehicleVarName ""USAM_Veh_CAR_2"";" \n "USAM_Veh_CAR_2 = _veh;" \n "};}";
id=104;
type="Logic";
};
Expand All @@ -4037,7 +4037,7 @@ class Mission
position[]={842.80603,15.13,4701.4761};
angles[]={0,3.9598553,0};
};
init="call{if (isServer) then {" \n "private _veh = ""rhsusf_M1078A1P2_WD_fmtv_usarmy"" createVehicle (getPos this);" \n "_veh setDir (getDir this);" \n "[_veh, ""USAM_Veh_CAR""] call KAT_fnc_applyVehicleLoadout;" \n "};}";
init="call{if (isServer) then {" \n "private _veh = ""rhsusf_M1078A1P2_WD_fmtv_usarmy"" createVehicle (getPos this);" \n "_veh setDir (getDir this);" \n "_veh setVehicleVarName ""USAM_Veh_CAR_3"";" \n "USAM_Veh_CAR_3 = _veh;" \n "};}";
id=105;
type="Logic";
};
Expand Down Expand Up @@ -4383,7 +4383,7 @@ class Mission
position[]={880.21875,15.13,4633.5532};
name="marker_vehiclespawn_1";
type="Empty";
angle=226.46155;
angle=226.46153;
id=115;
};
class Item3
Expand All @@ -4392,7 +4392,7 @@ class Mission
position[]={961.58276,15.13,4528.1709};
name="marker_vehiclespawn_2";
type="Empty";
angle=308.59756;
angle=308.59753;
id=116;
};
class Item4
Expand Down
14 changes: 8 additions & 6 deletions 10th_sahrani_template.sara/initServer.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,11 @@ KAT_noLootingEVH = call KAT_fnc_noLooting;
[crate_logistic] call KAT_fnc_createCrateSpawn;

// fill editor placed vehicles with loadout
{
if !(isNil str _x) then {
private _l = [str _x] call KAT_fnc_getLoadoutName;
[_x, _l] call KAT_fnc_applyVehicleLoadout;
};
} count entities [["Helicopter", "Plane", "Tank", "Car", "Ship", "ReammoBox_F"], []];
[{
{
if !(isNil str _x) then {
private _l = [str _x] call KAT_fnc_getLoadoutName;
[_x, _l] call KAT_fnc_applyVehicleLoadout;
};
} count entities [["Helicopter", "Plane", "Tank", "Car", "Ship", "ReammoBox_F"], []];
}, [], 5] call CBA_fnc_waitAndExecute;
Binary file modified 10th_sahrani_template.sara/mission.sqm
Binary file not shown.
14 changes: 8 additions & 6 deletions 10th_takistan_template.takistan/initServer.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,11 @@ KAT_noLootingEVH = call KAT_fnc_noLooting;
[crate_logistic] call KAT_fnc_createCrateSpawn;

// fill editor placed vehicles with loadout
{
if !(isNil str _x) then {
private _l = [str _x] call KAT_fnc_getLoadoutName;
[_x, _l] call KAT_fnc_applyVehicleLoadout;
};
} count entities [["Helicopter", "Plane", "Tank", "Car", "Ship", "ReammoBox_F"], []];
[{
{
if !(isNil str _x) then {
private _l = [str _x] call KAT_fnc_getLoadoutName;
[_x, _l] call KAT_fnc_applyVehicleLoadout;
};
} count entities [["Helicopter", "Plane", "Tank", "Car", "Ship", "ReammoBox_F"], []];
}, [], 5] call CBA_fnc_waitAndExecute;
Loading

0 comments on commit 84f586c

Please sign in to comment.