Login
OFPEC RSS
Username:
Password:
Not a member yet?
Register for free!
Home
Intel Depot
Editors Depot
Missions Depot
Addons Depot
Forum
Home
›
COMREF
›
A
›
allowFleeing
unitName
allowFleeing
courage
Operand types
unitName
:
Object or Group
courage
:
Number
Type of returned value
Nothing
Description
Set group courage.
0 means maximum courage (No fleeing).
1 means least courage (Always fleeing).
Less courage means the group will start fleeing sooner.
Used In
OFP/ArmA
Example
soldierOne allowFleeing 0
Types
Arrays
Scripting Topics
BIS Functions
Arma2 CfgVehicles
Arma2 Weapons
ArmA CfgVehicles
ArmA Weapons
OFP CfgVehicles
OFP Weapons
- Select Game -
List All
Arma2:OA Only
Arma2 Only
ArmA Only
Elite
Original OFP
- Select Type -
objects
units
groups
vehicles
weapons
markers
environment
game
dialogs
cutscenes
sound
mathematics
variables
script commands
multiplayer
3D editor
Top of page
Thus fleeing only works properly for units who have moved from their initial position - units cannot be made to flee if they haven't been assigned any instructions to move and have only stood still in their initial position for the whole mission duration.
Units' courage until they start fleeing is affected by the injured and death units they have. The allowFleeing command works as a multiplier for this.
A couple of examples:
- Let's imagine we have a group of 12 men with 'allowFleeing' value of 0.5 - this means that the group must have less than 6 men alive (12 * 0.5 = 6) for it to start fleeing
- A group of 12 men with 'allowFleeing' value of 0.8 means that the group must have less than 10 men alive (12 * 0.8 = 9.6 (~ 10)) for it to start fleeing.
So in a nutshell: The maximum number of units the group must have alive until out of courage and start fleeing can be calculated by multiplying the number of units by their 'allowFleeing' value.
Injured units are also a factor as already mentioned, but it's a little harder to determine - units who've lost their legs (canStand) seem to add up to the probability of fleeing. Less serious injuries are a smaller factor.
Default 'allowFleeing' value is 0.5
Units' skill and rank don't have any effect on the their courage at all. Nor does the enemies they're facing.
(Tests performed in OFP: Resistance v.1.96)