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

[Trigger] How to get last attacked unit?

Status
Not open for further replies.
Level 2
Joined
Oct 15, 2008
Messages
17
I'm making a map similar to Warlocks. I want to make a trigger which announces (and adds to the scoreboard) that the last hero that pushed the dying hero into the lava has got a kill.

Also I would like to know how to make a terrain or region do damage to units which enter it.

thanks.
 
Level 6
Joined
Sep 13, 2008
Messages
261
As for last unit to attack the unit you will probably have to set the unit to a global variable that attacked each unit. then on unit dies, give owner of global variable unit a kill.


This willl deal damage on entering a region.
  • Untitled Trigger 001
    • Events
      • Unit - A unit enters No region
    • Conditions
    • Actions
      • Unit - Cause (Triggering unit) to damage (Triggering unit), dealing 999999.00 damage of attack type Spells and damage type Normal
 
Status
Not open for further replies.
Top