combatMode: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " \| *(([^=\| ]+)('''|\[\[)([^=\| ]+)) * \|p1=" to " |s1= $1 |p1=")
mNo edit summary
 
(21 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{RV|type=command
{{RV|type=command


| ofp
|game1= ofp
|1.00
|version1= 1.00


|game2= ofpe
|game2= ofpe
Line 26: Line 26:
|gr1= Groups
|gr1= Groups


| Returns the combat mode of the given AI [[Group | group]]. See [[setCombatMode]] for more information about combat modes.
|gr2= AI Behaviour


|s1= [[combatMode]] group
|descr= Returns the combat mode of the given AI [[Group | group]]. See [[setCombatMode]] for more information about combat modes.


|p1= group: [[Group]] or [[Object]]. If the argument is unit [[Object]], unit's current group is used.
|s1= [[combatMode]] group


| [[String]]
|p1= group: One of
One of "BLUE", "GREEN", "WHITE", "YELLOW" and "RED" or "ERROR"
* [[Group]]
* [[Object]] of type [[Object|Unit]] - if the argument is unit [[Object]], unit's current group is used.


|x1= <code>[[if]] ([[combatMode]] _grp1 == "BLUE") [[then]] {_grp1 [[setCombatMode]] "GREEN"};</code>
|r1= [[String]] - one of:
* "BLUE"
* "GREEN"
* "WHITE"
* "YELLOW"
* "RED"
* "ERROR"


|seealso= [[Combat Modes]], [[setCombatMode]], [[behaviour]], [[setBehaviour]], [[skill]], [[setSkill]], [[Arma 3 AI Skill]], [[setUnitCombatMode]], [[unitCombatMode]], [[setCombatBehaviour]], [[combatBehaviour]]
|x1= <sqf>if (combatMode _grp1 == "BLUE") then {_grp1 setCombatMode "GREEN"};</sqf>
 
|seealso= [[Combat Modes]] [[setCombatMode]] [[behaviour]] [[setBehaviour]] [[skill]] [[setSkill]] [[Arma 3: AI Skill]] [[setUnitCombatMode]] [[unitCombatMode]] [[setCombatBehaviour]] [[combatBehaviour]]
}}
}}


<dl class="command_description">
<dl class="command_description">


<dt><dt>
<dd class="notedate">Posted on August 3, 2006 - 14:25</dd>
<dt class="note">[[User:Hardrock|hardrock]]</dt>
<dd class="note">''Notes from before the conversion:''
Use [[setCombatMode]] to set the combat mode. The definitions of the colours are given under that command.
<dt><dt>
<dt><dt>
<dd class="notedate">
<dd class="notedate">
<dt class="note">[[User:Ceeeb|Ceeeb]]</dt>
<dt class="note">[[User:Ceeeb|Ceeeb]]</dt>
<dd class="note">
<dd class="note">
In '''OFP v1.96''', combatMode return value does not change when unit's combat mode is set with radio commands, ie troops under the player's command.
In '''OFP v1.96''', combatMode return value does not change when unit's combat mode is set with radio commands, i.e troops under the player's command.


</dl>
</dl>
{{GameCategory|arma1|Scripting Commands}}
{{GameCategory|arma2|Scripting Commands}}
{{GameCategory|arma3|Scripting Commands}}
{{GameCategory|tkoh|Scripting Commands}}

Latest revision as of 09:46, 16 June 2024

Hover & click on the images for description

Description

Description:
Returns the combat mode of the given AI group. See setCombatMode for more information about combat modes.
Groups:
GroupsAI Behaviour

Syntax

Syntax:
combatMode group
Parameters:
group: One of
Return Value:
String - one of:
  • "BLUE"
  • "GREEN"
  • "WHITE"
  • "YELLOW"
  • "RED"
  • "ERROR"

Examples

Example 1:
if (combatMode _grp1 == "BLUE") then {_grp1 setCombatMode "GREEN"};

Additional Information

See also:
Combat Modes setCombatMode behaviour setBehaviour skill setSkill Arma 3: AI Skill setUnitCombatMode unitCombatMode setCombatBehaviour combatBehaviour

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note
Ceeeb
In OFP v1.96, combatMode return value does not change when unit's combat mode is set with radio commands, i.e troops under the player's command.