Damage Floating Text

hagefade

New Member
Reaction score
1
How do i make like in most rpgs where if u do damage or an enemy does damage it has a floating text which will dissapear.
 

War3shade

New Member
Reaction score
1
Trigger:
  • Damage Init
    • Events
      • Unit - A unit enters (Entire map)
    • Conditions
    • Actions
      • Trigger - Add to (This trigger) the event (Unit - (Entering unit) Takes damage)

Trigger:
  • Damage Text
    • Events
    • Conditions
    • Actions
      • Floating Text - Create floating text that reads (String((Damage taken))) at (Position of (Triggering unit)) 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): Enable permanence
      • Floating Text - Change the fading age of (Last created floating text) to 1.00 seconds
      • Floating Text - Change the age of (Last created floating text) to 2.00 seconds
 

PrisonLove

Hard Realist
Reaction score
78
Because the first trigger adds the event "(Entering Unit) Takes Damage" to the second trigger. So in essence, both triggers do have an event. Be wary though that the second trigger will not work for pre-placed units.

What he gave you should work, though.

Just make sure you change the (This Trigger) part of the first trigger to (Damage Text)
 

hagefade

New Member
Reaction score
1
I can't find:
Floating Text - Create floating text that reads (String((Damage taken))) at (Position of (Triggering unit)) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
Can't find the String((Damage taken)))
 

hagefade

New Member
Reaction score
1
KK, what happens now is that it create the text, it doesn't slowly move upwards, it doesn't dissappear and it isn't a whole number.

Trigger:
  • Damage Text 1
    • Events
      • Unit - A unit enters (Entire map)
    • Conditions
    • Actions
      • Trigger - Add to Damage Text 2 <gen> the event (Unit - (Entering unit) Takes damage)


Trigger:
  • Damage Text 2
    • Events
    • Conditions
    • Actions
      • Floating Text - Create floating text that reads (String((Damage taken))) at (Position of (Triggering unit)) 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): Enable permanence
      • Floating Text - Change the fading age of (Last created floating text) to 1.00 seconds
      • Floating Text - Change the age of (Last created floating text) to 2.00 seconds
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Why don't you simply make a custom "Critical Strike" ability.
And then just set the multiplier to 1.0 and change to proc to 100% ?
That way there'll always appear red text when you attack ;)

(Note: To make it non-visible for the Hero which has it, addd it to a spellbook and disable it ;))
 

crazyfanatic

New Member
Reaction score
20
Im not sure that the event is Unit enters PMA, it should be Unit is attacked?? And on the first explanation you say "Add to (This trigger)", it should be to the displayer trigger.
 

Ticer

New Member
Reaction score
2
To make the text disappear, on the "Floating Text - enable permanence" line, you need to change it from enable to disable for the permanence.
Edit: Also, use the change lifespan function, not change age, that will remove the text. And if you want a whole number, not a decimal, use convert integer to string, and since damage taken is not under that, inside the convert integer to string, go to convert real to integer, that will make it a whole number. The reason for that is b/c a "real" is a float, or decimal number, where as integers are always whole numbers. Converting it from a real to an integer first makes the computer round it to a whole number to be displayed.
 

HydraRancher

Truth begins in lies
Reaction score
197
To make it a whole number you
Convert string to integer
Convert integer to real
Use damage taken
so it'll look like:
(String(Integer(Damage Taken))) to make it fly upwards u use:
Trigger:
  • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top