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

Units In Waves

Status
Not open for further replies.
Level 4
Joined
Jan 3, 2012
Messages
60
Hey guys!

How do i trigger this: Im making a TD where the towers will become alive in the waves and stading still between the waves. So, i made 2 of each unit, one building and one unit. When the wave starts i want the buildings to be units and when it ends i want the units to be buildings again. When the units are becomming buildings again i want them to be at the same spot as the building was and not at the spot they were that moment. Plus i want all the dead units to resurrect and be buildings again. And one more thing each building has a unit that matches it, so it have to be a specific unit that replaces each building

Sorry for the very bad explanation, but this was really hard to explain...
 
Level 31
Joined
Jun 27, 2008
Messages
2,557
You will need a lot of variables. Set Points to the positions of buildings, hide buildings, create/move units into that point. When buildings again, move units into buildings position, hide unit and unhide building. Create new unit if unit dies.

Of course there are more efficient ways I suppose.
 
Level 17
Joined
Jul 17, 2011
Messages
1,863
when a unit finishes construction add it to a unit group and save its location to another array

at the beggining of the wave pick every unit in the group you first added it to and replace the unit with something else for example

if picked unit is footman
replace with knight.

then add an event which detects if there are no more creeps from the wave
if there are no more creeps in the map remove all the units you replaced and create each unit from the group at the saved location you saved in the array

repeat for each wave
 
Level 4
Joined
Jan 3, 2012
Messages
60
Thanks! But i still dont fully understand what i have to do. Could someone please make a trigger and post it here?
 
Status
Not open for further replies.
Top