Jump to content
Sign in to follow this  
ZuluNineFiveActual

Make AI go prone regardless of surroundings

Recommended Posts

I want to create an ambush that is activated by a trigger when BLUFOR is present, but apparently, even when I use "This SetUnitPos "down"" and Stealth mode for the AI, they won't go prone, they like to move around and crouch behind trees. I want them to stay proned no matter what their surroundings are. Also, I don't want the BLUFOR AI to spot the ambush before they arrive at the trigger. Is there anyway to do that? Any help is appreciated.

And yes, I've searched the forums and nothing similar came up.

Share this post


Link to post
Share on other sites

thanks for the tip, i believe disableAI can prevent the ambush from being seen, but does hideObject really make the object invisble or just make it invisible for the AI?

Share this post


Link to post
Share on other sites

disableAI "AUTOTARGET" on the BLUFOR AI should prevent them from engaging the ambush if detected, but if you really want the ambush to be completely undetected until triggered, I prefer my method. hideObject does make the object invisible, so if that is for some reason not acceptable, disableAI is probably the better choice for you.

Can you be more specific about the scenario?

Share this post


Link to post
Share on other sites

I am making a night mission, where a squad of BLUFOR soldier advances down a road, and enters into a trigger, this trigger will then trigger the ambush, with enemy from both left and right firing at the squad of BLUFOR soliders. To be exact, the ambush is at 008030 and 009030 of the Takistan map. There is a part where there is a lot of trees and that's where most of the ambush force is hidden. The problem I have is stated above, where they won't stay prone but crouch behind trees, and also AI will detect them.

Your solution sounds interesting, so I can actually make the object invisble, enabling both the AI and the player to not see the enemy until the trigger is activated. And by using a command I can reveal the ambush?

Share this post


Link to post
Share on other sites
Your solution sounds interesting, so I can actually make the object invisble, enabling both the AI and the player to not see the enemy until the trigger is activated. And by using a command I can reveal the ambush?

Yup!

In the init line of the OPFOR group leader, put this:

ambush1 = group this; {_x enableSimulation false; _x hideObject true} forEach units ambush1;

This names the group "ambush1" then "turns off" all of the units in that group at mission start. If you have more than one group, just do the same for each group leader, but change the name (for example, ambush2, ambush3, etc.)

In the OnAct line of the trigger, put this:

{_x enableSimulation true; _x hideObject false} forEach units ambush1;

This "turns on" all units in ambush1. Again, if you have more than one group, just duplicate the command:

{_x enableSimulation true; _x hideObject false} forEach units ambush1; {_x enableSimulation true; _x hideObject false} forEach units ambush2; {_x enableSimulation true; _x hideObject false} forEach units ambush3;

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  

×