OFPEC Forum

Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting General => Topic started by: stephen271276 on 05 Feb 2011, 22:54:45

Title: How to set an ai back to its normal behaviour??
Post by: stephen271276 on 05 Feb 2011, 22:54:45
Hi at the start of a mission I have a group of ai kneeling ang shooting targets using >>>>>  m1 setunitPos "middle"; this disableAI "move"; m1 commandTarget t1; <<<< in a trigger

Now this is just for realism as the player will find them training by shooting att targets in a camp...... I need to know how to using a "BLUFOR detected by OPFOR" trigger to then cancel all that out and the ai to just act normal by attacking the player.....
Ive tried thr detect trigger to delete the first trigger but the ai just stay kneeling?
Title: Re: How to set an ai back to its normal behaviour??
Post by: Denz on 05 Feb 2011, 23:45:10
If I understand what you are wanting then use
Code: [Select]
m1 setUnitPos "auto"to return them back to being able to function as the situation demands.

edit:
Apologies, I totally forgot about reenabling the AI's ability to move.
Apparently I can't read the whole question  :-[
Title: Re: How to set an ai back to its normal behaviour??
Post by: Wolfrug on 06 Feb 2011, 12:28:00
Yep.

m1 setunitpos "auto"; m1 enableAi "Move";

Should be enough :) Easy enough.

Wolfrug out.
Title: Re: How to set an ai back to its normal behaviour??
Post by: Bingoz on 12 Feb 2011, 07:14:30
^--- Thats the one.