how can i make every 3 digits in a value increase 100 life of a player?
my game has very high power values and is leaving players with infinite life, I will try this metadata to see it better, if you have other ideas on how I can make a life system with automatic numbers, show me.
The way you did it in your second post would do this because it is adding to a current value, leading to exponentiation.
1 - 0
100 - 100
100000 - 300
100000000 - 600
The way you did it in your first post works like this
1 - 33
2 - 99
3 - 199
4 - 332
There are a few reasons. First is, you are getting the value itself and not the number of digits in the value. Second, you are multiplying by 100 inside of math.floor. And last, you are adding to the current value rather than setting the value. As with your latter code, this leads to exponentiation. He wants every three digits to increase the value by 100, not increase by 100*digits/3.
Is that what OP wants? He says, “ how can i make every 3 digits in a value increase 100 life of a player?” Wouldn’t this mean that he wouldn’t want 1 digit to give 100 at the start?
Yes that’s why I was wondering why he included that.
Shouldn’t this be what OP wants?
Well, I suppose the only way to know is if OP himself responds.