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

Capture Unit on Death help triggers

Status
Not open for further replies.

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,220
  • some trigger
  • Events
  • Unit - A unit dies
  • Conditions
  • Actions
  • Unit create a unit for owner of killing unit at posision of dying unit
written at free hand

EDIT right one is bellow not free hand
  • Untitled Trigger 001
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to (Unit-type of your_unit)
    • Actions
      • Unit - Create 1 (Unit-type of (Dying unit)) for (Owner of (Killing unit)) at (Position of (Dying unit)) facing Default building facing degrees
i know it leaks but i show how to do this not how to make leakless :p
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
You can use Resurrection ability. Make it revive one unit. When a unit dies, create a dummy at he unit's position and order the unit to use resurrection. Then change the owner of the dying unit. Make sure the death of the dummy won't run the action, otherwise the game will freeze since it causes an infinite loop.
 
Status
Not open for further replies.
Top