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:highlight([show highlightboolean]) -
Activates or deactivates a highlights on the capture location.
Parameters:
1
optional, default value=true
show highlight
Returns:
nil
defined in ../../common/EmpireBattle/Source/BattleScript/BattleEditorScriptInterface.cpp, line 400
-
capture_location:position() -
Returns the position of the capture location.
Returns:
positionbattle_vector
defined in ../../common/EmpireBattle/Source/BattleScript/BattleEditorScriptInterface.cpp, line 413
-
capture_location:unique_id() -
Returns the unique_id of the capture location.
Returns:
unique_idnumber
defined in ../../common/EmpireBattle/Source/BattleScript/BattleEditorScriptInterface.cpp, line 431
-
capture_location:script_id() -
Returns the script id of the capture location. This can be set in the terrain editor. A blank string is returned if no script id is set.
Returns:
script_idstring
defined in ../../common/EmpireBattle/Source/BattleScript/BattleEditorScriptInterface.cpp, line 448
-
capture_location:type() -
Returns the type of the capture location, from the
capture_location_typestable.Returns:
script_idstring
defined in ../../common/EmpireBattle/Source/BattleScript/BattleEditorScriptInterface.cpp, line 466
-
capture_location:set_enabled(enableboolean) -
Enables or disables the capture location.
Parameters:
1
enable
Returns:
nil
defined in ../../common/EmpireBattle/Source/BattleScript/BattleEditorScriptInterface.cpp, line 483
-
capture_location:is_enabled() -
Returns whether the capture location is enabled.
Returns:
enabledboolean
defined in ../../common/EmpireBattle/Source/BattleScript/BattleEditorScriptInterface.cpp, line 500
-
capture_location:set_locked(lockboolean) -
Locks or unlocks the capture location.
Parameters:
1
lock
Returns:
nil
defined in ../../common/EmpireBattle/Source/BattleScript/BattleEditorScriptInterface.cpp, line 517
-
capture_location:is_locked() -
Returns whether the capture location is locked.
Returns:
lockedboolean
defined in ../../common/EmpireBattle/Source/BattleScript/BattleEditorScriptInterface.cpp, line 535
-
capture_location:contributes_to_victory() -
Returns whether the capture of this capture location contributes towards victory in the battle.
Returns:
contributes to victoryboolean
defined in ../../common/EmpireBattle/Source/BattleScript/BattleEditorScriptInterface.cpp, line 552
-
capture_location:change_holding_army([holding armybattle_army]) -
Changes the army who owns the capture location to the supplied army. If no
battle_armyargument is supplied then the capture location is set to neutral.Parameters:
1
optional, default value=nil
holding army
Returns:
nil
defined in ../../common/EmpireBattle/Source/BattleScript/BattleEditorScriptInterface.cpp, line 570
-
capture_location:is_held() -
Returns whether the capture location is currently controlled by an alliance.
Returns:
is heldboolean
defined in ../../common/EmpireBattle/Source/BattleScript/BattleEditorScriptInterface.cpp, line 595
-
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
defined in ../../common/EmpireBattle/Source/BattleScript/BattleEditorScriptInterface.cpp, line 612
-
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
defined in ../../common/EmpireBattle/Source/BattleScript/BattleEditorScriptInterface.cpp, line 629
-
capture_location:is_contested() -
Returns whether the capture location is currently being contested.
Returns:
is contestedboolean
defined in ../../common/EmpireBattle/Source/BattleScript/BattleEditorScriptInterface.cpp, line 651
-
capture_location:contesting_army() -
Returns the army currently contesting the capture location is currently being contested. If the capture location is not being contested then nothing is returned.
Returns:
is contestedboolean
defined in ../../common/EmpireBattle/Source/BattleScript/BattleEditorScriptInterface.cpp, line 668
-
capture_location:contesting_alliance_id() -
Returns the id of the alliance currently contesting the capture location. If no alliance is currently contesting the capture location then nothing will be returned.
Returns:
contesting alliance idnumber
defined in ../../common/EmpireBattle/Source/BattleScript/BattleEditorScriptInterface.cpp, line 690
-
capture_location:set_income_cap_for_alliance(alliance_idnumber,income_capnumber) -
Sets income cap for the whole alliance
Parameters:
1
alliance_id
2
income_cap
Returns:
nil
defined in ../../common/EmpireBattle/Source/BattleScript/BattleEditorScriptInterface.cpp, line 712
-
capture_location:set_income_cap_for_army(army_idnumber,income_capnumber) -
Sets income cap for specific army
Parameters:
1
army_id
2
income_cap
Returns:
nil
defined in ../../common/EmpireBattle/Source/BattleScript/BattleEditorScriptInterface.cpp, line 740
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:capture_location_from_script_id() -
Retrieves a
battle_capture_locationusing a supplied script id. If no capture location exists with the supplied script id then nothing is returned.Returns:
capture locationbattle_capture_location
defined in ../../common/EmpireBattle/Source/BattleScript/BattleEditorScriptInterface.cpp, line 819
-
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
defined in ../../common/EmpireBattle/Source/BattleScript/BattleEditorScriptInterface.cpp, line 840
-
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
defined in ../../common/EmpireBattle/Source/BattleScript/BattleEditorScriptInterface.cpp, line 866