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]
snakeman created acm initial page.
arma2:editor_modules:acm [2009-06-04 18:26] (current)
Line 46: Line 46:
  
 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)