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!
You are using an out of date browser. It may not display this or other websites correctly. You should upgrade or use an alternative browser.
Triggers
Damage Detection v0.17.w3x
Variables
Damage Detection
Setting Colors
Create Floating Damage Text
Detect Damage
Update
NOT NEEDED
Unit HP
Enter map-specific custom script code below. This text will be included in the map script after variables are declared and before any trigger code.
Name
Type
is_array
initial_value
Color
string
Yes
Floating_Txt_Count
integer
No
LastCreatedText
texttag
Yes
Show_Text
boolean
Yes
true
TextDamage
group
No
Setting Colors
Events
Map initialization
Conditions
Actions
Set Variable Set Color[1] = "|cffFF0202"
Set Variable Set Color[2] = "|cff0041FF"
Set Variable Set Color[3] = "|cff1BE6B8"
Set Variable Set Color[4] = "|cff530080"
Set Variable Set Color[5] = "|cffFFCC00"
Set Variable Set Color[6] = "|cffFE890D"
Set Variable Set Color[7] = "|cff1FBF00"
Set Variable Set Color[8] = "|cffE55AAF"
Set Variable Set Color[9] = "|cff949596"
Set Variable Set Color[10] = "|cff7DBEF1"
Set Variable Set Color[11] = "|cff0F6145"
Set Variable Set Color[12] = "|cff995500."
Create Floating Damage Text
Events
Conditions
Actions
Set Variable Set Floating_Txt_Count = (Floating_Txt_Count + 1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Attacked unit) belongs to an ally of Player 1 (Red).) Equal to True
Then - Actions
Floating Text - Create floating text that reads (Color[(Player number of (Owner of (Damage source)))] + ((String((Integer((Damage taken))))) + |r)) above (Attacked unit) with Z offset 5.00 , using font size 12.00 , color ( 0.00 %, 0.00 %, 0.00 %), and 0 % transparency
Set Variable Set LastCreatedText[Floating_Txt_Count] = (Last created floating text)
Floating Text - Hide LastCreatedText[Floating_Txt_Count] for (All players matching (Show_Text[(Player number of (Owner of (Matching unit)))] Equal to False).)
Floating Text - Set the velocity of LastCreatedText[Floating_Txt_Count] to 100.00 towards ((Facing of (Damage source)) + 0.00) degrees
Floating Text - Change LastCreatedText[Floating_Txt_Count] : Disable permanence
Floating Text - Change the lifespan of LastCreatedText[Floating_Txt_Count] to 1.60 seconds
Floating Text - Change the fading age of LastCreatedText[Floating_Txt_Count] to 0.00 seconds
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Attacked unit) belongs to an ally of Player 2 (Blue).) Equal to True
Then - Actions
Floating Text - Create floating text that reads (Color[(Player number of (Owner of (Damage source)))] + ((String((Integer((Damage taken))))) + |r)) above (Attacked unit) with Z offset 5.00 , using font size 12.00 , color ( 0.00 %, 0.00 %, 0.00 %), and 0 % transparency
Set Variable Set LastCreatedText[Floating_Txt_Count] = (Last created floating text)
Floating Text - Hide LastCreatedText[Floating_Txt_Count] for (All players matching (Show_Text[(Player number of (Owner of (Matching unit)))] Equal to False).)
Floating Text - Set the velocity of LastCreatedText[Floating_Txt_Count] to 100.00 towards ((Facing of (Damage source)) + 0.00) degrees
Floating Text - Change LastCreatedText[Floating_Txt_Count] : Disable permanence
Floating Text - Change the lifespan of LastCreatedText[Floating_Txt_Count] to 1.60 seconds
Floating Text - Change the fading age of LastCreatedText[Floating_Txt_Count] to 0.00 seconds
Else - Actions
Detect Damage
Events
Map initialization
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Show_Text[(Player number of (Triggering player))] Equal to True
Then - Actions
Else - Actions
Update
Events
Time - Every 2.00 seconds of game time
Conditions
Actions
Set Variable Set TextDamage = (Units in (Playable map area))
Unit Group - Pick every unit in TextDamage and do (Add to Create_Floating_Damage_Text <gen> the event ((Picked unit) Takes damage))
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.