• 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.

Counting ones, tens, hundreds etc from a number

Status
Not open for further replies.
Level 30
Joined
Jul 23, 2009
Messages
1,033
Hey.

I'm trying to figure out how to count how many ones, tens, hundreds etc there is in a number.
The reason is, I am trying to make passive abilities earned from items; one that gives 1 damage per rank and one that gives 10 damage per rank. I need to know when the total received damage bonus exceeds 9 so that I can just rank up the x10 ability and set the x1 ability to 0 and start over.

Does anyone know how to do this with triggers or any formula?

Edit: Never mind I found out I just need to convert real to integer.
 
Status
Not open for further replies.
Top