Jump to content

Recommended Posts

Hi. Been struggling with ACM four nights now, but cant get it work. I have tried multiple different example, from Biki and various threads. Latest one I have tested is Nemesis's with little modification:

ASfirstrun = true;
if(player == m1)then{nul = [m1,"jadam","lgb","cbuap","cbuat","cbumine","cas","helo","trans"] execVM "airSup\airSupInit.sqf"};
if(true)exitWith{};

player setVariable ["BIS_noCoreConversations", true];



waitUntil {!isNil {BIS_ACM getVariable "initDone"}};
waitUntil {BIS_ACM getVariable "initDone"};

//Sets frequency and number of patrols (0-1). BIS_ACM is module name
[1, BIS_ACM] call BIS_ACM_setIntensityFunc;  

//min max spawn distance
[bIS_ACM, 400, 1500] call BIS_ACM_setSpawnDistanceFunc;

//factions to be spawned
[["BIS_TK_INS", "BIS_US"], BIS_ACM] call BIS_ACM_setFactionsFunc;

//Skill range for spawned units
[0, 0.25, BIS_ACM] call BIS_ACM_setSkillFunc;

//Amount of ammo spawned units possess
[0.5, 1, BIS_ACM] call BIS_ACM_setAmmoFunc;

//Type of patrol. With 0 meaning no chance of appearing, and 1 meaning 100% chance. -1 removes patrol type completely.
["ground_patrol", 1, BIS_ACM] call BIS_ACM_setTypeChanceFunc;

["air_patrol", -1, BIS_ACM] call BIS_ACM_setTypeChanceFunc;

[bIS_ACM, [
"TK_INS_Patrol", "TK_INS_AATeam", "TK_INS_ATTeam", "US_RifleSquad", "US_MotorizedSection", "US_MechanizedReconSection"]] call BIS_ACM_addGroupClassesFunc;  

Everything else works just finr, but ACM spawns groups randomly. I even encountered friendly Takistani Militia BTR-40. :) Could someone with more experience of this issue please help me, ACM would be important part in mission I'm building.

Share this post


Link to post
Share on other sites

Kalmisto, you're exiting your script before it even runs the ACM parameters with this line:

if(true)exitWith{};

Why is this even in your script? It will always exit at this point. Test it yourself by placing any type of debugging(hint, hintSilent, diag_log, etc) after this line... What do you get?

Share this post


Link to post
Share on other sites
Kalmisto, you're exiting your script before it even runs the ACM parameters with this line:

if(true)exitWith{};

Why is this even in your script? It will always exit at this point.

Two reasons;

1. My scripting skills are between "none - very very very little".

2. I'm using Air Support-script, which has that in demo mission. I thought it was supposed to be there.

Thanks a lot for your help, I'l try removing that, or changing it to the end of init. If it works I'l post working init.sqf, reading through forums I have noticed that this is common problem with us "script illiterates".

Share this post


Link to post
Share on other sites

How can I limit the "faction" and "type" of the units that appear on the ACM? I want only to spawn only Takistani insurgent infantry. Any idea if is possible?

Share this post


Link to post
Share on other sites

Hi, All.

I read all 46 pages but still don't understand if i should use "sleep" command before second, third, etc. ACM modules in init.sqf. Sometimes it works fine for all 3 groups synced with ACM modules. but sometimes I see Mi-24 flying under the skies or don't see any bots. The other problem - killed bots bodies disappears very fast - around a munite.

sleep 1;

waitUntil {!isNil {myACM1 getVariable "initDone"}};
waitUntil {myACM1 getVariable "initDone"};
[] spawn {
waitUntil {!(isnil "BIS_fnc_init")};
[0.5, myACM1] call BIS_ACM_setIntensityFunc;
[myACM1, 300, 500] call BIS_ACM_setSpawnDistanceFunc;
[0, 0.25, myACM1] call BIS_ACM_setSkillFunc;
[0.5, 1, myACM1] call BIS_ACM_setAmmoFunc;
[["BIS_TK_GUE"], myACM1] call BIS_ACM_setFactionsFunc;
["ground_patrol", 1, myACM1] call BIS_ACM_setTypeChanceFunc;
["air_patrol", -1, myACM1] call BIS_ACM_setTypeChanceFunc;
[myACM1, ["TK_GUE_ATTeam","TK_GUE_Patrol"]] call BIS_ACM_addGroupClassesFunc;
};

