• 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.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

Hero Kill Announcement Issue

Status
Not open for further replies.
Level 3
Joined
Jan 9, 2010
Messages
34
Hey Hive

So I have been trying to make a trigger that shows a message to all players whenever a hero owned by a player is killed (Dota style map)
But no message pops up when supposed to.

My triggers so far:

  • Map initialization
  • Set PlayerName[1] = ((|c00FF0000 + (Name of Player 1 (Red))) + |r
  • ....
  • Set PlayerName[12] = ......
  • Unit - A Unit Dies
  • ((Dying Unit) is a Hero) equal to True
  • (Custom Value of (Dying Unit)) equal to 1
  • Game - Display to All Players the text: ((PlayerName[(Player Number of owner of Killing Unit)))] + has just slain ) + PlayerName[(Player number of (Owner of (Dying Unit)))])
The custom value is due to the use of mirror image ability which would cause images to trigger the message. All heroes receive custom value 1 when picked.

So any idea why the trigger doesn't show any message?
 
Level 3
Joined
Jan 9, 2010
Messages
34
Okay thanks, but still aint getting no message sadly.
Didn't think of the illusion thing, cheers.
 
Level 3
Joined
Jan 9, 2010
Messages
34
@Watermelon_1234

  • Unit - A Unit Enters Region
  • Unit - Set the Custom Value of (Triggering Unit) to 1
  • Custom script: call DestroyTrigger(GetTriggeringTrigger())
The other triggering data in this trigger is just for giving potions and setting health to 100% and so on.

@ABTS

I have another triggering preventing players from killing friendly heroes
 
Level 3
Joined
Jan 9, 2010
Messages
34
@ABTS
  • Deny
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • ((Triggering unit) belongs to an ally of (Owner of (Attacking unit))) Equal to True
      • ((Life of (Triggering unit)) Greater than or equal to 50.00) or ((Percentage life of (Triggering unit)) Greater than or equal to 10.00)
      • ((Attacked unit) is A Hero) Not equal to True
    • Actions
      • Unit - Order (Attacking unit) to Stop


@Watermelon_1234

Tried to remove the custom script destroying the trigger but that didn't fix it either.

And ye, all heroes gets all components from the trigger with the custom value.

  • Blue
    • Events
      • Unit - A unit enters O H S <gen>
    • Conditions
      • (Owner of (Triggering unit)) Equal to Player 2 (Blue)
    • Actions
      • Unit - Remove Hero Chooser 0065 <gen> from the game
      • Camera - Apply O R <gen> for (Owner of (Triggering unit)) over 0.00 seconds
      • Set OR = (Center of O R <gen>)
      • Unit - Move (Triggering unit) instantly to (Center of O R <gen>)
      • Custom script: call RemoveLocation(udg_OR)
      • Hero - Create Teleport Scroll and give it to (Triggering unit)
      • Hero - Create Healing Potion and give it to (Triggering unit)
      • Hero - Create Mana Potion and give it to (Triggering unit)
      • Unit - Set life of (Triggering unit) to 100.00%
      • Unit - Set mana of (Triggering unit) to 100.00%
      • Unit - Set the custom value of (Triggering unit) to 1
      • Trigger - Turn off Random Blue <gen>
      • Trigger - Turn off Random 2 Blue <gen>
 
Well, this has me stumped as it looks like everything is done correctly...
For a last resort, try debugging the second trigger you posted to see what fails, like show a message whenever a unit dies, if the dying unit (remember, use triggering unit) is a hero, and if the dying unit is not an illusion/has a custom value of 1.

BTW, this is kind of off-topic but it looks like your triggers are inefficient in that there's a specific trigger for each player. Try using an array instead of a specific unit when you remove the Hero Chooser so one trigger can run correctly for all players.
 
Status
Not open for further replies.
Top