Announcement

Collapse
No announcement yet.

Ammo Drop - Simple Drop - No Fly By

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Ammo Drop - Simple Drop - No Fly By

    This script will spawn an ammo crate, put it in a parachute and deploy a smoke grenade on it while it drops from the air. This script was developed to drop a crate on the airfield on Stratis and all positions are relative to that map.

    For it to work ala carte, you need to place 7 markers named "m" to "m_6" on the map. The drop zone will be randomized from one of those markers or the position xyz, [1800,5750,500].

    I have more scripts I'm using with this to fill the box and so forth....you can do what you will with the box itself. I'm only creating one box currently so I made a public variable out of the object name so I can refer to that box from different client scripts. You may find this unnecessary.

    Code:
    if !(isServer) exitWith {};
    
    //initialize variables as objects
    airDropCrate = player;
    airDropChute = player;
    
    airDropCrate = "B_supplyCrate_F" createVehicle [1800,5750,2000];
    airDropChute = createVehicle ["B_Parachute_02_F",[1800,5750,500],["m","m_1","M_2","M_3","m_4","m_5","m_6"],0,"FLY"];
    sleep 1.6;
    airDropCrate allowDamage false;
    airDropCrate attachTo [airDropChute,[0,0,-.4]]; 
    //clearWeaponCargoGlobal airDropCrate;
    //clearItemCargoGlobal airDropCrate;
    //clearMagazineCargoGlobal airDropCrate;
    //clearBackpackCargoGlobal airDropCrate;
    
    []spawn {
        sleep 5;
        airDropSmoke = createVehicle ["smokeShellGreen", getPos airDropCrate,[],0,"NONE"];
        airDropSmoke attachTo [airDropCrate,[0,0,.2]];
    };
    
    _run = true;
    _lastHeight = getPosATL airDropCrate select 2;
    while {_run} do
    {
        sleep .2;
        _newHeight = getPosATL airDropCrate select 2;
        if (_newHeight == _lastHeight || _newHeight <= 1.6) then {_run = false; detach airDropCrate;};
        _lastHeight = _newHeight;
    };
    
    airDropCrate setVectorUp [0,0,1];
    detach airDropSmoke;
    deleteVehicle airDropSmoke;
    airDropSmoke = createVehicle ["smokeShellGreen", getPos airDropCrate,[],0,"NONE"];
    publicVariable "airDropCrate";
    "The air drop is ready." remoteExec ["hint",0,false];
    
    [] spawn {
        sleep 40;
        deleteVehicle airDropSmoke;
    };
    |TG-189th| Unkl
    ArmA 3 Game Officer
    Dean of Tactical Gamer University
    189th Infantry Brigade Member

    SUBMIT A RIBBON NOMINATION OR CONTACT AN ARMA ADMIN

  • #2
    nice!

    Comment

    Connect

    Collapse

    TeamSpeak 3 Server

    Collapse

    Advertisement

    Collapse

    Twitter Feed

    Collapse

    Working...
    X