Quote: (&niggastolemybike) [JonathanOfDrain] Ramza like...
blade2k » articles & tutorials

jump to:
Tutorials » Game Creation » RPG Maker 2000

Finding The Digits


Reading Article
Author: losl
Posted on 08/02/2004
print :: back to list

N

ote: There is an EASIER WAY to do this using mod instead of divide. Use only if you want to

It is real easy to break down the number with algebra and NO FORKS-

Take the Number you want to break down well use 1234

The Thousands

First you take 1234 and divide it by 1000 on a calculator it will give you 1.234 but RM2K
Recognizes it as 1. Record this number to two variables the thousands column variable and a
calculation variable which I will call write (You will need 3 of these Write, Write 2, and
Write 3.)

The Hundreds

First you take 1234 and divide it by 100 RM2K will give you the number 12. You only want the
2. To take away the ten, you take write and multiply it by ten to get the number 10
then subtract the divided number (12) minus the 10 which is 2. You now have the hundreds
column! Record the hundreds column to Write 2.

The Tens

First you take 1234 and divide it by ten. RM2K gives you 123. To remove the 120 take write and
add it to write 2 and multiply the new number (12) times ten making 120. Now subtract 123 from
write 2 (120) and you'll get 3. Record the three to Write 3. You now have the tens column

The Ones

Take 1234. (Don't bother dividing you'll get the same thing) Take Write plus write 3 (making 123)
and multiply by ten (making 1230) Then take 1234 minus write 3 (1230) to get the number 4. You
now have the ones column

Take that fork users :P