floating text with damage dealt

jarekpl12

TH.net Regular
Reaction score
6
i want to make trigger which shows (to own player) how much damage he dealted everytime he gives any... but dont know how to make like that...
 

Laiev

Hey Listen!!
Reaction score
188
You will need a Damage Detection System :x
Trigger:
  • Game - Display to (Owner of (Damage Source) the text: (Damage taken)


<freehand, sorry>
 

jarekpl12

TH.net Regular
Reaction score
6
k so i make trigger which deals damage equal to 50% of hero's HP and i made floating text later which shows how much i dealted damage... but it shows like that.... hero has 980 HP and it shows like that 490.000... how to make it show only 490 ?
EDIT: i will make just floating text when dealing damage with spells (all my spells' damage are from trigger equal to some multiple of main attribute of hero so i can make easy floating text to this spells with dealted damage) but i want to appear only for example 490 damage not so exact 490.000
 

Joccaren

You can change this now in User CP.
Reaction score
54
If you want a simple, easy to use damage detection system that will allow you to get the damage from everything: spells, normal attacks ect, I recommend using Weeps GUI friendly damage detection system. Its in the tutorials and rescources section.
 

avalya

New Member
Reaction score
37
Yeah use the GDD (Weep's system) for damage detection, it is easy to use and you'll quickly find your way around to make floating combat texts.
 

Raizn

New Member
Reaction score
2
Maybe this is a help


Trigger:
  • Damage Taken
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
    • Actions
      • Trigger - Add to Ability Damage Done &lt;gen&gt; the event (Unit - (Triggering unit) Takes damage)


Trigger:
  • Ability Damage Done
    • Events
    • Conditions
    • Actions
      • Set abilitydamage = (Damage taken)
      • Floating Text - Create floating text that reads (String(abilitydamage, 3, 0)) above (Attacked unit) with Z offset 0.00, using font size 8.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
      • Floating Text - Set the velocity of (Last created floating text) to 64.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
 

jarekpl12

TH.net Regular
Reaction score
6
Maybe this is a help


Trigger:
  • Damage Taken
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
    • Actions
      • Trigger - Add to Ability Damage Done &lt;gen&gt; the event (Unit - (Triggering unit) Takes damage)


Trigger:
  • Ability Damage Done
    • Events
    • Conditions
    • Actions
      • Set abilitydamage = (Damage taken)
      • Floating Text - Create floating text that reads (String(abilitydamage, 3, 0)) above (Attacked unit) with Z offset 0.00, using font size 8.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
      • Floating Text - Set the velocity of (Last created floating text) to 64.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

where i can find ,,(Damage taken)" what kind of variable is it?:confused:
 

Raizn

New Member
Reaction score
2
abilitydamage is a "real" var and you can find damage taken here:

conversion - convert real to integer -> Event Response - Damage Taken

good luck
Raizn
 

jarekpl12

TH.net Regular
Reaction score
6
Change real to integer, the real make X.00 integer just set X

a little confused... where should i place/change it?
Trigger:
  • Uncontrolled Slam
    • Events
      • Unit - A unit Starts casting an ability
    • Conditions
      • (Ability being cast) Equal to Uncontrolled Slam
    • Actions
      • Set SlamPoint = (Position of (Triggering unit))
      • Set SlamGroup = (Units within 400.00 of SlamPoint matching (((Owner of (Matching unit)) is an enemy of (Owner of (Triggering unit))) Equal tTrue))
      • Wait 0.35 seconds
      • Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) - (0.50 x (Maximum Life of (Triggering unit))))
      • Unit Group - Pick every unit in SlamGroup and do (Actions)
        • Loop - Actions
          • Unit - Cause (Triggering unit) to damage (Picked unit), dealing (0.50 x (Maximum Life of (Triggering unit))) damage of attack type Hero and damage type Normal
          • Text - Create floating text that reads (String(((Maximum Life of (Triggering unit)) x 0.50))) above (Picked unit) with Z offset 0.00, using font size 8.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
          • Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
          • Text - Change (Last created floating text): Exclude permanence
          • Text - Change the lifespan of (Last created floating text) to 2.00 seconds
      • Custom script: call RemoveLocation (udg_SlamPoint)
      • Custom script: call DestroyGroup (udg_SlamGroup)
 

jarekpl12

TH.net Regular
Reaction score
6
Maybe this is a help


Trigger:
  • Damage Taken
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
    • Actions
      • Trigger - Add to Ability Damage Done &lt;gen&gt; the event (Unit - (Triggering unit) Takes damage)


Trigger:
  • Ability Damage Done
    • Events
    • Conditions
    • Actions
      • Set abilitydamage = (Damage taken)
      • Floating Text - Create floating text that reads (String(abilitydamage, 3, 0)) above (Attacked unit) with Z offset 0.00, using font size 8.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
      • Floating Text - Set the velocity of (Last created floating text) to 64.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

lol it works... but only when enemies deal damage to my hero (its rpg map)
 

Raizn

New Member
Reaction score
2
ye. just play around with some conditions to make it only displays hero damage.

that for example will only display heroes damage over attacked units head

Trigger:
  • Damage Taken
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • ((Entering unit) is A Hero) Equal to False
    • Actions
      • Trigger - Add to Ability Damage Done &lt;gen&gt; the event (Unit - (Triggering unit) Takes damage)



you can modify pretty much of this to optimize it to your rpg hud system.

bye raizn
 

Raizn

New Member
Reaction score
2
Sorry jarekpl12. i just edited my post while u replied it^^ i posted an example for displaying only hero damage.
 

Raizn

New Member
Reaction score
2
Damage taken will be displayed with 123.456. you can change that with the numbers i marked in red and blue below. Blue is 123 and red is 456.

an example.
3, 2 will display 123.45
3, 1 will display 123.4

hope that will help^^

(String(abilitydamage, 3, 0))
that part is btw: conversion - convert real to formatted string
 

jarekpl12

TH.net Regular
Reaction score
6
ok but it doesn't work...

Trigger:
  • Tekst - Create floating text that reads (String((0.50 x (Maksimum Life of (Triggering unit))), 7, 0)) above (Picked unit) with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency


damage are still like 490.0 (hero has 980 HP)
 
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