Jump to content

Morten87

Member
  • Content Count

    91
  • Joined

  • Last visited

  • Medals

Community Reputation

10 Good

About Morten87

  • Rank
    Corporal
  1. So the unitplay command don't work in multiplayer matches?
  2. Hello guys, and girls. Having trouble with this unitplay/unitcapture thing, I have recorded every thing and it works perfectly. But instead of having to radio "bravo" at mission start, i want it to start automatic at mission start, perhaps through init.sqf How can I do this?
  3. Cool.. it works :) Thank you very much.. I keep getting more and more overwhelmed, over how good this community is. :)
  4. I have created a folder "RUIS.sqf" in the root directory - And in it I have placed the long "script" above. I have edited these parts: _MaxInf = 40; // Maximum amount of infantry that can be spawned in a single wave _MaxV = 3; // Max amount of vehicles to spawn _MaxLA = 0; // Max amount of light armored in a single wave _MaxArm = 0; // Max amount of armor _MaxAir = 1; // Max amount of air _PInf = 100; // Percentage chance of Infantry being spawned (100% = everytime, 0% = never) _PV = 25; // Percentage chance of vehicles spawning _PLA = 3; // Percentage chance of Light vehicles being spawned _PArm = 1; // Percentage chance of Armor being spawned _PAir = 1; // Percentage chance of Air being spawned // 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]; };
  5. Well.. I cant get it to work. what I did was as above - ----------- Put RUIS.sqf in your mission folder. Place one unit from the desired enemy faction somewhere on the map. You can name all of the objects we're placing whatever you'd like, but we'll use the names from the example above. Name this unit RUguy. I also prefer to make the unit inactive by adding this to the unit's init field as well: Code: this enableSimulation false; this hideObject true; Place a gamelogic at each spawn position, and name them. We'll place three, named spawn1, spawn2, and spawn3. Place another gamelogic at the center of the town where your player will be and name it attackwp. Place a trigger and group it to the helicopter, heli1. In the trigger's Cond field, we'll put !alive heli1. In the trigger's OnAct field we'll call the script: Code: nul = [RUguy, [spawn1, spawn2, spawn3], attackwp, 300, 5] execVM "RUIS.sqf"; Now, when heli1 is destroyed, RUIS.sqf will run, randomly spawning AI at one of the three gamelogics spawn1, spawn2, and spawn3. They will move to attackwp and engage any enemy the find there. Every five minutes (300 seconds), another wave will spawn. A total of five waves will spawn. If you open RUIS.sqf, you can edit some settings so that only the desired unit types and group sizes will spawn. The script is well-commented, so it should be pretty straightforward. ------------------------------- And then in the RUIS.sqf i copyed and paste from the script. // 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; _MaxInf = 40; // Maximum amount of infantry that can be spawned in a single wave _MaxV = 3; // Max amount of vehicles to spawn _MaxLA = 0; // Max amount of light armored in a single wave _MaxArm = 0; // Max amount of armor _MaxAir = 1; // Max amount of air _PInf = 100; // Percentage chance of Infantry being spawned (100% = everytime, 0% = never) _PV = 25; // Percentage chance of vehicles spawning _PLA = 3; // Percentage chance of Light vehicles being spawned _PArm = 1; // Percentage chance of Armor being spawned _PAir = 1; // Percentage chance of Air being spawned // 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]; }; 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; }; }; What am I doing wrong?
  6. Looks like a good script, but can you help me through it? I mean, what part should go were, is it in init.sqf or somewere else?
  7. Hello :) Need some help with this :) When "heli1" is killed, I want the enemy to spawn from 3 diffrent positions. Their objective is to locate and kill the "player". The player should be held up in a town. There are 3 roads leading in to the town. I want the enemy to spawn by these roads continuasly but never more than around 20-30 Enemy AI at the same time. How can I do this?
  8. Hello. I'am making a mission were I want a "high value target" to spawn in 1 of 3, buildings. How can I fix this? thanks in advance :)
  9. Morten87

    Norwegian newspaper using ARMA 2

    took them long enouh though :p
  10. Morten87

    Norwegian newspaper using ARMA 2

    Come over this Norwegian newspaper (TV2) Using a picture, they probably found on google. in a article about: Secrets declassified: This is how the military envisioned an attack from the Soviet Union. http://www.tv2.no/nyheter/magasinet/hemmeligheter-avgradert-slik-saa-forsvaret-for-seg-et-angrep-fra-sovjetunionen-4037541.html Its in Norwegian.
  11. I follow "TheJserver", completely, with same units, names and everything. I save it as sqf. but when I go out its named path.sqf.txt?
  12. Hello. I've tried the turtorial by TheJserver on youtube. But I cant see to get it to work. Because when I save both files ends with sqf.txt Do I need to download something to get this to work?
  13. ahha, yes its for the main editor, not the scenario editor. I dont use scenario editor. I use the main editor. much better:D
×