• 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 7
Joined
Sep 25, 2006
Messages
284
So im makeing a new RPG... but I have no idea how to do the trigger that repawns creeps when they die.
Can anyone please help me?
 
Level 3
Joined
Aug 17, 2006
Messages
38
Well, there's plenty of ways to do this but if you're looking for something simple and easy just go with:

Code:
Event:
A unit owned by <neutral hostile> dies

Actions:
Wait 60 seconds
Replace <triggering unit> with a <Unit-type of <triggering unit>> using the new unit's max life and mana

That'll get you started, but you'll have to tweak it later on for bosses and camper protection and so forth.
 
Level 3
Joined
Aug 17, 2006
Messages
38
No, for the trigger event just use the "Unit - Player-Owned Unit Event" for each enemy player. So, my trigger above just used neutral hostile, but if you had player 11 and 12 as computer enemies then your trigger would look like:

Code:
Event:
A unit owned by <player 11> dies
A unit owned by <player 12> dies

Actions:
Wait 60 seconds
Replace <triggering unit> with a <Unit-type of <triggering unit>> using the new unit's max life and mana

The <triggering unit> is actually what you pick, you don't need to replace it with every unit you have. Hope that helps to clarify things.
 
Level 3
Joined
Apr 21, 2006
Messages
25
Other way

To respawn units you will, most of times, use the same event.
Event-
A unit dies

You put the condition according to the kind of unit. Exemples:
If the unit is a hero: (Triggering Unit) is a (Hero) Equal to (True)
Is is a creep, : Owner of (Triggering Unit) equal to (Neutral Hostile)
And if are just simple player's units only change the (Neutral Hostile),in the exemple above, to the name of the player : Ower of (Triggering Unit) equal to (Player 1)
Like the event, the action is usually the same :
Create 1 (Unit-type of (Triggering Unit)) at (Unit Position *(Position of (Triggering Unit))

* You can change the position of the unit changing the "(Position of (Triggering Unit))" to the name of the area you want.
 
Status
Not open for further replies.
Top