Damage Taken for Heroes

S

schilling

Guest
Well i'm making a map and i have a slight problem with the damage thingy.. every thing works fine if a creature (non-hero) attacks then the trigger works.

But if i'm trying to use a hero for that trigger is does not show up or it just shows up with a (you hit for 0 damage).

Can someone help me with this please?

thanks allot:D
 

Grothdmal

New Member
Reaction score
1
first trigger
Code:
d 1
    Events
        Time - Elapsed game time is 0.00 seconds
    Conditions
    Actions
        Set tempgroup = (Units in (Playable map area))
        Unit Group - Pick every unit in tempgroup and do (Trigger - Add to d 3 <gen> the event (Unit - (Picked unit) Takes damage))

second trigger

Code:
d 2
    Events
        Unit - A unit enters (Playable map area)
    Conditions
    Actions
        Trigger - Add to d 3 <gen> the event (Unit - (Triggering unit) Takes damage)

third trigger
Code:
d 3
    Events
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Damage taken) Greater than 1.00
            Then - Actions
                Floating Text - Create floating text that reads (String((Integer((Damage taken))))) above (Triggering unit) with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
                Floating Text - Set the velocity of (Last created floating text) to 85.00 towards 90.00 degrees
                Floating Text - Change (Last created floating text): Disable permanence
                Floating Text - Change the lifespan of (Last created floating text) to 1.50 seconds
                Floating Text - Change the fading age of (Last created floating text) to 0.75 seconds
            Else - Actions

What this basically does is takes all units in the map and adds them to a take damage list, then any units that might spawn later are also added to the list.
 
S

schilling

Guest
first trigger
Code:
d 1
    Events
        Time - Elapsed game time is 0.00 seconds
    Conditions
    Actions
        Set tempgroup = (Units in (Playable map area))
        Unit Group - Pick every unit in tempgroup and do (Trigger - Add to d 3 <gen> the event (Unit - (Picked unit) Takes damage))

second trigger

Code:
d 2
    Events
        Unit - A unit enters (Playable map area)
    Conditions
    Actions
        Trigger - Add to d 3 <gen> the event (Unit - (Triggering unit) Takes damage)

third trigger
Code:
d 3
    Events
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Damage taken) Greater than 1.00
            Then - Actions
                Floating Text - Create floating text that reads (String((Integer((Damage taken))))) above (Triggering unit) with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
                Floating Text - Set the velocity of (Last created floating text) to 85.00 towards 90.00 degrees
                Floating Text - Change (Last created floating text): Disable permanence
                Floating Text - Change the lifespan of (Last created floating text) to 1.50 seconds
                Floating Text - Change the fading age of (Last created floating text) to 0.75 seconds
            Else - Actions

What this basically does is takes all units in the map and adds them to a take damage list, then any units that might spawn later are also added to the list.

Nice, thanks its working! :D
But i have one problem, i'm trying to use the in the Game Display Text, its working there as well, but the only problem is that its spamming out the damage text, any ideas how to fix that, thanks again:) :)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top