Open nicolasbadano opened 9 years ago
Behavior doesn't change until minutes after the last enemy was seen. How about you let the AI search for cover and treat itself there? Not sure how since findCover apparently doesn't work.
Behavior doesn't change until minutes after the last enemy was seen.
I suspected as much.
How about you let the AI search for cover and treat itself there?
I think that AGM should minimize AI scripting for the moment. There are a couple of great AI frameworks in Arma 3 that might malfuction if we start giving AI to many (posibly conflicting) commands.
An alternative to behaviour may be to check the nearTargets array and only trigger heals if there are no known enemies nearby (400m ?)
NearTargets might be wallhack-ish in a mission where the AI gets injured but doesn't actually see the enemies that are nearby (mines, mortars, explosive charges, etc). How about:
_unit knowsAbout (side _player) < 3.5
Which value would be good has to be tweaked of course. If the unit sees no more enemies, the number decreases automatically, it's quicker than checking the behavior but not instant (unless the enemy is far away or not very visible to the unit).
@KGBCartman, on https://github.com/KoffeinFlummi/AGM/issues/1904#issuecomment-69205355
behaviour
: https://community.bistudio.com/wiki/behaviourReturns the current state of the unit: "CARELESS", "SAFE", "AWARE", "COMBAT" and "STEALTH".
Maybe not trigger heals on "COMBAT" behaviour or only do under certain conditions (e.g. damage > X, is medic, etc)