• 🏆 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!

Goblin Mine kill

Status
Not open for further replies.
Level 3
Joined
Jan 31, 2012
Messages
26
hi guys i'm kinda of having a problem here
with commands i need to do if i want a goblin land mine explosion counts as a kill to the unit who putted the mine there?
counting as a kill i want it to count only when it kills a hero and give one Lumber and 300 Gold also 200 Exp bonus thx
 
Level 13
Joined
Dec 21, 2010
Messages
541
*note: your hero must be in variable
  • Goblin Land Mine
  • Events
    • Unit - Dies
  • Conditions
    • (Unit-type of (Killing unit)) Equal to Goblin Land Mine
    • ((Owner of (triggering unit)) belongs to an enemy of (owner of killing unit) Equal to true
    • ((Triggering unit) is A Hero) Equal to true
  • Actions
    • Player - Add 300 lumber to (Owner of killing unit)
    • Player - Add 300 gold to (Owner of killing unit)
    • Hero - Add 300 experience to Player_Hero[Player number of (Owner of killing unit)], Show level-up graphics
 
Level 13
Joined
Dec 21, 2010
Messages
541
  • ((Owner of (triggering unit)) belongs to an enemy of (owner of killing unit)
triggering unit and killing unit is the same thing. It should be
  • ((Owner of (triggering unit)) belongs to an enemy of (owner of dying unit)[/QUOTE]
  • you're wrong.. triggering unit DOES NOT refer to killing unit... triggering unit refers to DYING UNIT
  • ..TRIGGERING unit is different from KILLING unit :P
 

sentrywiz

S

sentrywiz

you're wrong.. triggering unit DOES NOT refer to killing unit... triggering unit refers to DYING UNIT

..TRIGGERING unit is different from KILLING unit :p

I think you're wrong. Triggering unit is a multi purpose unit, used for everything. Depends for what you're using it.

But you might be right. I haven't tested it
 
Level 13
Joined
Dec 21, 2010
Messages
541
I think you're wrong. Triggering unit is a multi purpose unit, used for everything. Depends for what you're using it.

But you might be right. I haven't tested it
I KNOW THAT IT IS A MULTI-PURPOSE.. triggering unit can be also be the casting unit ..

In his case he uses the event UNIT DIES ...then TRIGGERING UNIT is equivalent to the DYING UNIT... I've been using this for my spells... -_-
 
Last edited:
Level 20
Joined
Jul 14, 2011
Messages
3,213
The unit that triggers the actions is the dying it, so, yeah. The Triggering Unit is the Dying Unit.

Notice you can ALWAYS replace (Owner of (Triggering Unit)) in generic unit events with (Triggering Player). It's easier, faster, and better.
 
Status
Not open for further replies.
Top