Captain Dodger 0 Posted September 8, 2018 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
Spatsiba 89 Posted September 8, 2018 Have you tried https://community.bistudio.com/wiki/doFire? Share this post Link to post Share on other sites
stanhope 409 Posted September 8, 2018 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
Crielaard 434 Posted September 9, 2018 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