• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Counting ones, tens, hundreds etc from a number

Status
Not open for further replies.
Level 30
Joined
Jul 23, 2009
Messages
1,029
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