Jump to content
Sign in to follow this  
roguetrooper

How to make A.I. sit?

Recommended Posts

How is it possible to make an A.I. unit sit down and STAY seated under all circumstances?

removeAllWeapons this;
this setCombatMode "blue";
this setBehaviour "careless";
this switchmove "AidlPsitMstpSnonWnonDnon_ground00";
this disableAI "target";
this disableAI "move";
this stop true;
+Trigger: true, unit action ["sitdown",unit]

It is not possible to make this unit (not grouped) stay seated. When the player comes near him, he stands up and salutes :mad:

Share this post


Link to post
Share on other sites

Hi, try:

this setVariable ["BIS_noCoreConversations", true];

_neo_

Share this post


Link to post
Share on other sites

G'day RogueTrooper,

First of all download the Animation Viewer if you haven't already (really helps finding the write animations). The problem your facing here is when the AI finishes the animation, they continue doing whatever they were doing earlier. I encountered this same problem adding animations in my missions. You basically have to add a loop like:

hideObject "TestVehicle";
while {(damage "TestVehicle") < 1} do {
"play sitting animation";
sleep 10;
};
"play standing animation";

and you create a trigger, activated by the player, around the soldiers who are sitting, and in its "onAct" field add:

"TestVehicle" setDammage 1;

Therefore, the AI will continuosly sit (no matter what, because of the loop) until you enter the trigger - thus, setting of the "TestVehicle" - causing the loop to exit and the next line "play standing animation", to be executed.

You don't have to use a vehicle for the loop it could be a soldier or anything else that you can set the damage of. Also, you may need to toy around with the sleep length, as the sitting animation is pretty brief.

Hope this helps,

undercoverbrother

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  

×