• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Unit Respawn Issues

Status
Not open for further replies.

LusciousK

L

LusciousK

I can get these units to respawn but they always be respawning where they die I want them to respawn where I placed them >_> but I try and do regions and that doesnt work because they go to different regions that i didnt set GRrr im so frustrated please help :ugly:
 
Well you detect all the units you want to respawn.
Then for each of them you save their position and rotation in 4 variable arrays (unit type, X,Y and rotation).
You then store the array index on the unit via the handy custom value natives that enable one to store an integer on a unit.
When a unit dies, you get the custom value of it and store it in a local, you then wait your respawn time (polledwait recomended for better accuracy) and then create a new unit from the stored value and your arrays and then reattach the index to it so the cycle can repeat.
 
Epimeliad , your way does not meet the requirements of LusciousK as he clearly stated that he has one that does that already but wants one that. . .
respawn where I placed them

Which means where he placed them in the the worldeditor (their starting position).

I just noticed that you can remove the unit type array as you can get the unit type from the dying unit and store that in a local as well.
 
Ah, Thank you guys so much I got it to work now much appreciated.
 
Status
Not open for further replies.
Back
Top