Capture Location
This object represents a capture location on the battlefield. A list of capture locations may be retrieved from battle_capture_location_manager object, which is itself retrieved by calling the function battle:capture_location_manager.
| Loaded in Campaign |
|
| Loaded in Battle |
|
| Loaded in Frontend |
|
-
capture_location:position() -
Returns the position of the capture location.
Returns:
positionbattle_vector
-
capture_location:unique_id() -
Returns the unique_id of the capture location.
Returns:
unique_idnumber
-
capture_location:type() -
Returns the type of the capture location, from the
capture_location_typestable.Returns:
typestring
-
capture_location:contributes_to_victory() -
Returns whether the capture of this capture location contributes towards victory in the battle.
Returns:
contributes to victoryboolean
-
capture_location:highlight(set_highlightedboolean) -
Highlights the capture location for the tutorial
Parameters:
1
set_highlighted
Returns:
nil
-
capture_location:linked_buildings() -
Returns a
battle_buildingslist containing anybattle_buildingobjects linked to this capture location, if any.Returns:
buildings listbattle_buildings
-
capture_location:is_held() -
Returns whether the capture location is currently controlled by an alliance.
Returns:
is heldboolean
-
capture_location:holding_alliance_id() -
Returns the id of the alliance who owns the capture location. If no alliance owns the capture location then
0will be returned;Returns:
alliance idnumber
-
capture_location:holding_army() -
Returns the army that owns the capture location. If no army holds the capture location then nothing is returned.
Returns:
holding armybattle_army
Capture Location Manager
The capture location manager provides an interface to obtain battle_capture_location objects on the battlefield. A handle to the capture location manager may be obtained by calling battle:capture_location_manager.
-
capture_location_manager:item() -
Retrieves a
battle_capture_locationby numerical index. If no capture location exists at the supplied index then nothing is returned. The number of capture locations on the battlefield can be queried usingcapture_location_manager:count.Returns:
capture locationbattle_capture_location
-
capture_location_manager:count() -
Retrieves the number of
battle_capture_locationobjects on the battlefield. Each individual capture location can be retrieved withcapture_location_manager:item.Returns:
number of capture locationsnumber