Jump to content

Need help! How to get AI face a certain direction in a truck turret.

Recommended Posts

I used a script/command to use for recording vehicle movements. I have that down no problem. 

My problem with my mission is i want the AI in my 4 gun trucks to watch a certain direction and keep that direction throughout that mission for their sector of fire. I.e. South, West, and East. 

I've used different code and nothing seems to work. Plus I'm decently new to scripting and coding. 

The code I've used so far is:


g3 doWatch 265;

g3 setDir 265; 
g3 setFormDir 265;

g3 doWatch e2;


Nothing seems to work. 😩

I placed an Enemy AI for a search and destroy waypoint for the gunners. They look at the direction and then once the convoy starts moving they loose interest, 'stopped watching that direction'.

g3 - Gunner 3

e2 -  Enemy 2

Share this post

Link to post
Share on other sites

If the above doesn't work, g3 disableAI"autoTarget" may help prevent them from selecting another target. Disabling "autoTarget" and "Target" AI features may require you to manually assign targets for the AI though, as this will hinder their ability to find targets on their own.

Share this post

Link to post
Share on other sites

You can also attach invisible targets to the vehicle with an offset in the direction you want the gunner to target.  For example, attach a hidden target 10 meters to left of vehicle and name it targetLeft.  Then issue this command:


g3 doTarget targetLeft;

you might also need to reveal the target first.

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