Jump to content

roy86

Member
  • Content Count

    483
  • Joined

  • Last visited

  • Medals

  • Medals

Posts posted by roy86


  1. Hey Guys,

    I'm loving DAC, very dynamic and helps alot for mission building. Just having a bit of an issue with DAC_fnewzone

    I'm trying to create new zones with DAC mid mission however when the zones appear (on map) it seems to successfully initilise however does not populate with any troops. They remain completly empty even if i set troops/vehicles + camps in the parameters. Other zones have already initilised successfully on startup by this point.

    I ran the demo mission where you select a point on the map, and on click, a zone is created yet i see the same issue with no troops being created.

    The command has the parameters to set the AI but is it supposed to spawn troops? and if it doesn't how should i add them in?

    To work around this i set initial zones to disable and then trigger them but it doesn't allow any flexible, dynamic zones for random missions.

    any help is much appreciated.

    waituntil{DAC_NewZone == 0};
    _values = ["z1",[1,0,0],[5,2,50,8],[],[],[],[1,1,1,1]];
    [(position player),250,250,0,0,_values] call DAC_fNewZone

    cheers,

    Roy


  2. hey guys, just thought to say DAC is awesome!! building missions is so easy and dynamic..

    just need a bit of help though with trying to create zones mid mission using DAC_fNewZone.

    I have a deactivated zone on start up ("qx1") and it is activated successfully with units earlier in a script as part of me testing. I then create the ("Z1") zone 5 secs later in the same script.

    i can see the ("Z1") zone be created after the initilisation on the map yet no units appear.

    waituntil{DAC_NewZone == 0};
    zoneb = [qx1] call DAC_Activate;
    hint "QX1 is launched";
    //QX1 is a trigger with init ['qx1',[1,1,0],[2,3,10,3],[],[],[],[0,2,0,0]] spawn dac_zone;
    
    sleep(5);
    
    _pos1 = getMarkerPos "ops_area";
    _values = ["z1",[1,0,0],[5,2,30,4],[],[],[],[0,0,0,0]];
    zonea = [(_pos1),50,50,1,0,_values] call DAC_fNewZone;
    hint "z1 is created";

    I'm not sure what i'm doing wrong. I took the example in the readme and got the same result. creating just the zone yet with no units in it.

    I used DAC_Extern with default config folders supplied from the RAR file following the instructions supplied.

    any help is much appreciated.

    Cheers


  3. yeah, basically you create an "ACE" part, just like the ACRE part in the code above and set the ACE weapons.

    It is a bit of manual setup initially but works a really well and have not found any bugs to date.

    It also allows dynamically sized boxes as well, so if you change the box type the filler will still proportion the weapons and ammo appropriately.

    I suggest analyse the "TFOR" missions by bon_if. they are a great resource for adaptable scripting.


  4. Hi Militantsausage,

    the last part of the code i gave you refills the box every "x" seconds. It clears it then refills it so there is always weapons and ammunition.

    while {alive _cache} do {
    {deleteVehicle _x} foreach nearestObjects [position _cache,["WeaponHolder"],50];
    clearMagazineCargo _cache;
    clearWeaponCargo _cache;
    { _cache addWeaponCargo [_x, floor(_weaponcapacity / (count _weapons))]; } foreach _weapons;
    { _cache addMagazineCargo [_x, floor(_magazinecapacity / (count _magazines))]; } foreach _magazines;
    sleep 1800; // restock time.
    };


  5. I use this

    Original Code by BON_IF adapted and simplified using AAW mod weapons

    First in mission editor create a marker called "ammobox"

    Second insert into init.sqf:

    _ammo = "USVehicleBox" createVehicleLocal getMarkerPos "ammobox";
    _ammo allowDamage false;
    [_ammo] execVM "scripts\ammocrate_filler.sqf";

    Third create scripts\ammocrate_filler.sqf with the following:

    // by Bon_Inf
    private ['_contenttype'];
    
    _cache = _this select 0;
    
    _weapons = [
    "AAW_f88_A1","AAW_f88_A1_gla","AAW_f88_elcan","AAW_f88_elcan_gla","AAW_f88_S","AAW_f88_S_gla","AAW_f88_ACOG","AAW_f88_ACOG_gla","AAW_f88_AIM","AAW_f88_AIM_gla","AAW_f88SA2_15",
    "AAW_f88SA2_15_gla","AAW_f88SA2_elcan","AAW_f88SA2_elcan_gla","AAW_f88SA2_ACOG","AAW_f88SA2_ACOG_gla","AAW_f88SA2_AIM",
    "AAW_f89_ELCAN","AAW_f89_ACOG","AAW_f89_15","AAW_f89_AIM",
    "AAW_mag58","AAW_mag58_ELCAN","AAW_mag58_ACOG","AAW_mag58_AIM",
    "AAW_M72a6","AAW_M2_carlG","AAW_M2_carlG_optic","AAW_M2_carlG_D","AAW_M2_carlG_optic_D","Javelin",
    "M24","M40A3","m107","BAF_LRR_scoped",
    "aaw_9mmslp","M9","M9SD","glock17_EP1",
    "NVGoggles","ItemMap","ItemCompass","ItemWatch","ItemRadio","Binocular_Vector","glock17_EP1","ItemGPS"
    ];
    
    _magazines = [
    "aaw_f88_mag","aaw_f88_mag_allTracers","aaw_f89_mag","aaw_f89_mag_allTracers","aaw_f89_100_mag","aaw_f89_100_mag_allTracers",
    "aaw_mag58_mag","aaw_mag58_mag_allTracers",
    "1Rnd_HE_M203","1Rnd_Smoke_M203","1Rnd_SmokeGreen_M203","1Rnd_SmokeRed_M203","1Rnd_SmokeYellow_M203","FlareGreen_M203","FlareRed_M203","FlareWhite_M203","FlareYellow_M203",
    "aaw_HEDP","aaw_HEAT","aaw_HEAT_RAP","aaw_HEDP_FFV","aaw_HEAT_FFV","aaw_HEAT_RAP_FFV","Javelin",
    "5Rnd_762x51_M24","10Rnd_127x99_M107","5Rnd_86x70_L115A1",
    "13Rnd_9mm_SLP","15Rnd_9x19_M9","15Rnd_9x19_M9SD","17Rnd_9x19_glock17",
    "SmokeShell","SmokeShellGreen","SmokeShellRed","SmokeShellYellow","SmokeShellBlue","SmokeShellPurple","SmokeShellOrange",
    "PipeBomb","Mine","aaw_f1_grenade","LaserBatteries","IR_Strobe_Target","IR_Strobe_Marker"
    ];
    
    if(tfor_acre == 1) then {
    _weapons = _weapons + ["ACRE_PRC148","ACRE_PRC148_UHF","ACRE_PRC117F","ACRE_PRC119","ACRE_PRC343"];
    };
    
    //remove duplicates:
    { _magazines = (_magazines - [_x]) + [_x]; } foreach _magazines;
    { _weapons = (_weapons - [_x]) + [_x]; } foreach _weapons;
    
    _weaponcapacity = 0 max (getNumber (configFile >> "CfgVehicles" >> typeOf _cache >> "transportMaxWeapons") min 470);
    _magazinecapacity = 0 max (getNumber (configFile >> "CfgVehicles" >> typeOf _cache >> "transportMaxMagazines") min 880);
    
    while {alive _cache} do {
    {deleteVehicle _x} foreach nearestObjects [position _cache,["WeaponHolder"],50];
    clearMagazineCargo _cache;
    clearWeaponCargo _cache;
    { _cache addWeaponCargo [_x, floor(_weaponcapacity / (count _weapons))]; } foreach _weapons;
    { _cache addMagazineCargo [_x, floor(_magazinecapacity / (count _magazines))]; } foreach _magazines;
    sleep 1800; // restock time.
    }; 

×