PMC websites shut down November 13th 2025 unless web hosting fees are paid. See up to date status from PMC Website Hosting and Domain Registration Fee Status forum topic. Please Support PMC to help keep these websites online.

Enjoyed or found this pages content useful, please Support PMC to help me keep this web page online beyond November 13th 2025 when web hosting fees are due.

User Tools

Site Tools


arma2:editor_modules:acm

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
arma2:editor_modules:acm [2009/06/03 03:59] – created acm initial page. snakemanarma2:editor_modules:acm [2024/08/01 20:53] (current) – links added. snakeman
Line 1: Line 1:
-====== ACM ======+====== ArmA 2 ACM ====== 
 + 
 +[[https://www.pmctactical.org/forum/viewforum.php?f=50|ArmA 2 Forum]], [[:arma2|ArmA 2 Home]], [[arma2:config|ArmA 2 Config]], [[arma2:file_formats|ArmA 2 File Formats]], [[arma2:missions|ArmA 2 Missions]], [[arma2:modeling|ArmA 2 3D Modeling]], [[arma2:scripting|ArmA 2 Scripting]], [[arma2:terrain|ArmA 2 Terrain]], [[arma2:texturing|ArmA 2 Texturing]], [[arma2:tools|ArmA 2 Tools]]
  
 **ACM** - **A**mbient **C**ombat **M**odule **ACM** - **A**mbient **C**ombat **M**odule
Line 46: Line 48:
  
 Yes: either do not place the ACM in the mission and spawn it (createUnit) at some point. Or you can set the intensity to 0 at the beginning and raise to some value between 0 and 1 when you want to activate it. Yes: either do not place the ACM in the mission and spawn it (createUnit) at some point. Or you can set the intensity to 0 at the beginning and raise to some value between 0 and 1 when you want to activate it.
 +
 +**Tips**
 +
 +Another hint for experienced scripters: modules need a little time to initialize (this can be super fast, but it's still several milliseconds after the mission starts). It is therefore wise to query whether the module is done initializing and then start changing settings in a script. You may check Boolean variable initDone in the ACM to do that.
 +<code cpp>
 +waitUntil {!isNil {myFirstACM getVariable "initDone"}};
 +waitUntil {myFirstACM getVariable "initDone"};
 +</code>
 +
 +
 +====== Example ======
 +
 +Use this example, put it on the mission's init.sqf file:
 +<code cpp>
 +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, 300, 600] call BIS_ACM_setSpawnDistanceFunc;
 +
 +//factions to be spawned
 +[["USMC", "RU"], BIS_ACM] call BIS_ACM_setFactionsFunc;
 +
 +//Skill range for spawned units
 +[0, 0.6, BIS_ACM] call BIS_ACM_setSkillFunc;
 +
 +//Amount of ammo spawned units possess
 +[0.2, 0.5, BIS_ACM] call BIS_ACM_setAmmoFunc;
 +
 +//Type of patrol. 1- present, 0- absent
 +["ground_patrol", 1, BIS_ACM] call BIS_ACM_setTypeChanceFunc;
 +
 +["air_patrol", 0, BIS_ACM] call BIS_ACM_setTypeChanceFunc;
 +</code>
 +
arma2/editor_modules/acm.1244001589.txt.gz · Last modified: 2009/06/03 03:59 (external edit)