• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

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.
 

Zwiebelchen

Hosted Project GR
Level 35
Joined
Sep 17, 2009
Messages
7,236
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