Preventing Hero Death Message?

DiFm

New Member
Reaction score
35
Effective Use OF Preventing Hero Death Message if the unit has buff or any other condition? Would be greatly apprieciated if you could remove the Hero icons that appear on the left side of the screen
 

Komaqtion

You can change this now in User CP.
Reaction score
469
You can remove the hero icons in the object editor:
Stats - Hero - Hide Hero Interface Icon

And for the death message, I'd believe that the best thing for this would be to disable the death message completely, and then trigger it... The death message can also be disabled in the object editor:
Stats - Hero - Hide Hero Death Message

EDIT: Here are the triggers needed for the death message:

Trigger:
  • Custom Death Message
    • Events
    • Conditions
      • (Life of (Triggering unit)) Less than 0.41
      • ((Triggering unit) has buff (Your_Buff)) Equal to True
    • Actions
      • Game - Display to (All players) the text: (Player_Colors[(Player number of (Owner of (Triggering unit)))] + ((Proper name of (Triggering unit)) + (|r + has died!)))


This requires you have a variable called "Player_Colors" which is a string array variable with a size of 12.

This is the setup for that variable:

Trigger:
  • Set Player Colors
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Player_Colors[1] = |cffFF0202
      • Set Player_Colors[2] = |cff0041FF
      • Set Player_Colors[3] = |cff1BE6B8
      • Set Player_Colors[4] = |cff530080
      • Set Player_Colors[5] = |cffFFFC00
      • Set Player_Colors[6] = |cffFE890D
      • Set Player_Colors[7] = |cff1FBF00
      • Set Player_Colors[8] = |cffE55AAF
      • Set Player_Colors[9] = |cff949596
      • Set Player_Colors[10] = |cff7DBEF1
      • Set Player_Colors[11] = |cff0F6145
      • Set Player_Colors[12] = |cff0F6145


And here are the triggers giving the first trigger the events:

Trigger:
  • Register Heroes Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Temp_Group = (Units in (Playable map area) matching (((Matching unit) is A Hero) Equal to True))
      • Unit Group - Pick every unit in Temp_Group and do (Actions)
        • Loop - Actions
          • Trigger - Add to Custom Death Message <gen> the event (Unit - (Picked unit)'s life becomes Less than 0.41)
      • Custom script: call DestroyGroup(udg_Temp_Group)


Trigger:
  • Register Heroes Spawning
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Trigger - Add to Custom Death Message <gen> the event (Unit - (Triggering unit)'s life becomes Less than 0.41)


I haven't tested this with the buff condition, but at least it works without it :D

Note: If you didin't need the buff condition, or any other for that matter, this would only need 1 trigger, but since dead units don't have buffs (to my knowledge at least) you need to detect when they're near death :D
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top