fleeing: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "\[\[Category:[ _]?Scripting[ _]Commands[ _]Arma[ _]3(\|.*)]]" to "{{GameCategory|arma3|Scripting Commands}}") |
Lou Montana (talk | contribs) m (Text replacement - "(\|[pr][0-9]+ *= *[^- ]*) *- *R([a-z ])" to "$1 - r$2") |
||
(26 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{ | {{RV|type=command | ||
| ofp | | |game1= ofp | ||
|version1= 1.00 | |||
|1.00 | |game2= ofpe | ||
|version2= 1.00 | |||
| | |game3= arma1 | ||
|version3= 1.00 | |||
| | |game4= arma2 | ||
|version4= 1.00 | |||
| Checks if a unit is fleeing. | |game5= arma2oa | ||
|version5= 1.50 | |||
|game6= tkoh | |||
|version6= 1.00 | |||
|game7= arma3 | |||
|version7= 0.50 | |||
|arg= global | |||
|gr1= Object Manipulation | |||
|descr= Checks if a unit is fleeing. | |||
<br><br> | <br><br> | ||
Notes: | Notes: | ||
Line 25: | Line 40: | ||
* When reaching their flee point/destination, they will change to [[combatMode]] yellow and [[speedMode]] normal. | * 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. | * With [[allowFleeing]] one can make unit's flee earlier (or essentially never flee). Apply it, overrides the courage subskill influence. | ||
| [[ | |s1= [[fleeing]] unit | ||
|p1= | |p1= unit: [[Object]] | ||
| [[Boolean]] - | |r1= [[Boolean]] - returns [[true]] if a unit is fleeing, [[false]] if not. '''Dead''' or '''empty''' units return [[false]]. | ||
| | |x1= <sqf>if (fleeing soldier_1) then {player sideChat "We have won!"} else {player sideChat "Keep fighting!"};</sqf> | ||
|seealso= [[allowFleeing]] | |||
}} | }} | ||
Latest revision as of 15:47, 8 November 2023
Description
- Description:
- Checks if a unit is fleeing.
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 Manipulation
Syntax
- Syntax:
- fleeing unit
- Parameters:
- unit: Object
- Return Value:
- Boolean - returns true if a unit is fleeing, false if not. Dead or empty units return false.
Examples
- Example 1:
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
Categories:
- Scripting Commands
- Introduced with Operation Flashpoint version 1.00
- Operation Flashpoint: New Scripting Commands
- Operation Flashpoint: Scripting Commands
- Operation Flashpoint: Elite: Scripting Commands
- ArmA: Armed Assault: Scripting Commands
- Arma 2: Scripting Commands
- Arma 2: Operation Arrowhead: Scripting Commands
- Take On Helicopters: Scripting Commands
- Arma 3: Scripting Commands
- Command Group: Object Manipulation