Jump to content
Sign in to follow this  
cr4wl3r0

stopping ai wounded units

Recommended Posts

Hello everyone !

I have noticed that when my ai squad members are wounded they go prone and continue to follow my commands (i.e. "all, advance). Is there a way (script into the init file) to check if an ai is wounded ad prevent him from moving (or issue any other command, for example findcover, only for that or those wounded units ?).

Thank you very much !

Share this post


Link to post
Share on other sites

Usually I deactivate the crouching with the help of canStand and setHit

Either with triggers:

* multiple activation
* condition: (alive unit) and !(canstand unit)
* activation: unit setHit ["legs", 0]

Or with eventhandlers in the init-lines:

this addEventHandler ["Hit", {(_this select 0) setHit ["legs", 0] }];
this addEventHandler ["Dammaged", {(_this select 0) setHit ["legs", 0] }];

The units still take normal damage. They just still can walk on when their legs are hit.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×