• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

How does one detect locust?

Status
Not open for further replies.
Okay I managed to get a working example finally, it detects locust units HOWEVER it creates such massive lag it is unfair. . . =(

Am I missing leaks or is the function really not useable with lots of units?

It picks units by player then picks units within range of that picked unit.

Also thanks to everyone who has replied and attempted to help.
 
Pro solution:
in case all the locust units move in predictable (for example linear) patterns like non-homing missiles, you can calculate possible collision cases directly upon creation of the missile instead of doing periodic enumerations.
You just have to check the intersections of 2 parallel lines of each missile mathematically with all other currently existing missiles that are within a certain range.
 
Status
Not open for further replies.
Top