OFPEC Forum
Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting General => Topic started by: Grimfist on 05 Sep 2009, 17:25:26
-
in my mission i have the ACM sync'ed with the player. then i have this in the init of my mission:
//waits for the ACM to get itsel ready before trying to alter its settings.
waitUntil {!isNil {BIS_ACM getVariable "initDone"}};
waitUntil {BIS_ACM getVariable "initDone"};
//Sets frequency and number of patrols (0-1). BIS_ACM is module name [0 = no patrols 1 = uber mega war]
[1, BIS_ACM] call BIS_ACM_setIntensityFunc;
//min max spawn distance
[BIS_ACM, 300, 600] call BIS_ACM_setSpawnDistanceFunc;
//factions to be spawned [ you can change this to usmc say ( but not civs )
[["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 posses
[0.4, 0.6, 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. [the setting will make ground units definatly appear and a 25% chance that aircraft will appear]
["ground_patrol", 1, BIS_ACM] call BIS_ACM_setTypeChanceFunc;
["air_patrol", 0.25, BIS_ACM] call BIS_ACM_setTypeChanceFunc;
//sets what is acctually spawning
[BIS_ACM,
[
"RU_InfSquad",
"RU_InfSection",
"RU_InfSection_AT",
"RU_InfSection_AA",
"RU_InfSection_MG",
"RU_SniperTeam",
"RUS_ReconTeam",
"MVD_AssaultTeam",
"ru_motinfsection_recon",
"ru_motinfsection_patrol",
"ru_mi24vsquadron",
"ru_mechinfsquad_2"
]
] call BIS_ACM_addGroupClassesFunc;
};
now the ACM activates but my above settings do not work. i cant seem to see why, can anyone?
TIA, grim.
-
Just to be sure, not being a smartass :P
Did you name the ACM in the editor?
In your example it should be named BIS_ACM.
Laggy
-
ahh, no it is not. ty laggy!
ty it works!
also is it possible to create a ACM 'safezone' where units will not spawn, etc the airfield. i know i can pause the ACM till the player leaves the airfield.
for now i have snipers and tanks everywhere with 'alowdamage false' to kick all ai that spaned back to where they came from
-
:D Good luck!
If it still doesn't work, there is something in the script that I have missed.
This works for me: http://www.ofpec.com/forum/index.php?topic=34014.msg234720#msg234720
For more info: http://community.bistudio.com/wiki/Ambient_Combat_Manager_-_Functions
There you will see how to "blacklist" areas.
Laggy