• 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] Help with unit - timer removal

Status
Not open for further replies.
Level 5
Joined
Jan 25, 2006
Messages
103
Hi all, I need help with making this thing work.
I am trying to do: A player clicks an icon and I have dummy unit set up, now that dummy is removed, the real unit is spawned at the center, i add expiration counter for the unit and when the timer expires the unit is removed and counter destroyed.
The problem arises when you train more than one of this unit.
So if you train second unit, the counter that is attached to the first unit that needs to expire is reset, and even when the counter expires, only 1 unit is removed instead of both, since I'm using 1 timer variable, but the thing is I don't know how else to make this work.
here are the triggers I'm using:
2hwmjv5.jpg

and
dcio9.jpg


Any idea how to make it work, so that even if you spawn several of these units or couple of users spawn these unit, each has its own counter separate from one another and the units are being removed as each counter expires properly.

Thanks in advance!
 
Level 16
Joined
Oct 12, 2008
Messages
1,570
first of all:
In the Trigger Editor, you can copy a trigger as text, then u can paste it here, in [trigger.][/trigger.] tags (without the dot), like this:
  • Set Jaina = (Last Created Unit)
Then: Second, you order the Trained unit to attack, but before that, you already Removed it!
Third, that is called MUI making, this is like a spell, make it MUI,,
Use indexing, using arrays, try it yourself,,
 
Level 16
Joined
Oct 12, 2008
Messages
1,570
MUI = Multi unit instancable
Meaning i can cast it with a thousand units at the same time without bugging,,
In your thing: Training a thousand jainas at the same time without bugging,,
(Probably that would lagg, a thousand times, but you know what i mean)
 
Status
Not open for further replies.
Top