Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×
Sign in to follow this  
Taylor1984

How to tell when a unit has lost target or make a unit lose target?

Recommended Posts

Hi!

 

I have a AT gun that won't fire at infantry originally, which I force to fire at infantry using fireAtTarget in a loop until the target is dead. Problem is if the target runs into good cover the gun will just keep aim at the target even though it can't see it. I would like to find a way to make the gun forget about the target once it loses sight of the target. Should I use targetKnowledge and how would I do that?

 

Thanks

Share this post


Link to post
Share on other sites

Thanks for the tips. Maybe I could try at the start of the firing loop of checking knowsabout and at the middle of the loop firing the gun and directly afterwards use forgettarget? Would that work you think?

 

Could I use intersect to check if the unit has visual of the target? It seems complicated for someone like me who's not that good at math.

Share this post


Link to post
Share on other sites
Sign in to follow this  

×