Jump to content

kyfohatl

Member
  • Content Count

    247
  • Joined

  • Last visited

  • Medals

Posts posted by kyfohatl


  1. Yeah i had the same problem with the DOW series, i loved the all out war for hours then suddenly they just give up, quite odd and unfun.

    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).


  2. Wow, how in the world did he do that?

    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...


  3. Actually I have seen this behavior numerous times. I just fought a battle against a column of Takistani walking up the road toward me from about 300m range. Despite shooting the lead elements, the others mostly ignored the deaths of their comrades in front of them. Some did react as you would expect, but others were oblivious, maybe listening to their iPods? Also, they were set to CARELESS.

    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


  4. 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


  5. 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):

    this setdir 1; this setdir 2; this setdir 3

    Thanks for any help :)


  6. 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


  7. Meqon physics is used in Alpha Prime.

    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.


  8. This game has no base making, but you are able to create fortifications/minefields. Also units are given at start of the mission, but in some mp modes and even in sp - you gain slowly credit to buy units, tanks or other stuff. Better stuff costs much more, but in amateur hands you can easily loose tiger for a single soldier with AT-grenade. Different tanks also have their own ways to play - T34 is meant to move all the time and try to flank while tiger could stand still and rely on heavy armor. There is much vehicles and unit classes to use. The whole game is full of little features and details. Its amazing how good the game actually is. I dont know why am not currently playing it. ;)

    In earlier beta that I played had soviet, german and US armies. There is planes, bombing artillery and paratroopers. Not sure about the trains but I think the full game could have those. Earlier games had at least.

    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...


  9. 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.


  10. No, it is not using Doom 3 engine. It is powered by Enforce Engine from Black Element Software.

    Yeah, and havock physic according to wikipedia (quote):

    The game is powered by the Enforce 2 Engine with Havok Physics...the game has been complimented for having a solid engine with crisp visuals that live up to its mainstream contemporaries.
    AI: they either patrol or wait somewhere until you show up, bit boring. Also i think once they spotted you they have really fast reactions. You always get hit when coming around a corner no matter how good you hide.

    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):

    The enemies have been criticized for being too hard, with perfect aim at all ranges and no reduction in damage, leading players to constantly having to save and load.

    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?


  11. 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


  12. 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.


  13. I'm guessing this is the game this sub-forum is about?

    http://en.wikipedia.org/wiki/Alpha_Prime

    Anyway, if this is the game, then can someone tell me a bit more about the game and especially about its gameplay? Wikipedia goes on too much about the story and not enough about the gameplay. All I've managed to figure out is that its is an FPS from these links:

    http://au.pc.ign.com/objects/746/746915.html

    http://www.alpha-prime.com/

    By the way: First! <----- bad, bad :nono: Sorry, couldn't resist


  14. nice to see your script working :)

    Can you upload an exemple please ?

    Thanks :)

    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


  15. try changing to

    [color=#000000][color=#007700][...([/color][color=#0000bb]configFile [/color][color=#007700]>> [/color][color=#dd0000]"cfgGroups" [/color][color=#007700]>> [/color][color=#dd0000]"Guerrila"[/color][/color] [color=#000000][color=#007700]>> [/color][color=#dd0000]"GUE" [/color][color=#007700]>> ...[/color][color=#007700]>> [/color]...[color=#007700])] [/color][color=#0000bb]call BIS_fnc_spawnGroup[/color][color=#007700];
    [/color][/color]

    instead of Resistance

    Excellent, it worked :yay: 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?


  16. 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.


  17. @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:

    Error: Type string, expected array

    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.


  18. So Sled can talk in German and it will shows english subtitles. Like somekind of German film about Chernobyl :). Sled, if you do a patch, wich will fix bugs and weird things in campaign, then you will see more positive criticism from me ;).

    Actually... that's not a bad idea. Though I would prefere not to have to read subtitles all the time. My idea is to rename the ingame land to Gernobyl and assume it takes place in germany... so it would make sense if the narrator had a German accent (just kidding! I know sled has already rejected the idea :p. I think the voice acting is fine).


  19. where do you define z1 z2 z3 z4

    Do I need to define them? They are DAC zones, already present in the map. You probably already know what DAC is, but just in case you don't: With DAC, you can put a trigger on the map, and the trigger will spawn random groups that patrol randomly generated waypoints within the radius of the trigger. But you have to name the triggers using, "z1,z2,z3,etc." (representing zone1, zone2, etc.). So "z1,z2 and z3" are names of triggers in the map.

    Here's a script I wrote to test to see if the DAC_fInsertGroup works:

    [grp1,1,[z1],10,1,1,[1,1,1],0,false] spawn DAC_fInsertGroup;

    And it works fine. So group 1 joins the DAC and begins patrolling between the randomly generated waypoints. So I don't know what squint is talking about there...

    EDIT: Maybe the groups have to be global?

×