Jump to content
Sign in to follow this  
Ghostwolf

How do I get AI to sit

Recommended Posts

I'm not really getting much from this thread, I'm fairly new to this and don't really understand what they are talking about. I was hoping to type in a simple command in the units initialization.

Share this post


Link to post
Share on other sites

[this,"SIT_LOW","FULL",{(player distance _this) < 5}] call BIS_fnc_ambientAnimCombat;

this = the unit

"sit low" = the animation

"full" = full gear

{(player distance _this) < 5} = if a player comes within 5 meters the unit playing the animation will stop the animation and go into combat.

Edited by cobra4v320

Share this post


Link to post
Share on other sites
[this,"SIT_LOW","FULL",{(player distance _this) < 5}] call BIS_fnc_ambientAnimCombat;

this = the unit

"sit low" = the animation

"full" = full gear

{(player distance _this) < 5} = if a player comes within 5 meters the unit playing the animation will stop the animation and go into combat.

thanks a bunch, works like a charm.

Share this post


Link to post
Share on other sites

Keep in mind that you can change the way the unit leaves the animation. It could also look like this:

[this,"SIT_LOW","FULL",{(player distance _this) < 5 or _this knowsAbout player > 1.5 or _this getDammage > 0.1}] call BIS_fnc_ambientAnimCombat;

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  

×