Hi I am trying to make a defend mission similar to the defend kamino mission, but I seem to be having a problem with enemy forces spawning in.
for initcurator.sqf I have this:
//--- Event handlers
[
bis_curator,
{
_costs = [
"B_Soldier_F", 0.2,
"B_Soldier_GL_F", 0.2,
"B_soldier_AR_F", 0.2,
"B_Soldier_SL_F", 0.2,
"B_soldier_M_F", 0.2,
"B_soldier_LAT_F", 0.2,
"B_medic_F", 0.2,
"B_soldier_repair_F", 0.2,
"B_soldier_exp_F", 0.2,
"B_Helipilot_F", 0.2,
"B_spotter_F", 0.4,
"B_sniper_F", 0.4,
"B_Soldier_A_F", 0.2,
"B_soldier_AT_F", 0.2,
"B_soldier_AA_F", 0.2,
"B_engineer_F", 0.2,
"B_crew_F", 0.2,
"B_recon_F", 0.5,
"B_recon_LAT_F", 0.5,
"B_recon_exp_F", 0.5,
"B_recon_medic_F", 0.5,
"B_recon_TL_F", 0.5,
"B_recon_M_F", 0.5,
"B_recon_JTAC_F", 0.5,
"B_soldier_AAR_F", 0.2,
"B_soldier_AAT_F", 0.2,
"B_soldier_AAA_F", 0.2,
"B_helicrew_F", 0.2,
"B_MRAP_01_hmg_F", 1.25,
"B_MRAP_01_gmg_F", 1.25,
"B_APC_Tracked_01_rcws_F", 2.0,
"B_APC_Wheeled_01_cannon_F", 3.0,
"B_MBT_01_cannon_F", 4.0,
"B_Heli_Light_01_armed_F", 4.5,
"B_Heli_Attack_01_F", 5.5
];
_class = _this select 0;
_index = _costs find _class;
if (_index >= 0) then {
[_costs select (_index + 1),true]
} else {
[0,false];
};
}
] call bis_fnc_onCuratorObjectRegistered;
[
bis_curator,
"curatorObjectPlaced",
{
_object = _this select 0;
_object allowCrewInImmobile true;
_object unassignitem "nvgoggles";
_object removeitem "nvgoggles";
_object removeweapon "binocular";
_object addPrimaryWeaponItem "acc_flashlight";
_object setskill 0.25;
_object allowfleeing 0;
_object lock true;
_veh = vehicle _object;
if (_veh != _object) then {
_veh flyinheight 100;
clearmagazinecargoglobal _veh;
clearweaponcargoglobal _veh;
clearitemcargoglobal _veh;
_veh addeventhandler ["fired",{(_this select 0) setvehicleammo 1;}]; //--- Unlimited vehicle ammo, remove it in the future
};
_object addeventhandler [
"killed",
{
(_this select 0) setvehicleammo (0.3 + random 0.2);
}
];
}
] call bis_fnc_addScriptedEventHandler;
and then for the init.sqf I have this:
#include "initcurator.sqf";
[player,["A3_Modules_F_Intel"]] call bis_fnc_curatoraddplaceableaddons;
enablesaving [false,false];
if anyone could lend a hand, it would be very much appreciated.