Auxiliary vehicle turrets.

Discussion in 'Scripting Discussions' started by Boba Fetish, Feb 15, 2018.

  1. Boba Fetish

    Boba Fetish New Member

    Joined:
    May 18, 2015
    Messages:
    16
    Likes Received:
    1
    You can add weapons to a vehicle, but how do you edit say, the helicopters flare function? Or even add the flare function to a car.
     
  2. ShootingBlanks

    ShootingBlanks OpenDayZ Guru!

    Joined:
    Mar 31, 2013
    Messages:
    2,445
    Likes Received:
    337
    Try this. Works to add flares to hummingbird in Arma3. Might work .. you will have to replace with arma2 magazine and flare launcher name. You can get the name of it from a heli that has it with the weapons command

    Code:
    vehname addMagazine "60Rnd_CMFlare_Chaff_Magazine";
    vehname addWeapon "CMFlareLauncher";
     
  3. Inkko

    Inkko Valued Member!

    Joined:
    Jan 12, 2013
    Messages:
    720
    Likes Received:
    94
    For the biplane this is what was used to add M240s to them. The code is pasted into the server_monitor.sqf server side somewhere in the initialization of vehicles.

    Code:
               if (_object isKindOf "AN2_DZ") then {
                          _object addWeapon "M240_veh";
                          _object addMagazine "100Rnd_762x51_M240";
                          _object addMagazine "100Rnd_762x51_M240";
                          _object addMagazine "100Rnd_762x51_M240";
                };
    
     
    FallingSheep likes this.
  4. Boba Fetish

    Boba Fetish New Member

    Joined:
    May 18, 2015
    Messages:
    16
    Likes Received:
    1
    yes thanks inkko, I'm familiar with how to arm the vehicles. But how does this code look for having vehicles spawn in the database with these attachto commands.

    _object addWeapon "M1014_DZ";
    _object addMagazine "8Rnd_12Gauge_Buck";
    _fence = createVehicle ["Fence_corrugated_plate"];
    _fence attachTo [_object, [1.2,0,.0], ""];
    _fence setVectorDirAndUp [[1,0,0],[0,0,-1]];
    _fence2 = createVehicle ["Fence_corrugated_plate"];
    _fence2 attachTo [_object, [-.6,0,.0], ""];
    _fence2 setVectorDirAndUp [[1,0,0],[0,0,-1]];
    _fence3 = createVehicle ["Land_Fire_barrel_burning"];
    _fence3 attachTo [_object, [0,0,0], ""];
     
  5. Inkko

    Inkko Valued Member!

    Joined:
    Jan 12, 2013
    Messages:
    720
    Likes Received:
    94
    That looks like the "_object" which I assume is a vehicle would have a 1014 and ammo added to the inventory of the vehicle since it isn't a vehicle weapon and then would have fences/barrel attached to the "_object". I believe if you want the vehicle to be firing a weapon it has to be a vehicle class weapon.
     

Share This Page