kyfohatl
Member-
Content Count
247 -
Joined
-
Last visited
-
Medals
Everything posted by kyfohatl
-
Help with two thing; random loadout and join command!.
kyfohatl replied to jollem's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I think I have a solution to your first problem (sorry, as my multiplayer scripting skills aren't very good, I prefered to write it in singleplayer version, though it shouldn't be too hard to convert to multiplayer): Try this script in single player. Best run via init.sqf (I haven't tested it): private ["_type", "_position", "_unit"]; _type = floor (random 6); _position = <Insert your desired position of spawning here>; switch (_type) do { case 0: {_unit = "Ins_Soldier_1" createUnit [_position, grpNull, "addSwitchableUnit this"];}; case 1: {_unit = "Ins_Soldier_2" createUnit [_position, grpNull, "addSwitchableUnit this"];}; case 2: {_unit = "Ins_Soldier_Medic" createUnit [_position, grpNull, "addSwitchableUnit this"];}; case 3: {_unit = "Ins_Soldier_AT" createUnit [_position, grpNull, "addSwitchableUnit this"];}; case 4: {_unit = "Ins_Soldier_Sniper" createUnit [_position, grpNull, "addSwitchableUnit this"];}; case 5: {_unit = "Ins_Soldier_MG" createUnit [_position, grpNull, "addSwitchableUnit this"];}; }; It should create one of six different types of units, and it's pretty easy to change the unit types (by changing the unit class) or how many random types to choose from by decreasing/increasing the number "6" and changing the number of "cases". As I said, I haven't tested this, but I can see a possible problem, as the units created join "grpNull" (a non-existant group), which may cause issues with the "createUnit" command. If it does, try the procedure bellow: 1. Create a gameLogic and group a unit with 0 probability of presence to it. 2. In the init line of the logic type, "grp1 = group this". 3. Replace the "grpNull" in the script with "grp1". 4. Just before you end the script, add the line: _unit join grpNull 5. Then you can choose which group to place the units in by (after the first code): _unit join <Insert group here> Hope it helps -
So which video game actually had the best AI?
kyfohatl replied to BF2_Trooper's topic in OFFTOPIC - Games & Gaming
Same here. I also experienced this problem with DOW. This is a strange experience that I get with almost all RTS games (maybe with the exception of a couple like WIC). I don't know why it's such a common problem. As I said, the worst case was Command and Conquer's General; the AI was very active for the first 20 or so minutes of them game, and then all of a sudden, they'd stop doing stuff... just when I had completed getting upgrades and began proper assault (against a non existing force because the AI stopped making units). @Ben_s: So true. The most noticible example for me was Tiberium Wars (C&C 3). Played it on easy/normal and the AI was good for the first 15 to 20 minutes, and if you managed to hold them off for that long, they were VERY easy to beat. Then I switched to hard, and all I can say is that the stream of enemy hording my base was LITERALY NON-STOP. Doesn't matter what I did, or how many of them I massacared using good tactics, more and more kept coming. Then I had a look at the minimap and I could see a line consisting purely of enemy units going straight from their base to mine (they were all top-of-the-range and expensive units too). I played a few more times and the same thing happened, even when I had TWO normal AI's assisting me. So I got frustrated and stopped playing. I must say, just as you pointed out, that the AI seemed very badly balanced. I mean, the jump from normal difficulty to hard was huge. Normal was no challenge, and then hard was... impossible to hold off even for 20 minutes (at least for me). -
Making convoy move in a line?
kyfohatl replied to ray243's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Actually, it isn't too hard to get that. I just used CyOp's advice about turning the convoy into individual groups rather than one large group, and then placed conditions on the waypoints for each unit, like: this distance LeadCar > 20 and then for the next car: this distance LeadCar > 40 It worked beautifuly. Though I did use "this forceSpeed (getSpeed LeadCar)" a couple of times... -
Overriding waypoint behavior when shot at?
kyfohatl replied to Cookieeater's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Yeah, but even if you do set their behaviour to CARELESS, they should really notice when their friend/leader gets shot. I can confirm your observations... I've noticed it a few times as well, but with vanilla AI, which sometimes seems to be a bit slow to react. A typical example of this is an ambush situation, where you can take down several enemies before you see any effective reaction from them. However, this problem seems to be fixed by the Zeus AI Combat Skills mod. Cookieeater, if you haven't tried it, I strongly recommend this mod; it makes the AI feel much more dynamic and smarter. Here's the link: http://forums.bistudio.com/showthread.php?t=89970 Give it a try! Cheers -
Overriding waypoint behavior when shot at?
kyfohatl replied to Cookieeater's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Yes, just like what CyOp said, the AI will change behaviour automatically when being shot at, and will return fire/run (or even retreat in some circumstances). Just one more thing. Make sure that waypoint's combat mode is not set to "NEVER FIRE" or "HOLD FIRE", as they won't (obviously) return fire then. -
Empty vehicle removal?
kyfohatl replied to Jurugi's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I would also be interested in this, just for the sake of learning how to deal with unnamed units in a script, and how to identify them given that they have something in common (e.g. they are empty vehicles). My way of doing this would be to create a trigger that spans all across the map, set to activation by "ANYBODY" and "PRESENT" and the init line of: VehicleDeleteFunc = thisList execVM "EmptyVehicleRemoval.sqf" And in "EmptyVehicleRemoval.sqf" (a bit of a "one-liner", I know): private ["_unitList","_unitType","_N0Crew"]; while {true} do { _unitList = _this; {_unitType = typeOf _x; if (_unitType isKindOf "LandVehicle") then { _N0Crew = count crew _x; if (_N0Crew == 0) then { deleteVehicle _x;};};} foreach _unitList; // Waits for half an hour sleep 1800; }; I've tested it and it works :). Though there are a few problems with it: 1. It removes the vehicle even if it has been only left empty for 2 seconds (though it shouldn't be too hard to put a time parameter in as well). 2. Vehicles that have no crew, or whose crew have dismounted work fine. However vehicles whose crew have been killed are not removed apparantly because dead people in a vehicle still count as crew (I think). So I guess if you change "count crew" to something else it might work. Also if you use an automatic body removal script (there's plenty of them here), this problem should be fixed because the bodies are removed. Hope it helps Regards kyfohatl -
Dynamic-AI-Creator (DAC) V3.0 released
kyfohatl replied to silola's topic in ARMA 2 & OA - ADDONS & MODS: COMPLETE
Would anyone please be able to help me with an adding custom waypoints problem? You know how you can create a game logic in a zone and attach some waypoints to it to integrate custom waypoints into the zone? To define which type of unit the waypoints are for, you have to use "this setdir x" where "x" is a number for the unit type. Is it possible to have one logic and set of waypoints that are for more than one type of unit? i.e. make one logic with some waypoints attached, but tracked, wheeled and infantry units be able t use them? I tried the code below in the init box of the logic, but I'm not sure if it works (I get red waypoints): Thanks for any help :) -
Add MAP to each unit in init - How?
kyfohatl replied to Wastelander's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Oops... FAIL. FPDR FPDR FPDR.. :o Ok, here's what it should've been: this addWeapon "ItemMap" Also edited first post to try and clean up this embarassment... Cheers -
Add MAP to each unit in init - How?
kyfohatl replied to Wastelander's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I have a bit of difficulty understanding what you want. But: If you want to start the game with the map on the screen, then simply use: forceMap true And to deactivate it simply: forceMap false If you just want to give some units a map, then put this in their init box: this addWeapon "ItemMap" ...or have I missunderstood your request completely? -
Just asking: How to order team AI to walk/patrol?
kyfohatl replied to bullman's topic in ARMA 2 & OA - GENERAL
Now I don't know about setting the behaviour of the patrolling units, but it seems to me that what you are looking for is the HIGH COMMAND module. Simply place a "high command" and a "subordinate" module on the map, and synchronize the two together. Then synchronize the "high command" module to the player, and synchronize some units to the "Subordinates" module. That way, the player becomes the commander of all subbordinate groups and can issue commands to them. Here's the wiki page: http://community.bistudio.com/wiki/High_Command Have a quick read -
Oh, ok. This is the first time that I run across incorrect information in Wikipedia. My teachers always used to reject Wikipedia as a reference source for research, and I used to think they were just being fussy and pedantic... now I can see their point.
-
Now I have never played this game, so I can't have a definite opinion... but what you described there sounds very VERY similar to World In Conflict. I am a fan of realistic/detailed RTS, but I already have World In Coflict... So is MoW worth getting or should I just stick to WIC because their similar? I hope I don't sound like some ignorant fool trying to compare Harvest Moon with ArmA 2...
-
Just asking: How to order team AI to walk/patrol?
kyfohatl replied to bullman's topic in ARMA 2 & OA - GENERAL
I think this question should be asked here (the mission editing and scripting section): http://forums.bistudio.com/forumdisplay.php?f=93 Anyway, I'm not sure how much experience you have with mission editing, but let me recommend this guide to you: http://www.armaholic.com/page.php?id=4847 It's for ArmA 1, but most of the stuff in there applies to ArmA 2 as well (thankfully there's an ArmA 2 version is coming out as well). It is by far THE BEST mission editing guide for ArmA, and it goes to a high level of detail whilst maintaining a noob friendly format. Check it out. -
Yeah, and havock physic according to wikipedia (quote): I was just reading about that actually. Here's the wikipedia quote about the game's reception (I don't know reliable it is in this case): Though again, as I said, I don't know how reliable that is. I mean, I remember ArmA 2 being critisized on several occasions by the "casual gaming community" for being "too hard" and having an "unfair" AI (don't ask me for quotes on this, I can't remember where I red these because it was a year ago), but I think we all agree that that's just a load of bull. So, to anyone who has played the game: how do you find the AI?
-
Delete trigger should this work ?
kyfohatl replied to 1para{god-father}'s topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I wouldn't bother with deleting the trigger if I were you. Why don't you place a trigger, and set the condition to: this AND alive Antenna_1 Set the parameters to BLUFOR and PRESENT, and set Timeout to 60 for min, mid and max (I think you're problem is that your using Countdown instead of Timeout). Then just synch the trigger to the waypoint and it should work fine. So if you do not destroy the Antenna in 60 sec, armor will come. Another method that I've used is deleteWaypoint. That way you can just delete the waypoint for the armors. Here's the wiki page for it: http://community.bistudio.com/wiki/deleteWaypoint Hope it helps -
Thanks. I must say it doesn't look too bad. I really liked the AI and judging from that video, it seems pretty smart.
-
Oh sorry, I got confused by what you actually wanted. So what you want to do is to define the group types each faction spawns... am I right, or am I missing the point again? Anyway, I think that what you've got in you're second post should work fine: [bIS_ACM1, ["TK_InfantrySquad", "TK_InfantrySection", "TK_InfantrySectionAT", "TK_InfantrySectionAA", "TK_InfantrySectionMG", "TK_SniperTeam", "TK_SpecialPurposeSquad", "TK_MotorizedPatrol", "TK_MotorizedPatrol", "Mi24_D_TK_EP1", "Mi17_TK_EP1", "UH1H_TK_EP1", "LandRover_MG_TK_EP1", "V3S_TK_EP1", "Ural_ZU23_TK_EP1", "LandRover_SPG9_TK_EP1"]] call BIS_ACM_addGroupClassesFunc; I think I got this working somehow ages ago. I'll look through my scripts and play around a little to see if I can remember how. EDIT: Ahhh, sorry, I think I got something else working, but failed to get this one to work (my memory is a bit vague). Sorry that I can't help.
-
Random vehicle script
kyfohatl replied to nkenny's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
An alternative solution (haven't tested): waitUntil {!isNill "BIS_fnc_init"}; _choice = ["panzer","truck","car"] call BIS_fnc_selectRandom; priest moveInCargo _choice; Only a minor difference, but I just wanted to point out that it is easier to use "BIS_fnc_selectRandom" Cheers -
Yes, its possible. Please search, because there are already tons of thread with this question asked... Anyway, enough with the nagging. Goto this thread: http://forums.bistudio.com/showthread.php?t=108928&highlight=ACM Look under my post, and there you can find a reletively detailed answere on how to use ACM and how to define the faction that you want to have appearing. Cheers
-
Can you spot the error in this script?
kyfohatl replied to kyfohatl's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
You mean an example mission? Because I was going to release this as a part of my mission (so don't worry, I will uploead one eventually :)). It's actually a very fun script, and pretty easy to use, and all you need to do is to attach it to a few towns, add a couple of DAC zones (you juts have to place a couple of markers and change a few things), then you're set and you'll have a pretty dynamic battle. I will also edit the first post with my final version of the script soon. Cheers -
Can you spot the error in this script?
kyfohatl posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
This script is an altered version of Klomain's useful urban patrol script (thanks Klomain!). Basicaly, it scans a town using a trigger for the faction with the strongest presense (a script I wrote a while ago with the help of the community), then it spawns a group of reinforcements and some patrols for that city. The reinforcements group then joins the DAC zone for that faction and becomes a part of a large DAC battle that expands over a large part of the map: The script is called via a trigger that is placed directly over the town, with Activation set to "ANYBODY" and "PRESENT", and with a condition of time > 60 (time needed for DAC to initiate). In the onActivation box: MyProcedure = [city,thisList] execVM "CityPatrol.sqf" Where "city" is the name of the marker placed directy on the town. Here is CityPatrol.sqf (NOTE: both scripts have copied across to this post a bit strangely, so sometimes there are some extra line spacings that aren't there in the original script): private ["_unitList","_factionList","_N0CDF","_N0USMC","_N0RU","_N0GUE","_classCDF","_classUS MC","_classRU","_classGUE","_Patrolgrp1","_Patrolgrp2","_Patrolgrp3","_Patrolgrp4","_ Patrolgrp5","_Patrolgrp6","_Patrolgrp7","_Patrolgrp8","_Patrolgrp9","_Patrolgrp9","_P atrolgrp10","_Patrolgrp11","_Patrolgrp12","_classRandom","_CDF","_USMC","_RU","_GUE", "_rulingFaction","_city"]; waitUntil {!isNil "BIS_func_init"}; sleep 1; hint format ['Script']; _city = _this select 0; _CDF = 1; _USMC = 2; _RU = 3; _GUE = 4; _rulingFaction = 5; // Chooses random class reinforcements _classRandom = ["Infantry","Mechanized","Motorized","Armored"] call BIS_fnc_selectRandom; // Loop every 60 sec while {true} do { // Count N0 units per faction _unitList = _this select 1; _factionList = []; {_factionList = _factionList + [(faction _x)]} foreach _unitList; _N0CDF = {_x == 'CDF'} count _factionList; _N0USMC = {_x == 'USMC'} count _factionList; _N0RU = {_x == 'RU'} count _factionList; _N0GUE = {_x == 'GUE'} count _factionList; // Checks for dominating faction if ((_N0CDF > _N0USMC) AND (_N0CDF > _N0RU) AND (_N0CDF > _N0GUE)) then { // Spawns reinforcements Reinforcements = [_CDF,_classRandom,_city] execVM "Reinforcements.sqf"; // Check to see if this faction is not already the ruling faction if (_rulingFaction != _CDF) then { // Creates patrols _classCDF = ["CDF_InfSquad","CDF_InfSquad_Weapons","CDF_InfSection_AT","CDF_InfSection_Patrol"]; call BIS_fnc_selectRandom; _Patrolgrp1 = [getMarkerPos _city, WEST, (configFile >> "CfgGroups" >> "West" >> "CDF" >> "Infantry" >> _classCDF)] call BIS_fnc_spawnGroup; [_patrolgrp1, getMarkerPos _city, 150] call BIS_fnc_taskPatrol; _patrolgrp2 = [getMarkerPos _city, WEST, (configFile >> "CfgGroups" >> "West" >> "CDF" >> "Infantry" >> _classCDF)] call BIS_fnc_spawnGroup; [_patrolgrp2, getMarkerPos _city, 150] call BIS_fnc_taskPatrol; _patrolgrp3 = [getMarkerPos _city, WEST, (configFile >> "CfgGroups" >> "West" >> "CDF" >> "Infantry" >> _classCDF)] call BIS_fnc_spawnGroup; [_patrolgrp3, getMarkerPos _city] call BIS_fnc_taskDefend; }; }; if ((_N0USMC > _N0CDF) AND (_N0USMC > _N0RU) AND (_N0USMC > _N0GUE)) then { Reinforcements = [_USMC,_classRandom,_city] execVM "Reinforcements.sqf"; If (_rulingFaction != _USMC) then { _classUSMC = ["USMC_InfSquad","USMC_FireTeam","USMC_FireTeam_AT","USMC_FireTeam_MG","USMC_FireTeam_Support","USMC_HeavyATTeam"] call BIS_fnc_selectRandom; _Patrolgrp4 = [getMarkerPos _city, WEST, (configFile >> "CfgGroups" >> "West" >> "USMC" >> "Infantyry" >> _classUSMC)] call BIS_fnc_spawnGroup; [_patrolgrp4, getMarkerPos _city, 150] call BIS_fnc_taskPatrol; _patrolgrp5 = [getMarkerPos _city, WEST, (configFile >> "CfgGroups" >> "West" >> "USMC" >> "Infantyry" >> _classUSMC)] call BIS_fnc_spawnGroup; [_patrolgrp5, getMarkerPos _city, 150] call BIS_fnc_taskPatrol; _patrolgrp6 = [getMarkerPos _city, WEST, (configFile >> "CfgGroups" >> "West" >> "USMC" >> "Infantyry" >> _classUSMC)] call BIS_fnc_spawnGroup; [_patrolgrp6, getMarkerPos _city] call BIS_fnc_taskDefend; }; }; if ((_N0Ru > _N0USMC) AND (_N0RU > _N0CDF) AND (_N0RU > _N0GUE)) then { Reinforcements = [_RU,_classRandom,_city] execVM "Reinforcements.sqf"; If (_rulingFaction != _RU) then { _classRU = ["RU_InfSquad","RU_InfSection","RU_InfSection_AT","RU_InfSection_MG"] call BIS_fnc_selectRandom; _Patrolgrp7 = [getMarkerPos _city, EAST, (configFile >> "CfgGroups" >> "EAST" >> "RU" >> "Infantry" >> _classRU)] call BIS_fnc_spawnGroup; [_patrolgrp7, getMarkerPos _city, 150] call BIS_fnc_taskPatrol; _patrolgrp8 = [getMarkerPos _city, EAST, (configFile >> "CfgGroups" >> "EAST" >> "RU" >> "Infantry" >> _classRU)] call BIS_fnc_spawnGroup; [_patrolgrp8, getMarkerPos _city, 150] call BIS_fnc_taskPatrol; _patrolgrp9 = [getMarkerPos _city, EAST, (configFile >> "CfgGroups" >> "EAST" >> "RU" >> "Infantry" >> _classRU)] call BIS_fnc_spawnGroup; [_patrolgrp9, getMarkerPos _city] call BIS_fnc_taskDefend; }; }; if ((_N0GUE > _N0USMC) AND (_N0GUE > _N0CDF) AND (_N0GUE > _N0RU)) then { Reinforcements = [_GUE,_classRandom,_city] execVM "Reinforcements.sqf"; If (_rulingFaction != _GUE) then { _classGUE = ["GUE_InfSquad","GUE_InfSquad_Assault","GUE_InfSquad_Weapons","GUE_InfTeam_1","GUE_InfTeam_2","GUE_InfTeam_AT"]; _Patrolgrp10 = [getMarkerPos _city, RESISTANCE, (configFile >> "CfgGroups" >> "RESISTANCE" >> "GUE" >> "Infantry" >> _classGUE)] call BIS_fnc_spawnGroup; [_patrolgrp10, getMarkerPos _city, 150] call BIS_fnc_taskPatrol; _patrolgrp11 = [getMarkerPos _city, RESISTANCE, (configFile >> "CfgGroups" >> "RESISTANCE" >> "GUE" >> "Infantry" >> _classGUE)] call BIS_fnc_spawnGroup; [_patrolgrp11, getMarkerPos _city, 150] call BIS_fnc_taskPatrol; _patrolgrp12 = [getMarkerPos _city, RESISTANCE, (configFile >> "CfgGroups" >> "RESISTANCE" >> "GUE" >> "Infantry" >> _classGUE)] call BIS_fnc_spawnGroup; [_patrolgrp12, getMarkerPos _city] call BIS_fnc_taskDefend; }; }; sleep 60; }; And here's Reinforcements.sqf: // Script to generate reinforcements private ["_faction","_classType","_InfCDF","_MotCDF","_MechCDF","_InfUSMC","_MotUSMC","_MechU SMC","_InfRU","_MotRU","_MechRU","_InfGUE","_MotGUE","_MechGUE","_grp1","_grp2","_grp 3","_grp4","_grp5","_grp6","_grp7","_grp8","_grp9","_grp10","_grp11","_grp12","_grp13 ","_grp14","_grp15","_grp16","_CDF","_USMC","_RU","_GUE","_city"]; _faction = _this select 0; _classType = _this select 1; _city = _this select 2; _CDF = 1; _USMC = 2; _RU = 3; _GUE = 4; ///////////////////////////////////////////////////////////////////////////////////// ///// //CDF // Checks for faction if (_faction == _CDF) then { // Checks for class type switch (_classType) do { case "Infantry": { // Randomizes class type _InfCDF = ["CDF_InfSquad","CDF_InfSquad_Weapons","CDF_InfSection_AT","CDF_InfSection_AA","CDF_I nfSection_MG","CDF_InfSection_Patrol","CDF_SniperTeam"] call BIS_fnc_selectRandom; _grp1 = [getMarkerPos _city, WEST, (configFile >> "CfgGroups" >> "West" >> "CDF" >> "Infantry" >> _InfCDF)] call BIS_fnc_spawnGroup; [_grp1,1,[z2],20,1,1,[1,1,1],0,false] spawn DAC_fInsertGroup; }; case "Motorized": { _MotCDF = ["CDF_MotInfSquad","CDF_MotInfSection","CDF_MotInfSection_Weapons"] call BIS_fnc_selectRandom; _grp2 = [getMarkerPos _city, WEST, (configFile >> "CfgGroups" >> "West" >> "CDF" >> "Motorized" >> _MotCDF)] call BIS_fnc_spawnGroup; [_grp2,2,[z2],20,1,1,[1,1,1],0,false] spawn DAC_fInsertGroup; }; case "Mechanized": { _MechCDF = ["CDF_MechInfSquad","CDF_MechReconSection","CDF_MechATSection"] call BIS_fnc_selectRandom; _grp3 = [getMarkerPos _city, WEST, (configFile >> "CfgGroups" >> "West" >> "CDF" >> "Mechanized" >> _MechCDF)] call BIS_fnc_spawnGroup; [_grp3,2,[z2],20,1,1,[1,1,1],0,false] spawn DAC_fInsertGroup; }; case "Armored": { _grp4 = [getMarkerPos _city, WEST, (configFile >> "CfgGroups" >> "West" >> "CDF" >> "Armored" >> "CDF_TankPlatoon")] call BIS_fnc_spawnGroup; [_grp4,3,[z2],20,1,1,[1,1,1],0,false] spawn DAC_fInsertGroup; }; }; }; ///////////////////////////////////////////////////////////////////////////////////// //// //USMC if (_faction == _USMC) then { // Checks for class type switch (_classType) do { case "Infantry": { // Randomizes class type _InfUSMC = ["USMC_InfSquad","USMC_FireTeam","USMC_FireTeam_MG","USMC_FireTeam_AT","USMC_FireTeam _Support","USMC_HeavyATTeam","USMC_SniperTeam","USMC_FRTeam"] call BIS_fnc_selectRandom; _grp5 = [getMarkerPos _city, WEST, (configFile >> "CfgGroups" >> "West" >> "USMC" >> "Infantry" >> _InfUSMC)] call BIS_fnc_spawnGroup; [_grp5,1,[z3],20,1,1,[1,1,1],0,false] spawn DAC_fInsertGroup; }; case "Motorized": { _MotUSMC = ["USMC_MotInfSection","USMC_MotInfSection_AT"] call BIS_fnc_selectRandom; _grp6 = [getMarkerPos _city, WEST, (configFile >> "CfgGroups" >> "West" >> "USMC" >> "Motorized" >> _MotUSMC)] call BIS_fnc_spawnGroup; [_grp6,2,[z3],20,1,1,[1,1,1],0,false] spawn DAC_fInsertGroup; }; case "Mechanized": { _MechUSMC = ["USMC_MechInfSquad","USMC_MechReconSection"] call BIS_fnc_selectRandom; _grp7 = [getMarkerPos _city, WEST, (configFile >> "CfgGroups" >> "West" >> "USMC" >> "Mechanized" >> _MechUSMC)] call BIS_fnc_spawnGroup; [_grp7,2,[z3],20,1,1,[1,1,1],0,false] spawn DAC_fInsertGroup; }; case "Armored": { _grp8 = [getMarkerPos _city, WEST, (configFile >> "CfgGroups" >> "West" >> "USMC" >> "Armored" >> "USMC_TankPlatoon")] call BIS_fnc_spawnGroup; [_grp8,3,[z3],20,1,1,[1,1,1],0,false] spawn DAC_fInsertGroup; }; }; }; ///////////////////////////////////////////////////////////////////////////////////// //// //RU if (_faction == _RU) then { // Checks for class type switch (_classType) do { case "Infantry": { // Randomizes class type _InfRU = ["RU_InfSquad","RU_InfSection","RU_InfSection_AT","RU_InfSection_AA","RU_InfSection_M G","RU_SniperTeam","RUS_ReconTeam","MVD_AssaultTeam"] call BIS_fnc_selectRandom; _grp9 = [getMarkerPos _city, EAST, (configFile >> "CfgGroups" >> "East" >> "RU" >> "Infantry" >> _InfRU)] call BIS_fnc_spawnGroup; [_grp9,1,[z1],20,0,1,[1,1,1],0,false] spawn DAC_fInsertGroup; }; case "Motorized": { _MotRU = ["RU_MotInfSquad","RU_MotInfSection_Recon","RU_MotInfSection_Patrol"] call BIS_fnc_selectRandom; _grp10 = [getMarkerPos _city, EAST, (configFile >> "CfgGroups" >> "East" >> "RU" >> "Motorized" >> _MotRU)] call BIS_fnc_spawnGroup; [_grp10,2,[z1],20,0,1,[1,1,1],0,false] spawn DAC_fInsertGroup; }; case "Mechanized": { _MechRU = ["RU_MechInfSquad_1","RU_MechInfSquad_2"] call BIS_fnc_selectRandom; _grp11 = [getMarkerPos _city, EAST, (configFile >> "CfgGroups" >> "East" >> "RU" >> "Mechanized" >> _MechRU)] call BIS_fnc_spawnGroup; [_grp11,2,[z1],20,0,1,[1,1,1],0,false] spawn DAC_fInsertGroup; }; case "Armored": { _grp12 = [getMarkerPos _city, EAST, (configFile >> "CfgGroups" >> "East" >> "RU" >> "Armored" >> "RU_TankPlatoon")] call BIS_fnc_spawnGroup; [_grp12,3,[z1],20,0,1,[1,1,1],0,false] spawn DAC_fInsertGroup; }; }; }; ///////////////////////////////////////////////////////////////////////////////////// //// //GUE if (_faction == _GUE) then { // Checks for class type switch (_classType) do { case "Infantry": { // Randomizes class type _InfGUE = ["GUE_InfSquad","GUE_InfSquad_Assault","GUE_InfSquad_Weapons","GUE_InfTeam_1","GUE_InfTeam_2","GUE_InfTeam_AT","GUE_GrpInf_TeamAA","GUE_GrpInf_TeamSniper"] call BIS_fnc_selectRandom; _grp13 = [getMarkerPos _city, RESISTANCE, (configFile >> "CfgGroups" >> "RESISTANCE" >> "GUE" >> "Infantry" >> _InfGUE)] call BIS_fnc_spawnGroup; [_grp13,1,[z4],20,2,1,[1,1,1],0,false] spawn DAC_fInsertGroup; }; case "Motorized": { _MotGUE = ["GUE_MotInfSection","GUE_MotInfSquad"] call BIS_fnc_selectRandom; _grp14 = [getMarkerPos _city, RESISTANCE, (configFile >> "CfgGroups" >> "RESISTANCE" >> "GUE" >> "Motorized" >> _MotGUE)] call BIS_fnc_spawnGroup; [_grp14,2,[z4],20,2,1,[1,1,1],0,false] spawn DAC_fInsertGroup; }; case "Mechanized": { _MechGUE = ["GUE_MechInfSection","GUE_MechInfSquad"] call BIS_fnc_selectRandom; _grp15 = [getMarkerPos _city, RESISTANCE, (configFile >> "CfgGroups" >> "RESISTANCE" >> "GUE" >> "Mechanized" >> _MechGUE)] call BIS_fnc_spawnGroup; [_grp15,2,[z4],20,2,1,[1,1,1],0,false] spawn DAC_fInsertGroup; }; case "Armored": { _MechGUE = ["GUE_MechInfSection","GUE_MechInfSquad"] call BIS_fnc_selectRandom; _grp16 = [getMarkerPos _city, RESISTANCE, (configFile >> "CfgGroups" >> "RESISTANCE" >> "GUE" >> "Mechanized" >> _MechGUE)] call BIS_fnc_spawnGroup; [_grp16,2,[z4],20,2,1,[1,1,1],0,false] spawn DAC_fInsertGroup; }; }; }; ...and for some reason it doesn't work. I've tried most part of my script individually, and they work fine, but together they don't. For example creating a patrol group on player's position as an individual script, or inserting some editor placed units into DAC work fine alone. Also note that I've added "hint format ['Script']" at the start of the script to note the player that the script is runing. But for some reason the hint never appears, even though BIS_fnc_init intializes fine (I've tested it). I've also checked both scripts using squint, and here's what it tells me: For CityPatrol.sqf: But it identifies this problem ONLY with the GUERILLA and the CDF, so the config lines for USMC and RUSSIA are apparantly correct. For reinforcements.sqf: The in-game script error finder tells me nothing though... Also, I personally think that error might have something to do with the "switch" I'm using: Maybe because the variable Infantry has quotation marks around it and it's not supossed to? Thanks in advance for any help. -
Its plays at the beggining of the triler. Here's the link to the trialer: So.. anyone know the name (the song that plays at the start, not the later one).
-
Can you spot the error in this script?
kyfohatl replied to kyfohatl's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Excellent, it worked Thank you very much nuxil.. Ok, I'm going to change the title of this thread so that people searching for a script like this later on can find it. ...Noobish question: Is there a way to change the title? -
Can you spot the error in this script?
kyfohatl replied to kyfohatl's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I GOT IT WORKING (after many corrections)... Except for the Independents :(. But the script for spawning units for independents is pretty much a copy and paste of the previous ones with some changes to class names. So I don't know why it's not working. Here are the scripts: For CityPatrol.sqf: private ["_CDF","_USMC","_RU","_GUE","_rulingFaction","_classRandom","_unitList","_factionList ","_N0CDF","_N0USMC","_N0RU","_N0GUE","_classCDF","_classUSMC","_classRU","_classGUE", "_patrolgrp1","_patrolgrp2","_patrolgrp3","_patrolgrp4","_patrolgrp5","_patrolgrp6","_ patrolgrp7","_patrolgrp8"]; WaitUntil {!isNil "BIS_fnc_init"}; // Waits for DAC to initialize sleep 20; _CDF = 1; _USMC = 2; _RU = 3; _GUE = 4; _rulingFaction = 5; // Loop while {true} do { // Randomizes class types for reinforcements _classRandom = ["Infantry","Motorized","Mechanized"] call BIS_fnc_selectRandom; // Finds the faction with the greates number of forces in the trigger area _unitList = _this; _factionList = []; {_factionList = _factionList + [(faction _x)]} foreach _unitList; _N0CDF = {_x == 'CDF'} count _factionList; _N0USMC = {_x == 'USMC'} count _factionList; _N0RU = {_x == 'RU'} count _factionList; _N0GUE = {_x == 'GUE'} count _factionList; ////////////////////////////////////////////////////////////////////////////////////// // CDF if ((_N0CDF > _N0USMC) AND (_N0CDF > _N0RU) AND (_N0CDF > _N0GUE)) then { // Spawn some reinforcements that will join the battle on the side of the faction Reinforcements = [_classRandom,_CDF] execVM "Reinforcements.sqf"; // Checks to see if this faction is not already controling the area if (_rulingFaction != _CDF) then { sleep 20; // Spawns some patrols the first time a faction captures the town _ClassCDF = ["CDF_InfSquad","CDF_InfSquad_Weapons","CDF_InfSection_AT","CDF_InfSection_Patrol"] call BIS_fnc_selectRandom; _patrolgrp1 = [getMarkerPos "city", WEST, (configFile >> "cfgGroups" >> "West" >> "CDF" >> "Infantry" >> _classCDF)] call BIS_fnc_spawnGroup; [_patrolgrp1, getMarkerPos "city", 150] call BIS_fnc_taskPatrol; _patrolgrp2 = [getMarkerPos "city", WEST, (configFile >> "cfgGroups" >> "West" >> "CDF" >> "Infantry" >> _classCDF)] call BIS_fnc_spawnGroup; [_patrolgrp2, getMarkerPos "city", 150] call BIS_fnc_taskPatrol; _rulingFaction = _CDF; }; }; ////////////////////////////////////////////////////////////////////////////////////// // USMC if ((_N0USMC > _N0CDF) AND (_N0USMC > _N0RU) AND (_N0USMC > _N0GUE)) then { Reinforcements = [_classRandom,_USMC] execVM "Reinforcements.sqf"; if (_rulingFaction != _USMC) then { sleep 20; _ClassUSMC = ["USMC_InfSquad","USMC_FireTeam","USMC_FireTeam_AT","USMC_FireTeam_MG","USMC_FireTeam_ Support","USMC_HeavyATTeam"] call BIS_fnc_selectRandom; _patrolgrp3 = [getMarkerPos "city", WEST, (configFile >> "cfgGroups" >> "West" >> "USMC" >> "Infantry" >> _classUSMC)] call BIS_fnc_spawnGroup; [_patrolgrp3, getMarkerPos "city", 150] call BIS_fnc_taskPatrol; _patrolgrp4 = [getMarkerPos "city", WEST, (configFile >> "cfgGroups" >> "West" >> "USMC" >> "Infantry" >> _classUSMC)] call BIS_fnc_spawnGroup; [_patrolgrp4, getMarkerPos "city", 150] call BIS_fnc_taskPatrol; _rulingFaction = _USMC; }; }; ////////////////////////////////////////////////////////////////////////////////////// // RU if ((_N0RU > _N0USMC) AND (_N0RU > _N0CDF) AND (_N0RU > _N0GUE)) then { Reinforcements = [_classRandom,_RU] execVM "Reinforcements.sqf"; if (_rulingFaction != _RU) then { sleep 20; _ClassRU = ["RU_InfSquad","RU_InfSection","RU_InfSection_AT","RU_InfSection_MG"] call BIS_fnc_selectRandom; _patrolgrp5 = [getMarkerPos "city", EAST, (configFile >> "cfgGroups" >> "East" >> "RU" >> "Infantry" >> _classRU)] call BIS_fnc_spawnGroup; [_patrolgrp5, getMarkerPos "city", 150] call BIS_fnc_taskPatrol; _patrolgrp6 = [getMarkerPos "city", EAST, (configFile >> "cfgGroups" >> "East" >> "RU" >> "Infantry" >> _classRU)] call BIS_fnc_spawnGroup; [_patrolgrp6, getMarkerPos "city", 150] call BIS_fnc_taskPatrol; _rulingFaction = _RU; }; }; ////////////////////////////////////////////////////////////////////////////////////// // GUE if ((_N0GUE > _N0USMC) AND (_N0GUE > _N0CDF) AND (_N0GUE > _N0RU)) then { Reinforcements = [_classRandom,_GUE] execVM "Reinforcements.sqf"; if (_rulingFaction != _GUE) then { sleep 20; _ClassGUE = ["GUE_InfSquad","GUE_InfSquad_Assault","GUE_InfSquad_Weapons","GUE_InfTeam_1","GUE_Inf Team_2","GUE_InfTeam_AT"] call BIS_fnc_selectRandom; _patrolgrp7 = [getMarkerPos "city", RESISTANCE, (configFile >> "cfgGroups" >> "Resistance" >> "GUE" >> "Infantry" >> _classGUE)] call BIS_fnc_spawnGroup; [_patrolgrp7, getMarkerPos "city", 150] call BIS_fnc_taskPatrol; _patrolgrp8 = [getMarkerPos "city", RESISTANCE, (configFile >> "cfgGroups" >> "Resistance" >> "GUE" >> "Infantry" >> _classGUE)] call BIS_fnc_spawnGroup; [_patrolgrp8, getMarkerPos "city", 150] call BIS_fnc_taskPatrol; _rulingFaction = _GUE; }; }; sleep 180; }; And "Reinforcements.sqf": private ["_CDF", "_USMC", "_RU", "_GUE", "_classType", "_faction", "_InfCDF", "_InfUSMC", "_InfRU", "_InfGUE", "_MechCDF", "_MechUSMC", "_MechRU", "_MechGUE", "_MotCDF", "_MotUSMC", "_MotRU", "_MotGUE", "_grp1", "_grp2", "_grp3", "_grp4", "_grp5", "_grp6", "_grp7", "_grp8", "_grp9", "_grp10", "_grp11", "_grp12", "_grp13", "_grp14", "_grp15"]; // The reinforcements spawned are of random class and type. This script basically does this _CDF = 1; _USMC = 2; _RU = 3; _GUE = 4; _classType = _this select 0; _faction = _this select 1; sleep 1; ////////////////////////////////////////////////////////////////////////////////////// // CDF If (_faction == _CDF) then { switch (_classType) do { case "Infantry": { _InfCDF = ["CDF_InfSquad","CDF_InfSquad_Weapons","CDF_InfSection_AT","CDF_InfSection_AA","CDF_InfSection_Patrol","CDF_InfSection_MG","CDF_SniperTeam"] call BIS_fnc_selectRandom; _grp1 = [getMarkerPos "city", WEST, (configFile >> "cfgGroups" >> "West" >> "CDF" >> "Infantry" >> _InfCDF)] call BIS_fnc_spawnGroup; // Causes the spawned reinforcements to join the DAC zone "z1" [_grp1,1,[z1],10,1,1,[1,1,1],0,false] spawn DAC_fInsertGroup; }; case "Motorized": { _MotCDF = ["CDF_MotInfSquad","CDF_MotInfSection","CDF_MotInfSection_Weapons"] call BIS_fnc_selectRandom; _grp2 = [getMarkerPos "city", WEST, (configFile >> "cfgGroups" >> "West" >> "CDF" >> "Motorized" >> _MotCDF)] call BIS_fnc_spawnGroup; [_grp2,2,[z1],10,1,1,[1,1,1],0,false] spawn DAC_fInsertGroup; }; case "Mechanized": { _MechCDF = ["CDF_MechInfSquad","CDF_MechReconSection","CDF_MechATSection"] call BIS_fnc_selectRandom; _grp3 = [getMarkerPos "city", WEST, (configFile >> "cfgGroups" >> "West" >> "CDF" >> "Mechanized" >> _MechCDF)] call BIS_fnc_spawnGroup; [_grp3,2,[z1],10,1,1,[1,1,1],0,false] spawn DAC_fInsertGroup; }; case "Armored": { _grp4 = [getMarkerPos "city", WEST, (configFile >> "CfgGroups" >> "West" >> "CDF" >> "Armored" >> "CDF_TankPlatoon")] call BIS_fnc_spawnGroup; [_grp4,3,[z1],10,1,1,[1,1,1],0,false] spawn DAC_fInsertGroup; }; };}; ////////////////////////////////////////////////////////////////////////////////////// // USMC If (_faction == _USMC) then { switch (_classType) do { case "Infantry": { _InfUSMC = ["USMC_InfSquad","USMC_FireTeam","USMC_FireTeam_MG","USMC_FireTeam_AT","USMC_FireTeam_Support","USMC_HeavyATTeam","USMC_SniperTeam","USMC_FRTeam"] call BIS_fnc_selectRandom; _grp5 = [getMarkerPos "city", WEST, (configFile >> "cfgGroups" >> "West" >> "USMC" >> "Infantry" >> _InfUSMC)] call BIS_fnc_spawnGroup; [_grp5,1,[z1],10,1,1,[1,1,1],0,false] spawn DAC_fInsertGroup; }; case "Motorized": { _MotUSMC = ["USMC_MotInfSection","USMC_MotInfSection_AT"] call BIS_fnc_selectRandom; _grp6 = [getMarkerPos "city", WEST, (configFile >> "cfgGroups" >> "West" >> "USMC" >> "Motorized" >> _MotUSMC)] call BIS_fnc_spawnGroup; [_grp6,2,[z1],10,1,1,[1,1,1],0,false] spawn DAC_fInsertGroup; }; case "Mechanized": { _MechUSMC = ["USMC_MechInfSquad","USMC_MechReconSection"] call BIS_fnc_selectRandom; _grp7 = [getMarkerPos "city", WEST, (configFile >> "cfgGroups" >> "West" >> "USMC" >> "Mechanized" >> _MechUSMC)] call BIS_fnc_spawnGroup; [_grp7,2,[z1],10,1,1,[1,1,1],0,false] spawn DAC_fInsertGroup; }; case "Armored": { _grp8 = [getMarkerPos "city", WEST, (configFile >> "CfgGroups" >> "West" >> "USMC" >> "Armored" >> "USMC_TankPlatoon")] call BIS_fnc_spawnGroup; [_grp8,3,[z1],10,1,1,[1,1,1],0,false] spawn DAC_fInsertGroup; }; };}; ////////////////////////////////////////////////////////////////////////////////////// // RU If (_faction == _RU) then { switch (_classType) do { case "Infantry": { _InfRU = ["RU_InfSquad","RU_InfSection","RU_InfSection_AT","RU_InfSection_AA","RU_InfSection_MG","RU_SniperTeam","RUS_ReconTeam","MVD_AssaultTeam"] call BIS_fnc_selectRandom; _grp9 = [getMarkerPos "city", EAST, (configFile >> "cfgGroups" >> "East" >> "RU" >> "Infantry" >> _InfRU)] call BIS_fnc_spawnGroup; [_grp9,1,[z1],10,0,1,[1,1,1],0,false] spawn DAC_fInsertGroup; }; case "Motorized": { _MotRU = ["RU_MotInfSquad","RU_MotInfSection_Recon","RU_MotInfSection_Patrol"] call BIS_fnc_selectRandom; _grp10 = [getMarkerPos "city", EAST, (configFile >> "cfgGroups" >> "East" >> "RU" >> "Motorized" >> _MotRU)] call BIS_fnc_spawnGroup; [_grp10,2,[z1],10,0,1,[1,1,1],0,false] spawn DAC_fInsertGroup; }; case "Mechanized": { _MechRU = ["RU_MechInfSquad_1","RU_MechInfSquad_2"] call BIS_fnc_selectRandom; _grp11 = [getMarkerPos "city", EAST, (configFile >> "cfgGroups" >> "East" >> "RU" >> "Mechanized" >> _MechRU)] call BIS_fnc_spawnGroup; [_grp11,2,[z1],10,0,1,[1,1,1],0,false] spawn DAC_fInsertGroup; }; case "Armored": { _grp12 = [getMarkerPos "city", EAST, (configFile >> "CfgGroups" >> "East" >> "RU" >> "Armored" >> "RU_TankPlatoon")] call BIS_fnc_spawnGroup; [_grp12,3,[z1],10,0,1,[1,1,1],0,false] spawn DAC_fInsertGroup; }; };}; ////////////////////////////////////////////////////////////////////////////////////// // GUE If (_faction == _GUE) then { switch (_classType) do { case "Infantry": { _InfGUE = ["GUE_InfSquad","GUE_InfSquad_Assault","GUE_InfSquad_Weapons","GUE_InfTeam_1","GUE_InfTeam_2","GUE_InfTeam_AT","GUE_GrpInf_TeamAA","GUE_GrpInf_TeamSniper"] call BIS_fnc_selectRandom; _grp13 = [getMarkerPos "city", RESISTANCE, (configFile >> "cfgGroups" >> "Resistance" >> "GUE" >> "Infantry" >> _InfGUE)] call BIS_fnc_spawnGroup; [_grp13,1,[z1],10,2,1,[1,1,1],0,false] spawn DAC_fInsertGroup; }; case "Motorized": { _MotGUE = ["GUE_MotInfSection","GUE_MotInfSquad"] call BIS_fnc_selectRandom; _grp14 = [getMarkerPos "city", RESISTANCE, (configFile >> "cfgGroups" >> "Resistance" >> "GUE" >> "Motorized" >> _MotGUE)] call BIS_fnc_spawnGroup; [_grp14,2,[z1],10,2,1,[1,1,1],0,false] spawn DAC_fInsertGroup; }; case "Mechanized": { _MechGUE = ["GUE_MechInfSection","GUE_MechInfSquad"] call BIS_fnc_selectRandom; _grp15 = [getMarkerPos "city", RESISTANCE, (configFile >> "cfgGroups" >> "Resistance" >> "GUE" >> "Mechanized" >> _MechGUE)] call BIS_fnc_spawnGroup; [_grp15,2,[z1],10,2,1,[1,1,1],0,false] spawn DAC_fInsertGroup; }; };}; As I said, the guerilla (Independents) are the only ones that don't work. So if a set a trigger, the script will spawn units for the faction with the most forces in the trigger area, some of which will patrol the town and the rest will join the battle, except for the guerilla. Any help please? Oh, and "z1" is just a nuetral DAC zone with waypoints for all types of units, so anyone can join it. Thanks for your time. -
Can you spot the error in this script?
kyfohatl replied to kyfohatl's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
@sbsmac: Actually, the game's ingame script error finder tells me that "_classCDF" is a string. This is because I was testing it to see if it's an array, and the game told me: The reason why squint was warning me about an error was because I had accidentally placed a ";" somewhere in the script (relating to CDF) that wasn't a syntax error, but stuffed up the overall script. Anyway, I fixed that and now, so I get nor errors for CityPatrol.sqf when I put it in squint. I think the error is the marker's position. I tested it with the simple script bellow: _city = _this select 0 hint format ["%1", (getMarkerPos _city) And I execute it using "MyProcedure = [city] execVM "test.sqf" where "city" is the marker placed on the city. In game I get a hint, but the hint says, "array" repeatedly. I don't know what's wrong here. Oh, and by the way, great job with squint, it was very useful :). Here's the fixed version of CityPatrol.sqf (though it still doesn't work): private ["_unitList","_factionList","_N0CDF","_N0USMC","_N0RU","_N0GUE","_classCDF","_classUSMC","_classRU","_classGUE","_Patrolgrp1","_Patrolgrp2","_Patrolgrp3","_Patrolgrp4","_Patrolgrp5","_Patrolgrp6","_Patrolgrp7","_Patrolgrp8","_Patrolgrp9","_Patrolgrp9","_Patrolgrp10","_Patrolgrp11","_Patrolgrp12","_classRandom","_CDF","_USMC","_RU","_GUE","_rulingFaction","_city"]; waitUntil {!isNil "BIS_func_init"}; _city = _this select 0; _CDF = 1; _USMC = 2; _RU = 3; _GUE = 4; _rulingFaction = 5; // Chooses random class reinforcements _classRandom = ["Infantry","Mechanized","Motorized","Armored"] call BIS_fnc_selectRandom; // Loop every 60 sec while {true} do { // Count N0 units per faction _unitList = _this; _factionList = []; {_factionList = _factionList + [(faction _x)]} foreach _unitList; _N0CDF = {_x == 'CDF'} count _factionList; _N0USMC = {_x == 'USMC'} count _factionList; _N0RU = {_x == 'RU'} count _factionList; _N0GUE = {_x == 'GUE'} count _factionList; // Checks for dominating faction if ((_N0CDF > _N0USMC) AND (_N0CDF > _N0RU) AND (_N0CDF > _N0GUE)) then { // Spawns reinforcements Reinforcements = [_CDF,_classRandom,_city] execVM "Reinforcements.sqf"; // Check to see if this faction is not already the ruling faction if (_rulingFaction != _CDF) then { // Creates patrols _classCDF = ["CDF_InfSquad","CDF_InfSquad_Weapons","CDF_InfSection_AT","CDF_InfSection_Patrol"] call BIS_fnc_selectRandom; _Patrolgrp1 = [getMarkerPos _city, WEST, (configFile >> "CfgGroups" >> "West" >> "CDF" >> "Infantry" >> _classCDF)] call BIS_fnc_spawnGroup; [_patrolgrp1, getMarkerPos _city, 150] call BIS_fnc_taskPatrol; _patrolgrp2 = [getMarkerPos _city, WEST, (configFile >> "CfgGroups" >> "West" >> "CDF" >> "Infantry" >> _classCDF)] call BIS_fnc_spawnGroup; [_patrolgrp2, getMarkerPos _city, 150] call BIS_fnc_taskPatrol; _patrolgrp3 = [getMarkerPos _city, WEST, (configFile >> "CfgGroups" >> "West" >> "CDF" >> "Infantry" >> _classCDF)] call BIS_fnc_spawnGroup; [_patrolgrp3, getMarkerPos _city] call BIS_fnc_taskDefend; }; }; if ((_N0USMC > _N0CDF) AND (_N0USMC > _N0RU) AND (_N0USMC > _N0GUE)) then { Reinforcements = [_USMC,_classRandom,_city] execVM "Reinforcements.sqf"; If (_rulingFaction != _USMC) then { _classUSMC = ["USMC_InfSquad","USMC_FireTeam","USMC_FireTeam_AT","USMC_FireTeam_MG","USMC_FireTeam_Support","USMC_HeavyATTeam"] call BIS_fnc_selectRandom; _Patrolgrp4 = [getMarkerPos _city, WEST, (configFile >> "CfgGroups" >> "West" >> "USMC" >> "Infantyry" >> _classUSMC)] call BIS_fnc_spawnGroup; [_patrolgrp4, getMarkerPos _city, 150] call BIS_fnc_taskPatrol; _patrolgrp5 = [getMarkerPos _city, WEST, (configFile >> "CfgGroups" >> "West" >> "USMC" >> "Infantyry" >> _classUSMC)] call BIS_fnc_spawnGroup; [_patrolgrp5, getMarkerPos _city, 150] call BIS_fnc_taskPatrol; _patrolgrp6 = [getMarkerPos _city, WEST, (configFile >> "CfgGroups" >> "West" >> "USMC" >> "Infantyry" >> _classUSMC)] call BIS_fnc_spawnGroup; [_patrolgrp6, getMarkerPos _city] call BIS_fnc_taskDefend; }; }; if ((_N0Ru > _N0USMC) AND (_N0RU > _N0CDF) AND (_N0RU > _N0GUE)) then { Reinforcements = [_RU,_classRandom,_city] execVM "Reinforcements.sqf"; If (_rulingFaction != _RU) then { _classRU = ["RU_InfSquad","RU_InfSection","RU_InfSection_AT","RU_InfSection_MG"] call BIS_fnc_selectRandom; _Patrolgrp7 = [getMarkerPos _city, EAST, (configFile >> "CfgGroups" >> "EAST" >> "RU" >> "Infantry" >> _classRU)] call BIS_fnc_spawnGroup; [_patrolgrp7, getMarkerPos _city, 150] call BIS_fnc_taskPatrol; _patrolgrp8 = [getMarkerPos _city, EAST, (configFile >> "CfgGroups" >> "EAST" >> "RU" >> "Infantry" >> _classRU)] call BIS_fnc_spawnGroup; [_patrolgrp8, getMarkerPos _city, 150] call BIS_fnc_taskPatrol; _patrolgrp9 = [getMarkerPos _city, EAST, (configFile >> "CfgGroups" >> "EAST" >> "RU" >> "Infantry" >> _classRU)] call BIS_fnc_spawnGroup; [_patrolgrp9, getMarkerPos _city] call BIS_fnc_taskDefend; }; }; if ((_N0GUE > _N0USMC) AND (_N0GUE > _N0CDF) AND (_N0GUE > _N0RU)) then { Reinforcements = [_GUE,_classRandom,_city] execVM "Reinforcements.sqf"; If (_rulingFaction != _GUE) then { _classGUE = ["GUE_InfSquad","GUE_InfSquad_Assault","GUE_InfSquad_Weapons","GUE_InfTeam_1","GUE_InfTeam_2","GUE_InfTeam_AT"] call BIS_fnc_selectRandom; _Patrolgrp10 = [getMarkerPos _city, RESISTANCE, (configFile >> "CfgGroups" >> "RESISTANCE" >> "GUE" >> "Infantry" >> _classGUE)] call BIS_fnc_spawnGroup; [_patrolgrp10, getMarkerPos _city, 150] call BIS_fnc_taskPatrol; _patrolgrp11 = [getMarkerPos _city, RESISTANCE, (configFile >> "CfgGroups" >> "RESISTANCE" >> "GUE" >> "Infantry" >> _classGUE)] call BIS_fnc_spawnGroup; [_patrolgrp11, getMarkerPos _city, 150] call BIS_fnc_taskPatrol; _patrolgrp12 = [getMarkerPos _city, RESISTANCE, (configFile >> "CfgGroups" >> "RESISTANCE" >> "GUE" >> "Infantry" >> _classGUE)] call BIS_fnc_spawnGroup; [_patrolgrp12, getMarkerPos _city] call BIS_fnc_taskDefend; }; }; sleep 60; }; This one gives no errors insquint, but still doesn't work. Thanks for the help.