Home   Help Search Login Register  

Author Topic: Is it bossible to know when unit flees?  (Read 602 times)

0 Members and 1 Guest are viewing this topic.

GeneralCoder

  • Guest
Is it bossible to know when unit flees?
« on: 08 Apr 2003, 20:09:55 »
If it would I could make script that enemy surrenders instead of running o way. What do you think about that?

Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
Re:Is it bossible to know when unit flees?
« Reply #1 on: 08 Apr 2003, 20:27:05 »
Sure. I've taken these from the official command reference 1.85. If you need any further explination on them, just ask m'kay  ;)

With this one you set how brave the soldier / group is

unit allowFleeing courage
Operand types:
    unit: Object or Group
    courage: Number
Type of returned value:
    Nothing
Description:
    Set group courage. The less courage, the sooner will group start fleeing. 0 means maximum courage, 1 means always fleeing.

Example:
    soldierOne allowFleeing 0


With this one you detect if the soldier / group is fleeing

fleeing unit
Operand types:
    unit: Object
Type of returned value:
    Boolean
Description:
    Check if unit is fleeing. Dead or empty unit returns false.

Example:
    fleeing eastReconGroup
Not all is lost.

GeneralCoder

  • Guest
Re:Is it bossible to know when unit flees?
« Reply #2 on: 09 Apr 2003, 16:15:15 »
Sure. I've taken these from the official command reference 1.85. If you need any further explination on them, just ask m'kay  ;)

With this one you set how brave the soldier / group is

unit allowFleeing courage
Operand types:
    unit: Object or Group
    courage: Number
Type of returned value:
    Nothing
Description:
    Set group courage. The less courage, the sooner will group start fleeing. 0 means maximum courage, 1 means always fleeing.

Example:
    soldierOne allowFleeing 0


With this one you detect if the soldier / group is fleeing

fleeing unit
Operand types:
    unit: Object
Type of returned value:
    Boolean
Description:
    Check if unit is fleeing. Dead or empty unit returns false.

Example:
    fleeing eastReconGroup


Nice  ;D Thank you!