Skocz do zawartości

Nekron

Szeregowy
  • Liczba zawartości

    436
  • Rejestracja

  • Ostatnia wizyta

Odpowiedzi dodane przez Nekron

  1. Spitfire co było lepszego w tym że noob który grał w do dość długo mógł z łatwością pokonać kogoś zdolnego ale dopiero zaczynającego?

    Bo 4 grach rzuciłem to w cholerę i wróciłem do zwykłego Coh :)

  2. A próbowałeś wstawić jakąś dodatkową frakcje czy sprawdzałeś na tych co już są w skrypcie?

    Bo tylko po zmianie jednoski na taką której frakcja jest standardowo w skrypcie wszytko działa tak jak powinno.

    A takistańscy partyzanci nie działają dalej :|

  3. 
    

     

    // RUIS script (Random Unit Invasion Script) v1.2

     

    // changed attak waypoint to function as array - allows for spawned group to randomly select a position to move to

     

     

     

    // example: nul = [RUguy, [spawn1, spawn2, spawn3], attackwp, spawntimer, Scripttime] execVM "RUIS.sqf"

     

    // unit - this unit will be checked for what side and faction to spawn

     

    // [spawn1, ...] - gamelogics for units to spawn on

     

    // attackwp - an array of positions spawned units will move to (chosen randomly per group)

     

    // spawntimer - amount of time to wait until the spawning of a new unit

     

    // scripttime - the amount of waves this script will run (1 wave = 1 iteration of script spawning stuff)

     

     

     

    if (isServer || isDedicated) then {

     

    private ["_spawntime", "_logicS", "_logicE", "_temptime", "_scripttime", "_unit", "_perc", "_faction", "_side", "_MaxInf", "_MaxV", "_MaxLA", "_MaxArm", "_MaxAir", "_PInf", "_PV", "_PLA", "_PArm", "_PAir", "_EmptyGroups"];

     

    _unit = _this select 0;

     

    _logicS = _this select 1;

     

    _logicE = _this select 2;

     

    _spawntime = _this select 3;

     

    _scripttime = _this select 4; // this sets the amount of waves the script will do

     

    _faction = faction _unit;

     

    _side = side _unit;

     

    _EmptyGroups = 0;

     

     

     

    // EDIT THESE VARIABLES TO CUSTOMIZE RUIS

     

    _MaxInf = 10; // Maximum amount of infantry that can be spawned in a single wave

     

    _MaxV = 0; // Max amount of vehicles to spawn

     

    _MaxLA = 0; // Max amount of light armored in a single wave

     

    _MaxArm = 0; // Max amount of armor

     

    _MaxAir = 0; // Max amount of air

     

    _PInf = 100; // Percentage chance of Infantry being spawned (100% = everytime, 0% = never)

     

    _PV = 0; // Percentage chance of vehicles spawning

     

    _PLA = 0; // Percentage chance of Light vehicles being spawned

     

    _PArm = 0; // Percentage chance of Armor being spawned

     

    _PAir = 0; // Percentage chance of Air being spawned

     

    // DO NOT EDIT PAST THIS

     

     

     

    // check what side was chosen, and assimilate proper values

     

     

     

    // blacklisted: "RU_SniperTeam", "USMC_SniperTeam", "USMC_FRTeam", "USMC_FRTeam_Razor"

     

     

     

    // A2 Russian faction

     

    if (_faction == "RU") then {

     

    _unit setVariable ["infantry", ["RU_InfSquad", "RU_InfSection_MG", "RU_InfSection_AT", "RU_InfSection_AA", "RU_InfSection"], true];

     

    _unit setVariable ["vehicle", ["RU_MotInfSection_Recon", "RU_MotInfSection_Patrol"], true];

     

    _unit setVariable ["lightarmor", ["RU_MechInfSquad_1", "RU_MechInfSquad_2"], true];

     

    _unit setVariable ["armor", ["RU_TankPlatoon"], true];

     

    _unit setVariable ["air", ["RU_Mi24VSquadron", "RU_Mi24PSquadron"], true];

     

    };

     

     

     

    // A2 USMC faction

     

    if (_faction == "USMC") then {

     

    _unit setVariable ["infantry", ["USMC_InfSquad", "USMC_FireTeam", "USMC_FireTeam_MG", "USMC_FireTeam_AT", "USMC_FireTeam_Support", "USMC_HeavyATTeam"], true];

     

    _unit setVariable ["vehicle", ["USMC_MotInfSection", "USMC_MotInfSection_AT"], true];

     

    _unit setVariable ["lightarmor", ["USMC_MechInfSquad", "USMC_MechReconSection"], true];

     

    _unit setVariable ["armor", ["USMC_TankPlatoon"], true];

     

    _unit setVariable ["air", ["USMC_AH1ZSquadron", "USMC_UH1YSquadron", "USMC_MV22Squadron", "USMC_F35Squadron", "USMC_AV8BFighterSquadron", "USMC_AV8BBomberSquadron"], true];

     

    };

     

     

     

    // OA US Army faction

     

    if (_faction == "BIS_US") then {

     

    _unit setVariable ["infantry", ["US_RifleSquad", "US_WeaponsSquad", "US_Team", "US_TeamMG", "US_TeamAT", "US_TeamSupport", "US_HeavyATTeam", "US_SniperTeam", "US_DeltaForceTeam"], true];

     

    _unit setVariable ["vehicle", ["US_MotorizedSection", "US_MotorizedSectionAT", "US_DeltaPatrolATV", "US_DeltaPatrolHMMWV"], true];

     

    _unit setVariable ["lightarmor", ["US_MechanizedInfantrySquadICVM2", "US_MechanizedInfantrySquadICVMK19", "US_MechanizedReconSection"], true];

     

    _unit setVariable ["armor", ["US_MGSPlatoon", "US_M1A2Platoon", "US_M1A1Platoon", "US_M1A2Section"], true];

     

    _unit setVariable ["air", ["US_A10Flight", "US_AH64DFlight", "US_AH6JFlight", "US_AH6XFlight", "US_MH6JFlight", "US_UH60MFlight"], true];

     

    };

     

     

     

    // OA Takistani Army faction

     

    if (_faction == "BIS_TK") then {

     

    _unit setVariable ["infantry", ["TK_InfantrySquad", "TK_InfantrySection", "TK_InfantrySectionAT", "TK_InfantrySectionAA", "TK_InfantrySectionMG", "TK_SniperTeam", "TK_SpecialPurposeSquad"], true];

     

    _unit setVariable ["vehicle", ["TK_MotorizedInfanterySquad", "TK_MotorizedReconSection", "TK_MotorizedPatrol"], true];

     

    _unit setVariable ["lightarmor", ["TK_MechanizedInfantrySquadBMP2", "TK_MechanizedInfantrySquadBTR60", "TK_MechanizedSpecialSquad", "TK_MechanizedReconSection", "TK_MechanizedReconSectionAT"], true];

     

    _unit setVariable ["armor", ["TK_T72Platoon", "TK_T55Platoon", "TK_T34Platoon"], true];

     

    _unit setVariable ["air", ["TK_Mi24_DFlight", "TK_Mi_17Flight", "TK_Su25Flight", "TK_UH1HFlight"], true];

     

    };

     

     

     

    // OA Takistani Insurgents faction

     

    if (_faction == "BIS_TK_INS") then {

     

    _unit setVariable ["infantry", ["TK_INS_Group", "TK_INS_Patrol", "TK_INS_AATeam", "TK_INS_ATTeam"], true];

     

    _unit setVariable ["vehicle", ["TK_INS_Technicals", "TK_INS_MotorizedGroup"], true];

     

    _unit setVariable ["lightarmor", [], true];

     

    _unit setVariable ["armor", ["TK_INS_MotorizedPatrolBTR40"], true];

     

    _unit setVariable ["air", [], true];

     

    };

     

     

     

     

     

    // Takistani Locals

     

    if (_faction == "BIS_TK_GUE") then {

     

    _unit setVariable ["infantry", ["TK_GUE_Group", "TK_GUE_Patrol", "TK_GUE_ATTeam"], true];

     

    _unit setVariable ["lightarmor", ["Your Vehicle Classname here"], true];

     

    _unit setVariable ["armor", ["Your armor classname here"], true];

     

    _unit setVariable ["air", ["Your air classname here"], true];

     

    };

     

     

     

    // Functions for spawn

     

     

     

    if (isnil "DZ_Spawn_INF") then {

     

    DZ_Spawn_INF = {

     

    private ["_unit", "_loc", "_wp", "_spawned", "_logicS", "_logicE", "_unitarray", "_side", "_faction", "_MaxInf", "_locA"];

     

    _unit = _this select 0;

     

    _logicS = _this select 1;

     

    _logicE = _this select 2;

     

    _side = _this select 3;

     

    _faction = _this select 4;

     

    _MaxInf = _this select 5;

     

    // spawn infantry a random of 5 times

     

    for "_i" from 1 to (ceil(random _MaxInf)) + 5 do

     

    {

     

    _unitarray = (_unit getVariable "infantry") select floor(random(count (_unit getVariable "infantry")));

     

    _loc = _logicS select floor(random(count _logicS));

     

    // spawn random units

     

    _spawned = [getPos _loc, _side, (configFile >> "CfgGroups" >> (str _side) >> _faction >> "Infantry" >> _unitarray),[],[],[],[],[],180] call BIS_fnc_spawnGroup;

     

    // move units to waypoint

     

    _locA = _logicE select floor (random(count _logicE));

     

    _wp = _spawned addWaypoint [position _locA, 0];

     

    _wp setWaypointType "SAD";

     

    _wp setWaypointSpeed "NORMAL";

     

    [_spawned, 0] setWaypointBehaviour "AWARE";

     

    sleep (random 20);

     

    };

     

    };

     

    };

     

     

     

    if (isnil "DZ_Spawn_V") then {

     

    DZ_Spawn_V = {

     

    private ["_unit", "_loc", "_wp", "_spawned", "_logicS", "_logicE", "_unitarray", "_side", "_faction", "_MaxV", "_locA"];

     

    _unit = _this select 0;

     

    _logicS = _this select 1;

     

    _logicE = _this select 2;

     

    _side = _this select 3;

     

    _faction = _this select 4;

     

    _MaxV = _this select 5;

     

    // spawn vehicle random times

     

    for "_i" from 1 to (ceil(random _MaxV)) do

     

    {

     

    _unitarray = (_unit getVariable "vehicle") select floor(random(count (_unit getVariable "vehicle")));

     

    _loc = _logicS select floor(random(count _logicS));

     

    // spawn random units

     

    _spawned = [getPos _loc, _side, (configFile >> "CfgGroups" >> (str _side) >> _faction >> "Motorized" >> _unitarray),[],[],[],[],[],180] call BIS_fnc_spawnGroup;

     

     

     

    // move units to waypoint

     

    _locA = _logicE select floor (random(count _logicE));

     

    _wp = _spawned addWaypoint [position _locA, 0];

     

    _wp setWaypointType "SAD";

     

    _wp setWaypointSpeed "NORMAL";

     

    [_spawned, 0] setWaypointBehaviour "AWARE";

     

    sleep (random 20);

     

    };

     

    };

     

    };

     

     

     

    if (isnil "DZ_Spawn_LA") then {

     

    DZ_Spawn_LA = {

     

    private ["_unit", "_loc", "_wp", "_spawned", "_logicS", "_logicE", "_unitarray", "_side", "_faction", "_MaxLA", "_locA"];

     

    _unit = _this select 0;

     

    _logicS = _this select 1;

     

    _logicE = _this select 2;

     

    _side = _this select 3;

     

    _faction = _this select 4;

     

    _MaxLA = _this select 5;

     

    // spawn light armor random times

     

    for "_i" from 1 to (ceil(random _MaxLA)) do

     

    {

     

    _unitarray = (_unit getVariable "lightarmor") select floor(random(count (_unit getVariable "lightarmor")));

     

    _loc = _logicS select floor(random(count _logicS));

     

    // spawn random units

     

    _spawned = [getPos _loc, _side, (configFile >> "CfgGroups" >> (str _side) >> _faction >> "Mechanized" >> _unitarray),[],[],[],[],[],180] call BIS_fnc_spawnGroup;

     

     

     

    // move units to waypoint

     

    _locA = _logicE select floor (random(count _logicE));

     

    _wp = _spawned addWaypoint [position _locA, 0];

     

    _wp setWaypointType "SAD";

     

    _wp setWaypointSpeed "NORMAL";

     

    [_spawned, 0] setWaypointBehaviour "AWARE";

     

    sleep (random 20);

     

    };

     

    };

     

    };

     

     

     

    if (isnil "DZ_Spawn_ARM") then {

     

    DZ_Spawn_ARM = {

     

    private ["_unit", "_loc", "_wp", "_spawned", "_logicS", "_logicE", "_unitarray", "_side", "_faction", "_MaxArm", "_locA"];

     

    _unit = _this select 0;

     

    _logicS = _this select 1;

     

    _logicE = _this select 2;

     

    _side = _this select 3;

     

    _faction = _this select 4;

     

    _MaxArm = _this select 5;

     

    // spawn vehicle a random of 3 times

     

    for "_i" from 1 to (ceil(random _MaxArm)) do

     

    {

     

    _unitarray = (_unit getVariable "armor") select floor(random(count (_unit getVariable "armor")));

     

    _loc = _logicS select floor(random(count _logicS));

     

    // spawn random units

     

    _spawned = [getPos _loc, _side, (configFile >> "CfgGroups" >> (str _side) >> _faction >> "Armored" >> _unitarray),[],[],[],[],[],180] call BIS_fnc_spawnGroup;

     

    // move units to waypoint

     

    _locA = _logicE select floor (random(count _logicE));

     

    _wp = _spawned addWaypoint [position _locA, 0];

     

    _wp setWaypointType "SAD";

     

    _wp setWaypointSpeed "NORMAL";

     

    [_spawned, 0] setWaypointBehaviour "AWARE";

     

    sleep (random 20);

     

    };

     

    };

     

    };

     

     

     

    if (isnil "DZ_Spawn_AIR") then {

     

    DZ_Spawn_AIR = {

     

    private ["_unit", "_loc", "_wp", "_spawned", "_logicS", "_logicE", "_unitarray", "_side", "_faction", "_MaxAir", "_locA"];

     

    _unit = _this select 0;

     

    _logicS = _this select 1;

     

    _logicE = _this select 2;

     

    _side = _this select 3;

     

    _faction = _this select 4;

     

    _MaxAir = _this select 5;

     

    // spawn vehicle a random of 3 times

     

    for "_i" from 1 to (ceil(random _MaxAir)) do

     

    {

     

    _unitarray = (_unit getVariable "air") select floor(random(count (_unit getVariable "air")));

     

    _loc = _logicS select floor(random(count _logicS));

     

    // spawn random units

     

    _spawned = [getPos _loc, _side, (configFile >> "CfgGroups" >> (str _side) >> _faction >> "Air" >> _unitarray),[],[],[],[],[],180] call BIS_fnc_spawnGroup;

     

    // move units to waypoint

     

    _locA = _logicE select floor (random(count _logicE));

     

    _wp = _spawned addWaypoint [position _locA, 0];

     

    _wp setWaypointType "SAD";

     

    _wp setWaypointSpeed "NORMAL";

     

    [_spawned, 0] setWaypointBehaviour "AWARE";

     

    sleep (random 20);

     

    };

     

    };

     

    };

     

    //player sidechat "getting into loop";

     

    while {_scripttime > 0} do {

     

    _perc = round(random 100);

     

    _scripttime = _scripttime - 1;

     

    _temptime = _spawntime;

     

    //player sidechat format ["percentage: %1", _perc];

     

    if (_perc <= _PInf) then {

     

    _infspawn = [_unit, _logicS, _logicE, _side, _faction, _MaxInf] spawn DZ_Spawn_INF;

     

    };

     

    _perc = round(random 100);

     

    if (_perc <= _PV) then {

     

    _vehspawn = [_unit, _logicS, _logicE, _side, _faction, _MaxV] spawn DZ_SPAWN_V;

     

    };

     

     

     

    // check if an index in the array exists

     

    if (count (_unit getVariable "lightarmor") > 0) then {

     

    _perc = round(random 100);

     

    //player sidechat format ["percentage: %1", _perc];

     

    if (_perc <= _PLA) then {

     

    _laspawn = [_unit, _logicS, _logicE, _side, _faction, _MaxLA] spawn DZ_Spawn_LA;

     

    };

     

    };

     

    _perc = round(random 100);

     

    //player sidechat format ["percentage: %1", _perc];

     

    if (_perc <= _PArm) then {

     

    _armspawn = [_unit, _logicS, _logicE, _side, _faction, _MaxArm] spawn DZ_Spawn_ARM;

     

    };

     

    sleep 1;

     

     

     

    // check if an index in the array exists

     

    if (count (_unit getVariable "air") > 0) then {

     

    _perc = round(random 100);

     

    //player sidechat format ["percentage: %1", _perc];

     

    if (_perc <= _PAir) then {

     

    _airspawn = [_unit, _logicS, _logicE, _side, _faction, _MaxAir] spawn DZ_Spawn_AIR;

     

    };

     

    };

     

    waitUntil {sleep 1; _temptime = _temptime - 1; _temptime < 1};

     

    {if (({alive _x} count units _x) == 0) then {deleteGroup _x}} foreach allGroups;

     

    {deleteVehicle _x} forEach allDead;

     

    };

     

    };

     

×
×
  • Dodaj nową pozycję...