• 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.

Last Created Unit

Status
Not open for further replies.
Level 8
Joined
Oct 2, 2013
Messages
288
So I have this little trigger here:

For each integer 1 to X.
- Create Unit
- Do stuff with Last Created Unit
- Wait a few seconds.

Will this Waiting function combined with Last-Created-Unit function eventaully interfere with other Unit Creating Triggers?

I've been warned about using Wait triggers this way. Would it be better if I create all the units beforehand in one instance/frame?

I hope I've explained it well enough. Otherwise, please ask me to try again :)
Thanks a lot in advance.
 
Level 28
Joined
Sep 26, 2009
Messages
2,520
No it won't.
Last created unit refers to last created unit in game. It is not limited to last unit created via certain trigger or anything. It refers to unit which was in the whole map created last.

Problem is in this:
1) Create unit
2) wait
3) now after wait trying to refer to that created unit as last created unit

This is not your case though, as you do all actions with the unit immediately and then you use wait and after wait you no longer refer to the unit you created before the wait.
 
No it won't.
Last created unit refers to last created unit in game. It is not limited to last unit created via certain trigger or anything. It refers to unit which was in the whole map created last.

Problem is in this:
1) Create unit
2) wait
3) now after wait trying to refer to that created unit as last created unit

This is not your case though, as you do all actions with the unit immediately and then you use wait and after wait you no longer refer to the unit you created before the wait.

Won't the reference back to Last created unit also be lost after a wait?
 
Status
Not open for further replies.
Top