allowFleeing: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(improved description)
m (Text replacement - "<code>([a-zA-Z0-9_]+) +\[\[([a-zA-Z0-9_]+)\]\] +([a-zA-Z0-9_]+);?<\/code>" to "<sqf>$1 $2 $3;</sqf>")
 
(22 intermediate revisions by 2 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= local |Multiplayer Arguments=
|game3= arma1
|version3= 1.00


|eff= global |Multiplayer Effects=
|game4= arma2
____________________________________________________________________________________________
|version4= 1.00


| Sets the cowardice level (the lack of courage or bravery) of a group or unit.
|game5= arma2oa
<br><br>
|version5= 1.50
Notes:
 
* The more cowardice a [[Group]] or [[Object]] has, the sooner it will start fleeing.
|game6= tkoh
* 0 means maximum courage, while 1 means always fleeing.
|version6= 1.00
* More details in [[fleeing]]
|DESCRIPTION=
____________________________________________________________________________________________


| name '''allowFleeing''' cowardice |SYNTAX=
|game7= arma3
|version7= 0.50


|p1= name: [[Object]] or [[Group]] |PARAMETER1=
|arg= local


|p2= cowardice: [[Number]] |PARAMETER2=
|eff= global


| [[Nothing]] |RETURNVALUE=
|gr1= Object Manipulation
____________________________________________________________________________________________
 
|x1= <code>_group1 [[allowFleeing]] 0;</code> |EXAMPLE1=
____________________________________________________________________________________________


| [[fleeing]] |SEEALSO=
|gr2= Groups


}}
|descr= Sets the cowardice level (the lack of courage or bravery) of a group or unit.
<br><br>
Notes:
* Fleeing only affects AI led groups.
* Only the group as a whole can flee (or not).
* The courage of the AI group is based on the group's leader [[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.
 
|s1= unitOrGroup [[allowFleeing]]  cowardice
 
|p1= unitOrGroup: [[Object]] or [[Group]]


<h3 style="display:none">Notes</h3>
|p2= cowardice: [[Number]] - 1 is maximum cowardice and 0 minimum. A value of 0 will disable fleeing all together
<dl class="command_description">
<!-- Note Section BEGIN -->


<!-- Note Section END -->
|r1= [[Nothing]]
</dl>


<h3 style="display:none">Bottom Section</h3>
|x1= <sqf>_group1 allowFleeing 0;</sqf>


[[Category:Scripting Commands|ALLOWFLEEING]]
|seealso= [[fleeing]]
[[Category:Scripting Commands OFP 1.99|ALLOWFLEEING]]
}}
[[Category:Scripting Commands OFP 1.96|ALLOWFLEEING]]
[[Category:Scripting Commands OFP 1.46|ALLOWFLEEING]]
[[Category:Scripting Commands Armed Assault|ALLOWFLEEING]]
[[Category:Command_Group:_Unit_Control|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Take On Helicopters|{{uc:{{PAGENAME}}}}]]

Latest revision as of 13:25, 5 May 2022

Hover & click on the images for description

Description

Description:
Sets the cowardice level (the lack of courage or bravery) of a group or unit.

Notes:
  • Fleeing only affects AI led groups.
  • Only the group as a whole can flee (or not).
  • The courage of the AI group is based on the group's leader 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:
Object ManipulationGroups

Syntax

Syntax:
unitOrGroup allowFleeing cowardice
Parameters:
unitOrGroup: Object or Group
cowardice: Number - 1 is maximum cowardice and 0 minimum. A value of 0 will disable fleeing all together
Return Value:
Nothing

Examples

Example 1:
_group1 allowFleeing 0;

Additional Information

See also:
fleeing

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