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

[Solved] Trigger not working

Status
Not open for further replies.
Level 11
Joined
Oct 9, 2015
Messages
721
This trigger is failing to give the item to the killing unit, can anyone help, please ?
  • Trigger
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Killing unit) Not equal to No unit
        • Then - Actions
          • Item - Create ItemExample at (Center of (Playable map area))
          • Item - Set charges remaining in (Last created item) to (Random integer number between 10 and 100)
          • Hero - Give (Last created item) to (Killing unit)
        • Else - Actions
 
Level 6
Joined
Apr 5, 2015
Messages
165
You can't give an item to a dying unit just create the item under it once is dead.

He did use "killing unit" already, which is the one that kills the dying unit. That was fine.

However there is no reason to use this "if,then,else" with that weird condition.
This should work:

  • Events
    • Unit - A unit Dies
  • Conditions
    • ((Killing unit) is A Hero) Equal to True
  • Actions
    • Item - Create TestItem at (Center of (Playable map area))
    • Item - Set charges remaining in (Last created item) to (Random integer number between 10 and 100)
    • Hero - Give (Last created item) to (Killing unit)
This gives every hero, an item for each single kill.
If you just want it to happen for a single hero or something like that you will need more conditions.
 
Level 8
Joined
Jan 28, 2016
Messages
486
I just tried this trigger and it worked fine for me. Try and make sure there aren't any other triggers interfering with the one in your OP.

  • Test
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Killing unit) Not equal to No unit
      • ((Killing unit) is A Hero) Equal to True
    • Actions
      • Item - Create Health Stone at (Center of (Playable map area))
      • Item - Set charges remaining in (Last created item) to (Random integer number between 10 and 100)
      • Hero - Give (Last created item) to (Killing unit)
 
Last edited:

sentrywiz

S

sentrywiz

Since you're using bribe's dds, you can also check if the life or pdd_target <= pdd_amount.
That way you can give the item to the pdd_caster just before the kill happens and avoid using an entire event "unit dies" and all the conditions.

just my 2 cents
 
Status
Not open for further replies.
Top