{"name":"allowFleeing","operator":null,"title":"allowFleeing","type":"command","url":"https://community.bistudio.com/wiki/allowFleeing","revid":310112,"updated":"2022-05-05T12:25:24Z","groups":["Object Manipulation","Groups"],"status":"ok","replaced_by":[],"games":[{"game":"ofp","name":"Operation Flashpoint","version":"1.00"},{"game":"ofpe","name":"Operation Flashpoint: Elite","version":"1.00"},{"game":"arma1","name":"Armed Assault","version":"1.00"},{"game":"arma2","name":"Arma 2","version":"1.00"},{"game":"arma2oa","name":"Arma 2: Operation Arrowhead","version":"1.50"},{"game":"tkoh","name":"Take On Helicopters","version":"1.00"},{"game":"arma3","name":"Arma 3","version":"0.50"}],"since":{"game":"ofp","name":"Operation Flashpoint","version":"1.00"},"arma3_since":"0.50","branch":null,"locality":{"argument":"local","effect":"global","server_exec":false},"exec":null,"description":"Sets the cowardice level (the lack of courage or bravery) of a group or unit.\n\nNotes:\n- Fleeing only affects AI led groups.\n- Only the group as a whole can flee (or not).\n- The courage of the AI group is based on the group's leader courage subskill.\n- Each group has a max strength (summed \"armor\" of all infantry units - plus armor when inside vehicles).\n- 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.\n- 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).\n- After the fleeing has been finished the group's initial strength is reset.\n- Fleeing units in combatMode red, will be set to yellow when fleeing to avoid engaging enemies while doing so.\n- 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.\n- When reaching their flee point/destination, they will change to combatMode yellow and speedMode normal.\n- With allowFleeing one can make unit's flee earlier (or essentially never flee). Apply it, overrides the courage subskill influence.","syntaxes":[{"syntax":"unitOrGroup allowFleeing cowardice","since":null,"effect":null,"exec":null,"params":[{"name":"unitOrGroup","type":"Object or Group","optional":false,"default":null,"description":null,"types":["Object","Group"],"since":null,"text":"unitOrGroup: Object or Group"},{"name":"cowardice","type":"Number","optional":false,"default":null,"description":"1 is maximum cowardice and 0 minimum. A value of 0 will disable fleeing all together","types":["Number"],"since":null,"text":"cowardice: Number - 1 is maximum cowardice and 0 minimum. A value of 0 will disable fleeing all together"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"binary","operator":null,"left":{"text":"unitOrGroup","types":["Object","Group"]},"right":{"text":"cowardice","types":["Number"]}}],"examples":[{"text":"```sqf\n_group1 allowFleeing 0;\n```","code":["_group1 allowFleeing 0;"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["fleeing"],"notes":[],"categories":["ArmA: Armed Assault: Scripting Commands","Arma 2: Operation Arrowhead: Scripting Commands","Arma 2: Scripting Commands","Arma 3: Scripting Commands","Command Group: Groups","Command Group: Object Manipulation","Introduced with Operation Flashpoint version 1.00","Operation Flashpoint: Elite: Scripting Commands","Operation Flashpoint: New Scripting Commands","Operation Flashpoint: Scripting Commands","Scripting Commands","Scripting Commands: Global Effect","Take On Helicopters: Scripting Commands"]}