Results 1 to 3 of 3

Thread: BIS_fnc_spawngroup won't do civilians

  1. #1

    BIS_fnc_spawngroup won't do civilians

    Ok, I've been chasing this issue for about 3 hours (over a couple days).

    Code:
    	_cargo = [position player, west, 5,[],[],[],[],[5,0], 10] call BIS_fnc_spawnGroup;
    Spawns 5 west units.

    Code:
    	_cargo = [position player, civilian, 5,[],[],[],[],[5,0], 10] call BIS_fnc_spawnGroup;
    Spawns nothing. Hinting it up shows that it creates a group, but no units.

    Code:
    	_cargo = [position player, CIVILIAN, ["Assistant", "Citizen4", "Profiteer2", "Functionary1", "Functionary2"],[],[],[],[],[5,0], 10] call BIS_fnc_spawnGroup;
    Spawns 5 units, randomly, from those types.

    And.... I couldn't figure out how to get it to check a cfgGroups entry for civilians.

    Any help would be appreciated.

  2. #2
    I found this in ambientcombat.fsm, might be useful

    Code:
    //Create database of groups from CfgGroups to base spawned groups on.
    private ["_db"];
    _db = [];
    private ["_cfgGroups", "_cfgWest", "_cfgEast", "_cfgGuerilla"];
    _cfgGroups = configFile >> "CfgGroups";
    _cfgWest = _cfgGroups >> "West";
    _cfgEast = _cfgGroups >> "East";
    _cfgGuerilla = _cfgGroups >> "Guerrila";
    //Extract all groups for all factions.
    {
     private ["_cfgFaction", "_grpsFaction"];
     _cfgFaction = _x;
     _grpsFaction = [];
     
     //Find all groups defined for various subtypes.
     {
      private ["_cfgType", "_groups"];
      _cfgType = _cfgFaction >> _x;
      _groups = [];
      for "_i" from 0 to ((count _cfgType) - 1) do 
      {
       private ["_class"];
       _class = _cfgType select _i;
     
       //Only take actual classes.
       if (isClass (_class)) then 
       {
        _groups = _groups + [_class];
       };
      };
     
      _grpsFaction = _grpsFaction + [_groups];
     } 
     forEach ["Infantry", "Motorized", "Mechanized", "Armored", "Air"];
     
     _db = _db + [_grpsFaction];
    } 
    forEach [_cfgWest >> "USMC", _cfgWest >> "CDF", _cfgEast >> "RU", _cfgEast >> "INS", _cfgGuerilla >> "GUE"];
    //Store database in the ACM.
    _acm setVariable ["dbGroups", _db];

  3. #3
    Master Gunnery Sergeant TRexian's Avatar
    Join Date
    Jun 7 2007
    Posts
    1,226
    Author of the Thread
    Good catch.

    I bet that's what it is getting choked on.

    BTW- this may be related, but lately I've been getting fsm errors with regard to some respect attribute. Probably civs that get killed by other civs... some civs just shouldn't be allowed to have AKs....

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •