• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Simple GUI help

Status
Not open for further replies.
Here is everything. From colors for text to making damage show up to disabling damage show for some players. This is created by namm and real128
  • color set
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Color[1] = |cffFF0202
      • Set Color[2] = |cff0041FF
      • Set Color[3] = |cff1BE6B8
      • Set Color[4] = |cff530080
      • Set Color[5] = |cffFFCC00
      • Set Color[6] = |cffFE890D
      • Set Color[7] = |cff1FBF00
      • Set Color[8] = |cffE55AAF
      • Set Color[9] = |cff949596
      • Set Color[10] = |cff7DBEF1
      • Set Color[11] = |cff0F6145
      • Set Color[12] = |cff995500.
  • Create Floating Text
    • Events
    • Conditions
    • Actions
      • 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.00% transparency
          • 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 Neutral Hostile) 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.00% transparency
          • 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 Units On
    • Events
      • Player - Player 1 (Red) types a chat message containing -dmg txt as An exact match
      • Player - Player 2 (Blue) types a chat message containing -dmg txt as An exact match
      • Player - Player 3 (Teal) types a chat message containing -dmg txt as An exact match
      • Player - Player 4 (Purple) types a chat message containing -dmg txt as An exact match
    • 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
          • Set show_text[(Player number of (Triggering player))] = False
          • Game - Display to (Player group((Triggering player))) the text: Damage Text has bee...
        • Else - Actions
          • Set show_text[(Player number of (Triggering player))] = True
          • Game - Display to (Player group((Triggering player))) the text: Damage Text has bee...
  • Update
    • Events
      • Time - Every 2.00 seconds of game time
    • Conditions
    • Actions
      • Set TextDamage = (Units in (Playable map area))
      • Unit Group - Pick every unit in TextDamage and do (Trigger - Add to Create Floating Text <gen> the event (Unit - (Picked unit) Takes damage))
      • Custom script: call DestroyGroup(udg_TextDamage)
For simple text u need just two triggers: one main for text show and other with loop event for picking unit and doing this actioin
  • Unit Group - Pick every unit in TextDamage and do (Trigger - Add to Create Floating Text <gen> the event (Unit - (Picked unit) Takes damage))
 
Level 4
Joined
Aug 5, 2011
Messages
99
either use the damage engine or use something like this...
event: unit - unit enters playable map area
action: add to another_trigger the event (triggering unit) takes damage

for second trigger....
event: (empty)
action
create floating text above triggering unit
 
Status
Not open for further replies.
Top