Zipper5 74 Posted May 30, 2010 (edited) I'm trying to use the ACM in a mission in my campaign. I'm trying to remove specific group classes from it using the following code (oc_acm is the name of the ACM): // Remove classes [oc_acm, [ "CDF_InfSection_AA", "CDF_SniperTeam", "CDF_TankPlatoon", "CDF_Mi24DSquadron", "CDF_Mi8Squadron", "RU_InfSection_AA", "RU_SniperTeam", "RUS_ReconTeam", "MVD_AssaultTeam", "RU_TankPlatoon", "RU_Mi24VSquadron", "RU_Mi24PSquadron", "RU_Pchela1TSquadron", "RU_Ka52Squadron", "RU_Mi8Squadron", "RU_Su34FighterSquadron", "INS_InfSection_AA", "INS_SniperTeam", "INS_MilitiaSquad", "INS_TankSection", "INS_Mi8Squadron", "GUE_GrpInf_TeamAA", "GUE_GrpInf_TeamSniper", "GUE_MilitiaSquad", "GUE_TankSection" ] ] call BIS_ACM_removeGroupClassesFunc; And I execute this 10 seconds after the mission starts. However, when I do, I get the following error message: '...; Error Undefined Variable in expression: _dbcustom File ca\modules\ambient_combat\data\scripts\functions\removeGroupClasses.sqf, line 67 _acm setVariable ["dbGroupsCustom", |#|_dbcustom]; _return = true; }; } else ...' Has anyone else experienced this issue, or have I done something wrong? I can't figure out what I've done wrong, but if someone else can, please tell me if that is in fact the problem. When I remove this code the error disappears, but then the classes I don't want spawning appear. I'm using v1.05.70951. Full script: // Intensity [1.0, oc_acm] call BIS_ACM_setIntensityFunc; // Skill level [0.0, 1.0, oc_acm] call BIS_ACM_setSkillFunc; // Ammo level [1.0, 1.0, oc_acm] call BIS_ACM_setAmmoFunc; // Factions [["INS", "CDF", "RU", "GUE"], oc_acm] call BIS_ACM_setFactionsFunc; // Force ground patrols ["ground_patrol", 1.0, oc_acm] call BIS_ACM_setTypeChanceFunc; // Disable air patrols ["air_patrol", -1.0, oc_acm] call BIS_ACM_setTypeChanceFunc; // Remove classes [oc_acm, [ "CDF_InfSection_AA", "CDF_SniperTeam", "CDF_TankPlatoon", "CDF_Mi24DSquadron", "CDF_Mi8Squadron", "RU_InfSection_AA", "RU_SniperTeam", "RUS_ReconTeam", "MVD_AssaultTeam", "RU_TankPlatoon", "RU_Mi24VSquadron", "RU_Mi24PSquadron", "RU_Pchela1TSquadron", "RU_Ka52Squadron", "RU_Mi8Squadron", "RU_Su34FighterSquadron", "INS_InfSection_AA", "INS_SniperTeam", "INS_MilitiaSquad", "INS_TankSection", "INS_Mi8Squadron", "GUE_GrpInf_TeamAA", "GUE_GrpInf_TeamSniper", "GUE_MilitiaSquad", "GUE_TankSection" ] ] call BIS_ACM_removeGroupClassesFunc; Edited May 30, 2010 by Zipper5 Share this post Link to post Share on other sites
Rommel 2 Posted May 30, 2010 The default class list is [], it reads that then defaults locally, ie you can't remove from nothing. You have to build it up with what you do want, not what you don't. It was poor handling on BI's part. ;) Share this post Link to post Share on other sites
Zipper5 74 Posted May 31, 2010 Ah, ok. So I have to build a database of what I do want using call BIS_ACM_addGroupClassesFunc? Share this post Link to post Share on other sites
Rommel 2 Posted May 31, 2010 Correct; and it will start from an empty list. ;) Share this post Link to post Share on other sites
Zipper5 74 Posted May 31, 2010 Nice. Thanks for the help, mate. :) Share this post Link to post Share on other sites
Nicolai 10 Posted May 31, 2010 But there must be a default setting of some sort? If you use the ACM "out of the box" it spawns groups so it isn't using an empty groups array then? Share this post Link to post Share on other sites
Rommel 2 Posted May 31, 2010 Correct again. But they are separate lists, and the presence of the custom one allows the ACM to revert to it. Share this post Link to post Share on other sites
Nicolai 10 Posted June 3, 2010 thanks a lot rommel. Nicolai Share this post Link to post Share on other sites