fleeing: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "[[Category:Scripting Commands ArmA|" to "[[Category:Scripting Commands Armed Assault|")
(improved description)
Line 9: Line 9:
____________________________________________________________________________________________
____________________________________________________________________________________________


| Checks if a unit is fleeing. |DESCRIPTION=
| Checks if a unit is fleeing.
<br><br>
Notes:
* Fleeing only affects AI lead groups.
* The courage of the AI group is based on the group's leader courage [[Arma_3_AI_Skill#Sub-Skills|courage subskill]].
* Each group has a max strength (summed "armor" of all infantry units - plus armor when inside vehicles).
* If the group losses by injury/damage or death/destruction are higher than the max strength, multiplied by leader's courage or [[allowFleeing]] level , then the group will start fleeing.
* As result primarily the AI flees to a nearby "supply point" (some friendly units - preferably with medic or engineer, or a vehicle with repair/ammo/fuel cargo). Alternatively it will try to find a safe position within a 600m radius from the initial waypoint (danger, distance, amount of cover positions are taken into account).
* After the fleeing has been finished the group's initial strength is reset.
* Fleeing units in [[combatMode]] red, will be set to yellow when fleeing to avoid engaging enemies while doing so.
* While fleeing, the group leader will be set to green, to avoid giving engage or fire orders, unless in [[combatMode]] blue already. Also [[speedMode]] is set to full.
* When reaching their flee point/destination, they will change to [[combatMode]] yellow and [[speedMode]] normal.
* With [[allowFleeing]] one can make unit's flee earlier (or essentially never flee). Apply it, overrides the courage subskill influence.
|DESCRIPTION=
____________________________________________________________________________________________
____________________________________________________________________________________________


Line 16: Line 29:
|p1= unitName: [[Object]] |PARAMETER1=
|p1= unitName: [[Object]] |PARAMETER1=


| [[Boolean]] -
| [[Boolean]] - Returns true if a unit is fleeing, false if not. Dead or empty units return false. |RETURNVALUE=
Returns true if a unit is fleeing, false if not. Dead or empty units return false. |RETURNVALUE=
____________________________________________________________________________________________
____________________________________________________________________________________________
   
   
Line 46: Line 58:
<!-- CONTINUE Notes -->
<!-- CONTINUE Notes -->
<dl class="command_description">
<dl class="command_description">
<dd class="notedate">Posted on December 31, 2019 - 08:56 (UTC)</dd>
 
<dt class="note">[[User:.kju|.kju]]</dt>
<dd class="note">
Fleeing units in [[combatMode]] red, will be set to yellow when fleeing to avoid engaging enemies while doing so.
The group leader will be set to green, to avoid giving engage or fire orders, unless in [[combatMode]] blue already.
Finally [[speedMode]] is set to full.
<br><br>
When reaching their flee point/destination, they will change to [[combatMode]] yellow and [[speedMode]] normal.
</dd>
</dl>
</dl>
<!-- DISCONTINUE Notes -->
<!-- DISCONTINUE Notes -->

Revision as of 13:29, 13 August 2020

Hover & click on the images for description

Description

Description:
Checks if a unit is fleeing.

Notes:
  • Fleeing only affects AI lead groups.
  • The courage of the AI group is based on the group's leader courage courage subskill.
  • Each group has a max strength (summed "armor" of all infantry units - plus armor when inside vehicles).
  • If the group losses by injury/damage or death/destruction are higher than the max strength, multiplied by leader's courage or allowFleeing level , then the group will start fleeing.
  • As result primarily the AI flees to a nearby "supply point" (some friendly units - preferably with medic or engineer, or a vehicle with repair/ammo/fuel cargo). Alternatively it will try to find a safe position within a 600m radius from the initial waypoint (danger, distance, amount of cover positions are taken into account).
  • After the fleeing has been finished the group's initial strength is reset.
  • Fleeing units in combatMode red, will be set to yellow when fleeing to avoid engaging enemies while doing so.
  • While fleeing, the group leader will be set to green, to avoid giving engage or fire orders, unless in combatMode blue already. Also speedMode is set to full.
  • When reaching their flee point/destination, they will change to combatMode yellow and speedMode normal.
  • With allowFleeing one can make unit's flee earlier (or essentially never flee). Apply it, overrides the courage subskill influence.
Groups:
Uncategorised

Syntax

Syntax:
Boolean = fleeing unitName
Parameters:
unitName: Object
Return Value:
Boolean - Returns true if a unit is fleeing, false if not. Dead or empty units return false.

Examples

Example 1:
? (fleeing _east_unit) : player sideChat "We have won!"

Additional Information

See also:
allowFleeing

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

Notes

Bottom Section