Displaying Not-Decimal Values

sentrywiz

New Member
Reaction score
25
I have a passive ability that deals 2% of the attacker's total health and another that deals 4% of the attacked unit's health. Those who play LoL, think madreds and atma's impaler. Anyway -

What is the way for those number to not be displayed in decimal values? I don't like to see that I have dealt 12.764 damage above target unit as floating text. I'd just rather see a 12.

What to use, integer or real value? Or something else?
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
convert them to integers.
however converting it to integer will always round the value down.
 

sentrywiz

New Member
Reaction score
25
So for example I want:

Deals 4% of the attacking unit's health into damage

Then I would first use Real condition but then use Arithmetic in Integer and put:

Integer [ Real[Max Life of Attacked Unit] x 0.04 ]]

?
 

Jedi

New Member
Reaction score
63
This will display 555.000
Just convert real to string.
Trigger:
  • Game - Display to (All players) the text: (String((Life of (Triggering unit)))) //555.000

This will display 555
First, convert real to integer, then convert integer to string.
Trigger:
  • Game - Display to (All players) the text: (String((Integer((Life of (Triggering unit)))))) //555
 
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