Announcement

Collapse
No announcement yet.

Sector Control with RHS Russian Units

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

  • Sector Control with RHS Russian Units

    First create your sector control module and set it so it and the attached spawnpoints will only spawn in 1 enemy unit each time. Add the following line into the Expression field into the main sector control module:
    Code:
    [_this select 0, _this select 1] execVM "unk\RHSaiSpawn.sqf";
    Then in a folder named "Unk" create this file named "RHSaiSpawn.sqf" and put the following script into it:

    Code:
    _unk_AIGroupSpawned = _this select 0;
    _unk_AISpawnPoint = getPos ((units _unk_AIGroupSpawned)select 0);
    _unk_originalGroupUnits = units _unk_AIGroupSpawned;
    _unk_groupSpawnPos = getPos ((units _unk_AIGroupSpawned) select 0);
    _typeOfInfantryGroupSelector = 0;
    _typeOfMotorGroupSelector = 0;
    _typeOfGroupToSpawn = "small";
    _numberInGroup = 1;
    
    _unk_EnemySmallTeam = ["rhs_msv_emr_sergeant","rhs_msv_emr_arifleman","rhs_msv_emr_grenadier_rpg","rhs_msv_emr_strelok_rpg_assist","rhs_msv_emr_efreitor","rhs_msv_emr_rifleman","rhs_msv_junior_sergeant"];
    _unk_EnemyFireTeam = ["rhs_msv_emr_sergeant","rhs_msv_emr_arifleman","rhs_msv_emr_grenadier_rpg","rhs_msv_emr_strelok_rpg_assist"];
    _unk_EnemySquad = ["rhs_msv_emr_sergeant","rhs_msv_emr_arifleman","rhs_msv_emr_grenadier_rpg","rhs_msv_emr_strelok_rpg_assist","rhs_msv_emr_efreitor","rhs_msv_emr_rifleman","rhs_msv_emr_rifleman","rhs_msv_junior_sergeant"];
    //**********vehicle teams the first element is the vehicle then the leader, then driver then gunner, then cargo troops after
    _unk_EnemyBTRTeam = ["rhs_bmp1p_msv","rhs_msv_emr_sergeant","rhs_msv_crew","rhs_msv_crew","rhs_msv_emr_arifleman","rhs_msv_emr_grenadier_rpg","rhs_msv_emr_strelok_rpg_assist","rhs_msv_emr_efreitor","rhs_msv_emr_rifleman","rhs_msv_junior_sergeant","rhs_msv_at"];
    _unk_EnemyUralTeam = ["RHS_Ural_MSV_01","rhs_msv_emr_sergeant","rhs_msv_driver","rhs_msv_emr_arifleman","rhs_msv_emr_grenadier_rpg","rhs_msv_emr_strelok_rpg_assist","rhs_msv_emr_efreitor","rhs_msv_emr_rifleman","rhs_msv_junior_sergeant","rhs_msv_at"];
    
    _typeOfGroupIsInfantry = true;
    
    if (floor random 100 > 85) then {_typeofGroupIsInfantry = false;} else {_typeOfGroupIsInfantry = true;};
    
    if (_typeOfGroupIsInfantry) then
    {
        _typeOfInfantryGroupSelector = floor random 100;
        if (_typeOfInfantryGroupSelector <= 30) then {_typeOfGroupToSpawn = "small";}; 
        if (_typeOfInfantryGroupSelector > 30 && _typeOfInfantryGroupSelector < 70)then {_typeOfGroupToSpawn = "fireteam";};
        if (_typeOfInfantryGroupSelector >= 70) then {_typeOfGroupToSpawn = "squad";};
    
    
        //************************SMALL INFANTRY UNITS
        if (_typeOfGroupToSpawn == "small") then
        {
            _newLeader = (_unk_EnemySmallTeam select 0) createUnit [_unk_AISpawnPoint,_unk_AIGroupSpawned];
            _numberInGroup = (floor random [0,((count _unk_EnemySmallTeam) / 2) - 1,((count _unk_EnemySmallTeam) - 1)] + 1);
            for [{ _loop = 1 },{ _loop < _numberInGroup},{ _loop = _loop + 1}] do
            {
                _newUnit = (_unk_EnemySmallTeam select _loop) createUnit [_unk_AISpawnPoint,_unk_AIGroupSpawned];
            };
            sleep 20;
            {deleteVehicle _x;}forEach _unk_originalGroupUnits;
        };
    
        //************************INFANTRY FIRETEAMS
        if (_typeOfGroupToSpawn == "fireteam") then
        {
            _newLeader = (_unk_EnemyFireTeam select 0) createUnit [_unk_AISpawnPoint,_unk_AIGroupSpawned];
            _numberInGroup = count _unk_EnemyFireTeam;
            for [{ _loop = 1 },{ _loop < _numberInGroup},{ _loop = _loop + 1}] do
            {
                _newUnit = (_unk_EnemyFireTeam select _loop) createUnit [_unk_AISpawnpoint,_unk_AIGroupSpawned];
            };
            sleep 20;
            {deleteVehicle _x}forEach _unk_originalGroupUnits;
        };
    
        //*************************INFANTRY SQUAD
        if (_typeOfGroupToSpawn == "squad") then
        {
            _newLeader = (_unk_EnemySquad select 0) createUnit [_unk_AISpawnPoint,_unk_AIGroupSpawned];
            _numberInGroup = count _unk_EnemySquad;
            for [{ _loop = 1 },{ _loop < _numberInGroup},{ _loop = _loop + 1}] do
            {
                _newUnit = (_unk_EnemySquad select _loop) createUnit [_unk_AISpawnpoint,_unk_AIGroupSpawned];
            };
            sleep 20;
            {deleteVehicle _x}forEach _unk_originalGroupUnits;
        };
    } else {
        _typeOfMotorGroupSelector = floor random 100;
        if (_typeOfMotorGroupSelector <= 50) then {_typeOfGroupToSpawn = "ural";} else {_typeOfGroupToSpawn = "btr";};
        if (_typeOfGroupToSpawn == "ural") then
        {
            _newVehicle = (_unk_EnemyUralTeam select 0) createVehicle _unk_AISpawnPoint;
            _newLeader = (_unk_EnemyUralTeam select 1) createUnit [_unk_AISpawnPoint,_unk_AIGroupSpawned,"newLeader = this"];
            newLeader assignAsCargo _newVehicle;
            newLeader moveInCargo _newVehicle;
            _newDriver = (_unk_EnemyUralTeam select 2) createUnit [_unk_AISpawnPoint,_unk_AIGroupSpawned,"newDriver = this"];
            newDriver moveInDriver _newVehicle;
            _numberInGroup = count _unk_EnemyUralTeam;
            for [{ _loop = 3 },{ _loop < _numberInGroup},{ _loop = _loop + 1}] do
            {
                _newUnit = (_unk_EnemyUralTeam select _loop) createUnit [_unk_AISpawnpoint,_unk_AIGroupSpawned,"newUnit = this"];
                newUnit assignAsCargo _newVehicle;
                newUnit moveInCargo _newVehicle;
            };
            sleep 20;
            {deleteVehicle _x}forEach _unk_originalGroupUnits;
        };
    
        if (_typeOfGroupToSpawn == "btr") then
        {
            _newVehicle = (_unk_EnemyBTRTeam select 0) createVehicle _unk_AISpawnPoint;
            _newLeader = (_unk_EnemyBTRTeam select 1) createUnit [_unk_AISpawnPoint,_unk_AIGroupSpawned,"newLeader = this"];
            newLeader assignAsCargo _newVehicle;
            newLeader moveInCargo _newVehicle;
            _newDriver = (_unk_EnemyBTRTeam select 2) createUnit [_unk_AISpawnPoint,_unk_AIGroupSpawned,"newDriver = this"];
            _newGunner = (_unk_EnemyBTRTeam select 3) createUnit [_unk_AISpawnPoint,_unk_AIGroupSpawned,"newGunner = this"];
            newDriver assignAsDriver _newVehicle;
            newDriver moveInDriver _newVehicle;
            newGunner assignAsGunner _newVehicle;
            newGunner moveInGunner _newVehicle;
            _numberInGroup = count _unk_EnemyBTRTeam;
            for [{ _loop = 4 },{ _loop < _numberInGroup},{ _loop = _loop + 1}] do
            {
                _newUnit = (_unk_EnemyBTRTeam select _loop) createUnit [_unk_AISpawnpoint,_unk_AIGroupSpawned,"newUnit = this"];
                newUnit assignAsCargo _newVehicle;
                newUnit moveInCargo _newVehicle;
            };
            sleep 20;
            {deleteVehicle _x}forEach _unk_originalGroupUnits;
        };
    
    };
    This code will spawn 3 different groups of infantry and either a motorized or a mechanized group at random. They will be attached to and then replace the vanilla unit the sector control module creates.
    |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
    This script is on the Test server now in Zargabad Control. It is awaiting testing before going on the main server.
    |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

    Comment


    • #3
      - played the new Zargabad sector control today. That's a great setup, really nice challenge. One little nitpick, a BTR (as listed in the briefing) is not the same as a BMP (what rolled down the street to murder me while my light AT bounced off harmlessly).

      Comment


      • #4
        Originally posted by Noyava View Post
        - played the new Zargabad sector control today. That's a great setup, really nice challenge. One little nitpick, a BTR (as listed in the briefing) is not the same as a BMP (what rolled down the street to murder me while my light AT bounced off harmlessly).
        Right that! I wonder if the BTR can hold the same number of enemies in the cargo..if so I'll adjust the script. Thanks for pointing that out!
        |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

        Comment


        • #5
          It totally works with the BMP, just update the briefing :)

          Also, I think people sit on top of the BTR to reach the same total count.

          Comment

          Connect

          Collapse

          TeamSpeak 3 Server

          Collapse

          Advertisement

          Collapse

          Twitter Feed

          Collapse

          Working...
          X