sleep 1; <= should it be here and later before every block of ACM code???

waitUntil {!isNil {myACM2 getVariable "initDone"}};
waitUntil {myACM2 getVariable "initDone"};
[] spawn {
waitUntil {!(isnil "BIS_fnc_init")};
[1, myACM2] call BIS_ACM_setIntensityFunc;
[myACM2, 400, 700] call BIS_ACM_setSpawnDistanceFunc;
[["BIS_TK_GUE"], myACM2] call BIS_ACM_setFactionsFunc;
["ground_patrol", 1, myACM2] call BIS_ACM_setTypeChanceFunc;
["air_patrol", -1, myACM2] call BIS_ACM_setTypeChanceFunc;
[myACM2, ["TK_GUE_GroupWeapons"]] call BIS_ACM_addGroupClassesFunc;
};

waitUntil {!isNil {myACM3 getVariable "initDone"}};
waitUntil {myACM3 getVariable "initDone"};
[] spawn {
waitUntil {!(isnil "BIS_fnc_init")};
[1, myACM3] call BIS_ACM_setIntensityFunc;
[myACM3, 400, 700] call BIS_ACM_setSpawnDistanceFunc;
[["BIS_TK_GUE"], myACM3] call BIS_ACM_setFactionsFunc;
["ground_patrol", 1, myACM3] call BIS_ACM_setTypeChanceFunc;
["air_patrol", -1, myACM3] call BIS_ACM_setTypeChanceFunc;
[myACM3, ["TK_GUE_Group","]] call BIS_ACM_addGroupClassesFunc;
};

Edited by AshTray

Share this post


Link to post
Share on other sites
I read all 46 pages but still don't understand if i should use "sleep" command before second, third, etc. ACM modules in init.sqf.

I suspect only one sleep is needed after the ACM's initialize, to wait on functions before setting all of the variables, since BIS_ACM_addGroupClassesFunc uses functions.

I would approach it like this:

waitUntil {!isNil {myACM1 getVariable "initDone"}};
waitUntil {myACM1 getVariable "initDone"};

waitUntil {!isNil {myACM2 getVariable "initDone"}};
waitUntil {myACM2 getVariable "initDone"};

waitUntil {!isNil {myACM3 getVariable "initDone"}};
waitUntil {myACM3 getVariable "initDone"};

[color="#0000FF"][i]// Waiting on Functions last.  Each ACM creates a new functions module.  Until one functions fully initializes, 
// all other functions will also fully initialize.  The first one completed will set init true, but the last one
// initializing is actually the one to wait for.[/i][/color]
waitUntil {!(isnil "BIS_fnc_init")};

[color="#0000FF"][i]// Since function init could be true even if another is initializing, the one sleep is needed to give the last functions time to 
// initialize.  You do not want a delay beyond 50 seconds after "initDone" or ACM could start spawning with default groups.[/i][/color]
sleep 5;

[] spawn {
[0.5, myACM1] call BIS_ACM_setIntensityFunc;
[myACM1, 300, 500] call BIS_ACM_setSpawnDistanceFunc;
[0, 0.25, myACM1] call BIS_ACM_setSkillFunc;
[0.5, 1, myACM1] call BIS_ACM_setAmmoFunc;
[["BIS_TK_GUE"], myACM1] call BIS_ACM_setFactionsFunc;
["ground_patrol", 1, myACM1] call BIS_ACM_setTypeChanceFunc;
["air_patrol", -1, myACM1] call BIS_ACM_setTypeChanceFunc;
[myACM1, ["TK_GUE_ATTeam","TK_GUE_Patrol"]] call BIS_ACM_addGroupClassesFunc;
};

[] spawn {
waitUntil {!(isnil "BIS_fnc_init")};
[1, myACM2] call BIS_ACM_setIntensityFunc;
[myACM2, 400, 700] call BIS_ACM_setSpawnDistanceFunc;
[["BIS_TK_GUE"], myACM2] call BIS_ACM_setFactionsFunc;
["ground_patrol", 1, myACM2] call BIS_ACM_setTypeChanceFunc;
["air_patrol", -1, myACM2] call BIS_ACM_setTypeChanceFunc;
[myACM2, ["TK_GUE_GroupWeapons"]] call BIS_ACM_addGroupClassesFunc;
};

[] spawn {
waitUntil {!(isnil "BIS_fnc_init")};
[1, myACM3] call BIS_ACM_setIntensityFunc;
[myACM3, 400, 700] call BIS_ACM_setSpawnDistanceFunc;
[["BIS_TK_GUE"], myACM3] call BIS_ACM_setFactionsFunc;
["ground_patrol", 1, myACM3] call BIS_ACM_setTypeChanceFunc;
["air_patrol", -1, myACM3] call BIS_ACM_setTypeChanceFunc;
[myACM3, ["TK_GUE_Group","]] call BIS_ACM_addGroupClassesFunc;
};

The other problem - killed bots bodies disappears very fast - around a munite.

That's because ACM uses "Garbage Collector" and your intensity setting is maxed on two of them. The GC's collection time, once dynamic cleanup is called, is 30 seconds if alive or 60 seconds if dead. Once an ACM patrol goes past their "patrolLifetimes" setting (1-3 minutes for air, 2-5 minutes for ground), dynamic cleanup is called during the next spawn check. When the ACM "intensity" setting is high the spawn checks occur in a very short random time, and you're using the highest setting so it's not surprising they clean up quick.

Edited by OpusFmSPol
New math. Realized ACM uses default "Intensity" for its first delay.

Share this post


Link to post
Share on other sites

Hey, sorry if this has already been covered but I'm having a bit of trouble with my ACM script

waitUntil {!isNil {BIS_ACM getVariable "initDone"}};
waitUntil {BIS_ACM getVariable "initDone"};

sleep 5;

[1.0, BIS_ACM] call BIS_ACM_setIntensityFunc;

[bIS_ACM, 50, 100] call BIS_ACM_setSpawnDistanceFunc;

[["BIS_BAF", "USMC", "BIS_US", "BIS_GER", "BIS_TK_INS"], BIS_ACM] call BIS_ACM_setFactionsFunc;

[0.2, 1, BIS_ACM] call BIS_ACM_setSkillFunc;

[0.8, 0.9, BIS_ACM] call BIS_ACM_setAmmoFunc;

["ground_patrol", 1, BIS_ACM] call BIS_ACM_setTypeChanceFunc;

["air_patrol", 1, BIS_ACM] call BIS_ACM_setTypeChanceFunc;

Problem is that the ACM is spawning factions I don't want included, TK army, Russia ect. My module is nammed BIS_ACM in the editor

I only want Brits, USMC, US Army, Germany, and TK militia to spawn

Anyone who can set me right, it would be greatly appreciated

Share this post


Link to post
Share on other sites
the ACM is spawning factions I don't want included, TK army, Russia ect. My module is nammed BIS_ACM in the editor

I only want Brits, USMC, US Army, Germany, and TK militia to spawn

Your call to BIS_ACM_setFactionsFunc is likely returning false because of the "BIS_BAF" faction.

The list of factions the BIS_ACM_setFactionsFunc recognizes are:

"USMC", "CDF", "BIS_US", "BIS_CZ", "BIS_GER", "RU", "INS", "BIS_TK", "BIS_TK_INS", "GUE", "BIS_TK_GUE", "BIS_UN"

Any other factions and it will return false without setting the factions.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×