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

Request: GUI Damage Detection

Status
Not open for further replies.
Level 10
Joined
Apr 13, 2005
Messages
630
I could try this for you. I'm gettin back up though from my spell factory

I did this quick and randomly. I dont know if it works but screw around with this trigger.
  • Floating Text - Create floating text that reads (String((Damage taken))) above Auctioner with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
  • Floating Text - Change (Last created floating text): Disable permanence
  • Floating Text - Change the lifespan of (Last created floating text) to 7.00 seconds
  • Floating Text - Set the velocity of (Last created floating text) to 32.00 towards 135.00 degrees
 
Level 2
Joined
Aug 23, 2008
Messages
25
Here are the triggers to create a damage detection system in GUI.
  • DamageEventTrigger
    • Events
      • Time - Elapsed game time is 0.01 seconds
    • Conditions
    • Actions
      • Set TempGroup = (Units in (Playable map area))
      • Unit Group - Pick every unit in TempGroup and do (Actions)
        • Loop - Actions
          • Trigger - Add to DamageShowTrigger <gen> the event (Unit - (Picked unit) Takes damage)
      • Custom script: call DestroyGroup(udg_TempGroup)
  • DamageEventTrigger2
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
    • Actions
      • Trigger - Add to DamageShowTrigger <gen> the event (Unit - (Entering unit) Takes damage)
  • DamageShowTrigger
    • Events
    • Conditions
    • Actions
      • Set TempPoint = (Position of (Triggering unit))
      • Floating Text - Create floating text that reads (String((Integer((Damage taken))))) at TempPoint with Z offset 0.00, using font size 7.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Floating Text - Change (Last created floating text): Disable permanence
      • Floating Text - Set the velocity of (Last created floating text) to 20.00 towards 85.00 degrees
      • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
      • Floating Text - Change the fading age of (Last created floating text) to 1.00 seconds
      • Custom script: call RemoveLocation(udg_TempPoint)
 
Level 10
Joined
Sep 6, 2008
Messages
423
Thanks guys but it's not really what I'm looking for :sad: I need a system that detects when a unit takes damage so I can make a triggered passive that is not abusable (lets say I make a triggered critical strike that does extra damage based on stats, it would be abusable by pressing S (or stop) then right-clicking the enemy and then doing it over and over again not doing any normal damage from attacks but there will be the % chance of the effect being triggered thus making it abusable) If I these systems can be used for what I described tell me.
+Rep for everyone that atleast has tried to help :cute:
 
Level 2
Joined
Aug 23, 2008
Messages
25
I still believe that this is what you are looking for. Here check this demo map I made to see examples of how to make custom triggered passive abilities based on the damage detection system.
If its still not what you are looking for I am sorry :p
 

Attachments

  • Damage Detection GUI Demo.w3x
    19.8 KB · Views: 91
Level 10
Joined
Sep 6, 2008
Messages
423
I did something similar in my map but for some reason it crashed wc3 when it should've done the extra damage. But the bonus damage was (((Strenght + Agility) / 5) x (Level of Ability))

EDIT: Found out what the problem was :D Credits for you Gorgils since I followed the instructions you gave earlier :)
 
Last edited:
Status
Not open for further replies.
Top