Setting up the combat area for AI

Based on Tutorial by Kysterama

Combat Area

The combat area is the coordinates that specifiy the area in which the player can go. If they go outside this area (the red stripey no-mans land on the mini-map) then the commander threatens to shoot you for deserting.   The combat also specifies the area that navmesh generator will create a navmesh in, which is integral for creating navmeshes.

Combat area is at the bottom of GamePlayObjects.com

CombatAreaManager.use 1

CombatAreaManager.timeAllowedOutside 10.000000
CombatArea.create CombatArea_0_Default
CombatArea.min 0.000000/0.000000
CombatArea.max 0.000000/0.000000
CombatArea.addAreaPoint -49.508636/309.521057
CombatArea.addAreaPoint -106.653534/302.942810
CombatArea.addAreaPoint -298.430908/215.904358
CombatArea.addAreaPoint -383.601013/252.437683
CombatArea.addAreaPoint -418.348206/229.250977
CombatArea.addAreaPoint -447.901398/-49.729950
CombatArea.addAreaPoint -256.824768/-180.013153
CombatArea.addAreaPoint -134.451721/-145.417114
CombatArea.addAreaPoint -71.780426/-50.112396
CombatArea.addAreaPoint -20.388397/78.607422
CombatArea.addAreaPoint -54.802582/121.588379
CombatArea.addAreaPoint -56.012451/247.228943
CombatArea.addAreaPoint -19.933960/275.608276
CombatArea.team 0
CombatArea.vehicles 4
CombatArea.layer 1

CombatArea.usedByPathFinding 1

  • Delete the text to create a new combat area. Save and close.
  • Switch back to the Level Editor
  • Select the Combat Area tool

Combat area icon.PNG

[combat_area_icon]

RULES: The combat area MUST be placed down in an anti-clockwise direction!

  • Right click an area where you want the Combat area to start -
  • select 'add control point'

[adds_first_control_point]


Add the first Control Point

  • Now work your way in an anti-clockwise direction around the border of your combat area, right clicking and placing control points for the combat area. it will draw a line from point to point until you come back full circle to the starting point.
  • Right click on the first point and confirm to close the combat area

Note: this example is ridiculously small just to demonstrate how to do it. In reality, the Combat area should surround the entire map and every CP.

[combat_area_example]


Place control points like 'connect the dots' in an anti-clockwise direction. When you get back to the first point you placed, it will ask if you want to close the combat area. Click 'Yes'

IMPORTANT: Once the combat area is closed, go to the tweaker bar and checkmark the box, 'UsedByPathFinding'

[used_by_pathfinding]

SAVE YOUR CHANGES!.

Community content is available under CC-BY-SA unless otherwise noted.