Jump to content

Recommended Posts

Hi Community!

Im trying to make an air defence system with the praetorian C which targets and shoots at a unit when they enter a trigger. My problem lies with when i try to get it to shoot at it. Absolutely nothing I have tried has worked. When the unit enters the trigger it enables the simulation of the aa cannon (praetorian c) and does doTarget and then the unit name. I need a bit of code to make it fire after that.
Thanks in advance!

Share this post


Link to post
Share on other sites
obj setBehaviour "COMBAT";
obj setCombatMode "RED";   

(group obj) reveal [target,4];
obj doWatch target;
obj doTarget target;
obj doFire target;

 

Share this post


Link to post
Share on other sites

The target must be within the set viewdistance. Otherwise it is impossible for AI to fire at anything (to my knowledge)

 

SP: Viewdistance is as per the user's setting. Or by the forced SetViewdistance command from the mission.

 

MP: The viewdistance set local to the server.

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

×