Announcement

Collapse
No announcement yet.

[SCRIPT] Custom AI Spawing

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

  • [SCRIPT] Custom AI Spawing

    Script allows for AIs to spawn in the mission without manually placing the AI's.
    Could be used to bypass the ArmA faction limitation limit.

    This script is made using Default Insurgent units for ArmAII.

    //This script generates pre-designed infantry groups to spawn when we get near.
    //Create a trigger with a suitable area over the leader of the group to spawn
    //(there must be a single soldier who already exists on the map, who will be the leader).
    //by Lowspeedhighdrag

    //Usage: Randomname = [leaderunit,x] execVM "Insurgent_reinforce.sqf"

    //leaderunit is the existing AI.
    //x refers to a pre-designed setup.

    //************************************************** **********************************


    if (!isserver) exitwith {};

    _lead = _this select 0;
    _reinforce = _this select 1;

    // switch case


    switch (_reinforce) do
    {
    case 1: // Lots of bad pixels
    {
    "Ins_Soldier_CO" createUnit [(getpos _lead), group _lead];
    "INS_Soldier_Sab" createUnit [(getpos _lead), group _lead];
    "INS_Soldier_Sab" createUnit [(getpos _lead), group _lead];
    "INS_Soldier_AT" createUnit [(getpos _lead), group _lead];
    "Ins_Soldier_AT" createUnit [(getpos _lead), group _lead];
    "InS_Soldier_Medic" createUnit [(getpos _lead), group _lead];
    "Ins_Soldier_AR" createUnit [(getpos _lead), group _lead];
    "Ins_Soldier_GL" createUnit [(getpos _lead), group _lead];
    "Ins_Soldier_MG" createUnit [(getpos _lead), group _lead];
    };
    case 2: // heavy pixels
    {
    "INS_Soldier_AT" createUnit [(getpos _lead), group _lead];
    "INS_Soldier_AT" createUnit [(getpos _lead), group _lead];
    "INS_Soldier_AT" createUnit [(getpos _lead), group _lead];
    "INS_Soldier_MG" createUnit [(getpos _lead), group _lead];
    };
    case 3: // Sniper pixels
    {
    "INS_Soldier_Sniper" createUnit [(getpos _lead), group _lead, "this setunitpos ""down""",0.9];
    _lead setunitpos "down";
    };
    case 4: // Semi pixels
    {
    "INS_Soldier_Sab" createUnit [(getpos _lead), group _lead, "",0.8];
    "INS_Soldier_Sab" createUnit [(getpos _lead), group _lead, "",0.8];
    "INS_Soldier_Sapper" createUnit [(getpos _lead), group _lead, "",0.8];
    "INS_Soldier_GL" createUnit [(getpos _lead), group _lead, "",0.8];
    };
    default
    {
    // Clientside test failed;
    };
    };

    if (true) exitwith {};

    TGU Instructor TG Pathfinder

    Former TGU Dean Former ARMA Admin Former Irregulars Officer

    "Do not seek death. Death will find you. But seek the road which makes death a fulfillment." - Dag Hammarskjold

Connect

Collapse

TeamSpeak 3 Server

Collapse

Advertisement

Collapse

Twitter Feed

Collapse

Working...
X