Discuss Scratch
- Discussion Forums
- » Questions about Scratch
- » How do I switch a number in a variable to a whole number?
- Domo900
-
21 posts
How do I switch a number in a variable to a whole number?
I know how to do the Round () block for this, but I need to know how to change it to a whole number. This is how my game works. It has points, and when you lose, they get exchanged into a different currency. It is 10000 Points / 1 Token. When I divide 10000/1 with 10000 points, I should get 1 Token. If I use the Rounding block and I divide, let's say, 17500/1, I would get two Tokens. But I only want one. I want it to be every 10000 points is a token. Even if it's just barely under 20000 points, I still want one, because it isn't quite 20000.
Bite-Sized Awesomesauce.
- Domo900
-
21 posts
How do I switch a number in a variable to a whole number?
Instead of using rounding, I recommend you use floor:([floor v] of (numbers))
Thanks!!
Bite-Sized Awesomesauce.
- Discussion Forums
- » Questions about Scratch
-
» How do I switch a number in a variable to a whole number?