• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • It's time for the first HD Modeling Contest of 2025. Join the theme discussion for Hive's HD Modeling Contest #7! Click here to post your idea!

math functions in WE

Status
Not open for further replies.
Level 17
Joined
Mar 21, 2011
Messages
1,611
hi,
is there a way to get rid of some decimal places of a number? for example, i have a floating text that counts down from 3 to 0 in 0.2 steps. now it shows numbers like:
3.000
2.800
2.600
...
0.200
0.000

i want to get rid of the last 2 decimal places:
3.0
2.8
2.6
...
0.2
0.0

is there a way to do that?

thanks
 

LeP

LeP

Level 13
Joined
Feb 13, 2008
Messages
544
There is also native R2SW takes real r, integer width, integer precision returns string where precision is the argument you're looking for.
 
Level 12
Joined
Feb 22, 2010
Messages
1,115
  • Game - Display to (All players) the text: (String(1.23, 1, 2))
It is the next thing after convert real to string.Name is convert real to formatted string.
 
Status
Not open for further replies.
Top