How do make decimals disappear from floating text?

draist

Active Member
Reaction score
1
So, I've got these here triggers:

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


and

Trigger:
  • Damage 2
    • Events
    • Conditions
    • Actions
      • Floating Text - Create floating text that reads (String((Damage taken))) above (Triggering unit) with Z offset 0.00, using font size 8.00, color (100.00%, 0.00%, 0.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 64.00 towards 90.00 degrees
      • Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
      • Floating Text - Change the fading age of (Last created floating text) to 1.00 seconds


It works great but it shows the numbers with decimals... Like 34.000 and so on.
Is there any way to remove that without using JASS or other stuff?
 

tommerbob

Minecraft. :D
Reaction score
110
Just like you are converting the real to string, instead you want to Convert Integer to String, and then convert Real to Integer.
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
613
Trigger:
  • Floating Text - Create floating text that reads (String((Integer((Damage taken))))) above (Triggering unit) with Z offset 0.00, using font size 8.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency


(String((Integer((Damage Taken))))) means Convert Integer to String, then the integer value is Convert Real to Integer. The Real value is Damage Taken.
 

0WN3D

New Member
Reaction score
15
In case you wan real visuals....
Trigger:
  • Floating Text - Create floating text that reads (String(Integer((Damage taken))))) above (Triggering unit) with Z offset 0.00, using font size 8.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency


Edit: Woah I gt beaten by a mudkip....
 

draist

Active Member
Reaction score
1
Oh, I thought he/she meant in the

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


Well, thanks for your answers! +rep to all of you
 
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