_Unit = _this select 0

? (vehicle _unit != driver _unit): exit

@ (_unit == leader _unit)

#Combat
? !(Alive _Unit): Exit
? Fleeing _Unit: Goto "Fleeing"
~1
? (behaviour _Unit != "COMBAT") : goto "Combat"
~0.01
? Fleeing _Unit: Goto "Fleeing"

~1
_rand = random 7

_num = _rand +1 - (_rand mod 1)

~_rand

~1

call format[{_unit say "FPW_P_ATTACK%1"},_num]

~3

#NoCombat
? !(Alive _Unit): Exit
? Fleeing _Unit: Goto "Fleeing"
~1
? (behaviour _Unit == "COMBAT") : goto "Nocombat"
~0.01
goto "Combat"

#Fleeing
? !(Alive _Unit): Exit

_rand = random 3

_num = _rand +1 - (_rand mod 1)

~_rand

~1

call format[{_unit say "FPW_P_RETREAT%1"},_num]

~3
Goto "Delay"

#Delay
? !(Alive _Unit): Exit
~0.01
@ !(Fleeing _Unit)
~0.01
Goto "Assembly"

#Assembly
? !(Alive _Unit): Exit
_rand = random 7

_num = _rand +1 - (_rand mod 1)

~_rand

~1

call format[{_unit say "FPW_P_ATTACK%1"},_num]
~9
Goto "Combat"





