• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[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