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

Respawning units

Status
Not open for further replies.
Level 2
Joined
Jun 3, 2010
Messages
6
So when you spawn a unit and when he dies How to create the same unit again in the same location :goblin_cry: :goblin_boom: Any help plz!?but no time like spawn unit in 0:13sec(exp)
 
Level 3
Joined
Nov 10, 2011
Messages
51
you will need variables to make it. first go to the (x) mark it is beside the (New category mark) or press (ctrl+b) then make variable of type "unit" and another variable of type "point". the (unit) variable i called it Unit, while the (point) variable i called Position, then do the following triggers. if you need more help speak your mind.


  • Respawn
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to Blood Mage
    • Actions
      • Set Unit = (Dying unit)
      • Set position = (Position of Unit)
      • Wait 0.01 seconds
      • Unit - Create 1 (Unit-type of Unit) for (Owner of Unit) at position facing (Position of Unit)
 
  • Respawn
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to Blood Mage
    • Actions
      • Set Unit = (Dying unit)
      • Set position = (Position of Unit)
      • Wait 0.01 seconds
      • Unit - Create 1 (Unit-type of Unit) for (Owner of Unit) at position facing (Position of Unit)
Omg ??? Are you serious, you remove the MUI for store locations (without remove leaks) and unit in useless variables ?

  • Respawn
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Wait 0.01 seconds
      • Set position = (Position of Triggering unit)
      • Unit - Create 1 (Unit-type of Triggering) for (Triggering player) at position facing position.
      • Custom Script : call RemoveLocation(udg_position)
And a revive should be really better :

  • Respawn
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Wait 0.01 seconds
      • Set position = (Position of Triggering unit)
      • Hero - Revive (Triggering unit) at position (Hide revive graphics)
      • Custom Script : call RemoveLocation(udg_position)
 
Status
Not open for further replies.
Top