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

Respawnable Units...

Status
Not open for further replies.
Level 6
Joined
Aug 22, 2005
Messages
113
Right now, I made the idiotic mistake of using units, INSTEAD of Heroes.

So now, I face a dilemma.

I want to make the unit RESPAWN After about 10 seconds, so I guess this would be the most convienent way

If: A unit Dies

Then: Wait 10.50 Seconds
Then: Create 1 (Unit-Type of (Dying Unit)) for (Owner of (Dying Unit)) at center of SPAWN POINT

However, it never spawns the unit. Because the unit is already dead. I tried Unit Groups, Triggering Units, everything. What's the cure?
 
Level 8
Joined
Dec 29, 2006
Messages
359
Maybe try setting the dying unit to a variable and use the create matching unit action, i think thats the name of the action, but i cant check right now cuz im on a laptop atm.
 
Level 6
Joined
Aug 22, 2005
Messages
113
Maybe try setting the dying unit to a variable and use the create matching unit action, i think thats the name of the action, but i cant check right now cuz im on a laptop atm.

I thought about that. But this would be the variable

Set PLAEYR_UNITTYPE(Player number of(Owner of Triggering/Dying Unit))
Wait 10.50
Spawn 01 (Unit-Type of(PLAEYR_UNITTYPE(P...))

In the end that wouldn't even work...since the Player Number looks for the Owner of the Unit, which is already dead.

So that wouldn't work either
 
Level 24
Joined
Jun 26, 2006
Messages
3,406
Change the entire trigger to custom text and then paste it, it's not nearly as hard as it seems.

by the way, you can edit instead of double posting.
 
Level 4
Joined
May 23, 2007
Messages
94
Right now, I made the idiotic mistake of using units, INSTEAD of Heroes.

So now, I face a dilemma.

I want to make the unit RESPAWN After about 10 seconds, so I guess this would be the most convienent way

If: A unit Dies

Then: Wait 10.50 Seconds
Then: Create 1 (Unit-Type of (Dying Unit)) for (Owner of (Dying Unit)) at center of SPAWN POINT

However, it never spawns the unit. Because the unit is already dead. I tried Unit Groups, Triggering Units, everything. What's the cure?

y dont u just make a revive function instead of creating an entire new unit?


Edit- either that or change dying unit to triggering and see if that works
 
Status
Not open for further replies.
Top