Ambient Combat Manager Module – Arma 2

From Bohemia Interactive Community
Jump to navigation Jump to search
(Started to grow documentation on the Ambient Combat Manager.)
 
mNo edit summary
Line 4: Line 4:


== Introduction ==
== Introduction ==
The '''Ambient Combat Manager''' (ACM) is a scripted module for ArmA 2 which can dynamically generate a war around a unit. It is meant to fill the gameworld with combat while moving through it and without having to place units manually. The generated patrols are not faked: they will fight with and / or against you.
The '''Ambient Combat Manager''' (ACM) is a scripted module for ArmA 2 which can dynamically generate a war around a unit. It is meant to fill the gameworld with actual combat while moving through it and without having to place units manually. The generated patrols are not faked: they will fight with and / or against you.


Since no current computer would be able to handle an entire ArmA 2 gameworld full of AI units, the ACM cleans up after itself. It will remove dynamic content as the player moves away from it.
Since no current computer would be able to handle an entire ArmA 2 gameworld full of AI units, the ACM cleans up after itself. It will remove dynamic content as the player moves away from it. After starting a mission with an ACM it may take some time for the patrols to appear, depending mostly on the ACM's intensity setting.


== Quickstart ==
== Quickstart ==
[[Image:ACM_Quickstart1.jpg|center]]
# Place at least one unit in your mission.
# Place at least one unit in your mission.
# Place an ACM near this unit (F1 > Side: Game Logic > Class: Modules > Unit: Ambient Combat).
# Place an ACM near this unit (''F1'' > Side: ''Game Logic'' > Class: ''Modules'' > Unit: ''Ambient Combat'').
# Synchronize the unit with the ACM (F5 > drag a line between the two objects).
# Synchronize the unit with the ACM (''F5'' > drag a line between the two objects).
# Preview the mission and enjoy!
# Preview the mission and enjoy!




Note 1: only one ACM may be synchronized with a group (additional ACM's will be ignored). However, other ACM's may be synchronized to other groups.
'''Note 1''': only one ACM may be synchronized with a group (additional ACM's will be ignored). However, other ACM's may be synchronized to other groups.
 
'''Note 2''': when synchronizing to a group with multiple units it does not matter which unit you synchronize to. Aesthetically it is recommend to sychronize to the group's leader.


Note 2: when synchronizing to a group with multiple units it does not matter which unit you synchronize to. Aesthetically it is recommend to sychronize to the group's leader.
'''Note 3''': do '''not''' join the unit and the ACM in a group (''F2'')!


== Configuration ==
== Configuration ==
You can manipulate several ACM settings by calling [[Ambient_Combat_Manager_-_Functions|pre-defined functions]]. The ACM needs a little time to initialize, so before calling these functions, please wait for initialization to complete. This can be achieved by looking at a variable stored inside the ACM itself: ''initDone''. Assuming you named your ACM ''myFirstACM'':


  {{codecomment|//Make a script wait for the ACM to initialize.}}
  waitUntil {!isNil {myFirstACM getVariable "initDone"}};
  waitUntil {myFirstACM getVariable "initDone"};


== Sample ==
== Sample ==
A sample mission showing how to manipulate all available ACM settings is forthcoming.
== Advanced topics ==
=== Scripted ACM ===
You can also spawn an ACM by script (''createUnit''). You will then have to also script its synchronization to a unit (''synchronizeObjectsAdd''). This needs to be done within '''0.5''' seconds from the start of the mission, because after that synchronizations are processed and set in stone.
=== Patrol types ===
By default the ACM spawns groups from the ''CfgGroups'' config. This means that when add-ons add new groups here, these will be automatically used. The groups also define a ''rarity'' value which determines how frequently a certain type of group should be used. Regular infantry is spawned more often than a sniper team for example.

Revision as of 16:56, 6 June 2009


Note: this page is a work-in-progress! More info to follow as soon as possible.

Introduction

The Ambient Combat Manager (ACM) is a scripted module for ArmA 2 which can dynamically generate a war around a unit. It is meant to fill the gameworld with actual combat while moving through it and without having to place units manually. The generated patrols are not faked: they will fight with and / or against you.

Since no current computer would be able to handle an entire ArmA 2 gameworld full of AI units, the ACM cleans up after itself. It will remove dynamic content as the player moves away from it. After starting a mission with an ACM it may take some time for the patrols to appear, depending mostly on the ACM's intensity setting.

Quickstart

ACM Quickstart1.jpg
  1. Place at least one unit in your mission.
  2. Place an ACM near this unit (F1 > Side: Game Logic > Class: Modules > Unit: Ambient Combat).
  3. Synchronize the unit with the ACM (F5 > drag a line between the two objects).
  4. Preview the mission and enjoy!


Note 1: only one ACM may be synchronized with a group (additional ACM's will be ignored). However, other ACM's may be synchronized to other groups.

Note 2: when synchronizing to a group with multiple units it does not matter which unit you synchronize to. Aesthetically it is recommend to sychronize to the group's leader.

Note 3: do not join the unit and the ACM in a group (F2)!

Configuration

You can manipulate several ACM settings by calling pre-defined functions. The ACM needs a little time to initialize, so before calling these functions, please wait for initialization to complete. This can be achieved by looking at a variable stored inside the ACM itself: initDone. Assuming you named your ACM myFirstACM:

  //Make a script wait for the ACM to initialize.
  waitUntil {!isNil {myFirstACM getVariable "initDone"}};
  waitUntil {myFirstACM getVariable "initDone"};

Sample

A sample mission showing how to manipulate all available ACM settings is forthcoming.

Advanced topics

Scripted ACM

You can also spawn an ACM by script (createUnit). You will then have to also script its synchronization to a unit (synchronizeObjectsAdd). This needs to be done within 0.5 seconds from the start of the mission, because after that synchronizations are processed and set in stone.

Patrol types

By default the ACM spawns groups from the CfgGroups config. This means that when add-ons add new groups here, these will be automatically used. The groups also define a rarity value which determines how frequently a certain type of group should be used. Regular infantry is spawned more often than a sniper team for example.