combatMode: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\[\[Category\: ?Command[ _]Group\:.*\|\{\{uc\:\{\{PAGENAME\}\}\}\}\]\] " to "")
mNo edit summary
 
(48 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{Command|Comments=
{{RV|type=command
____________________________________________________________________________________________


| ofp |Game name=
|game1= ofp
|version1= 1.00


|1.00|Game version=
|game2= ofpe
|version2= 1.00


|arg= global |Multiplayer Arguments=
|game3= arma1
|version3= 1.00


|gr1= Groups |GROUP1=
|game4= arma2
____________________________________________________________________________________________
|version4= 1.00


| Returns the combat mode of the given AI [[Group | group]]. See [[setCombatMode]] for more information about combat modes. |DESCRIPTION=
|game5= arma2oa
____________________________________________________________________________________________
|version5= 1.50


| [[combatMode]] group|SYNTAX=
|game6= tkoh
|version6= 1.00


|p1= group: [[Group]] or [[Object]]. If the argument is unit [[Object]], unit's current group is used. |PARAMETER1=
|game7= arma3
|version7= 0.50


| [[String]] - 
|arg= global
One of "BLUE", "GREEN", "WHITE", "YELLOW" and "RED" or "ERROR" |RETURNVALUE=
____________________________________________________________________________________________
 
|x1= <code>[[if]] ([[combatMode]] _grp1 == "BLUE") [[then]] {_grp1 [[setCombatMode]] "GREEN"};</code> |EXAMPLE1=
____________________________________________________________________________________________


| [[Combat Modes]], [[setCombatMode]], [[behaviour]], [[setBehaviour]], [[skill]], [[setSkill]], [[Arma 3 AI Skill]], [[setUnitCombatMode]], [[unitCombatMode]] |SEEALSO=
|gr1= Groups


}}
|gr2= AI Behaviour


<h3 style="display:none">Notes</h3>
|descr= Returns the combat mode of the given AI [[Group | group]]. See [[setCombatMode]] for more information about combat modes.
<dl class="command_description">
<!-- Note Section BEGIN -->


<dd class="notedate">Posted on August 3, 2006 - 14:25
|s1= [[combatMode]] group
<dt class="note">[[User:Hardrock|hardrock]]<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.
|p1= group: One of
* [[Group]]
* [[Object]] of type [[Object|Unit]] - if the argument is unit [[Object]], unit's current group is used.


<dd class="notedate">
|r1= [[String]] - one of:
<dt class="note">[[User:Ceeeb|Ceeeb]]
* "BLUE"
<dd class="note">
* "GREEN"
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.
* "WHITE"
* "YELLOW"
* "RED"
* "ERROR"


<!-- Note Section END -->
|x1= <sqf>if (combatMode _grp1 == "BLUE") then {_grp1 setCombatMode "GREEN"};</sqf>
</dl>


<h3 style="display:none">Bottom Section</h3>
|seealso= [[Combat Modes]] [[setCombatMode]] [[behaviour]] [[setBehaviour]] [[skill]] [[setSkill]] [[Arma 3: AI Skill]] [[setUnitCombatMode]] [[unitCombatMode]] [[setCombatBehaviour]] [[combatBehaviour]]
}}


<dl class="command_description">


<dt><dt>
<dd class="notedate">
<dt class="note">[[User:Ceeeb|Ceeeb]]</dt>
<dd class="note">
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>
[[Category:Scripting Commands|COMBATMODE]]
[[Category:Scripting Commands OFP 1.99|COMBATMODE]]
[[Category:Scripting Commands OFP 1.96|COMBATMODE]]
[[Category:Scripting Commands OFP 1.46|COMBATMODE]]
[[Category:Scripting Commands Armed Assault|COMBATMODE]]
[[Category:Scripting Commands Arma 2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Take On Helicopters|{{uc:{{PAGENAME}}}}]]
[[Category:Command Group: Unit Control]]

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.