• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] A trigger to order spawned units to...

Status
Not open for further replies.
Level 12
Joined
Feb 13, 2009
Messages
388
I'd like to get a sample of good not-lagging trigger which redirects unit of a special type (i.e. with a custom value of X) to move-attack to the nearest human player unit.

I wonder how to make it effective, because triggering multiple units to attack random targets starts to lag my map when there's a lot of units (or I am being dumb making some leaking).

Anyway even an algorythm how to do it would be great.

The 1st question: I want units to attack-move to the position of the nearest player-unit (so they attack creeps in the way); will the position of a targeted unit be auto-updated so they follow the unit or do they attack-move to the position which the attacked unit occupied in the moment the order was set, and if the unit moves away they just come to an empty position?

The 2nd question: how to actually effectively check for the closest one which belongs to any of the human players when you determine the target?

Any suggestions are welcome.
 
Last edited:
Status
Not open for further replies.
Top