So I have a puzzle in The Missing Part that keeps track of a number. What I want is to show this number as a picture. This would require a script that can keep track of each digit in a Variable and show a different picture depending on what that digit is.
So let's say I have 10 different pictures, one for each number(0 to 9). I need a script that shows a specific picture depending on what digit in the variable. The number 10 would require two pictures to show since the number has 2 digits. 100 would require three pictures because it's 3 digits... etc...
I will also be able to specify the location of the picture to properly align the pictures to appear as a whole number. (The puzzle variable mainly stays within a 2 digit number and rarely becomes a 3 digit number)
Can this be done?
If it was battle-system related, there's scripts for that.
If it's taking place on the map, can't you just event this instead? It's nothing more than just modulo a variable by 10 and then divide by 10 to get every digit.
523 % 10 = 3
523 / 10 = 52
52 % 10 = 2
52 / 10 = 5
5 % 10 = 5 # At this point, you should check if the number is less than 10
So how can I get the value of a digit if the number is a two digit number?
If the number is 52... how do I get the 2?
Sorry, I don't know Modulus very well. I'll look into it and see if I can understand it better.
I showed you in my post.
523 % 10 = 3
Modulo is the remainder after dividing.
523 / 10 = 52 with remainder of 3, thus your modulo is 3
How do I get the digits if it's a negative number?
Temporarily convert the number to positive. Repeat the same procedures. Change it back to negative.
:P
I got it to work! Thanks so much for the help! :haha: