I've been experimenting with a bunch of different ways the step counter can be used and I'm wondering if there is a max value (a cap) or if it reverts back to 0 after reaching 2,147,483,647.
If it does, or at least continues to change the number in some way, I can use it perfectly since I'm not attempting to display the value, I'm only using it to trigger an event when it changes to a different value.
Any information on this would be most appreciated and thank you in advance.
Step counter question in regards to longevity.
● ARCHIVED · READ-ONLY
-
-
I believe it keeps going. Where did you get that number from?
-
It's the maximum positive value for a 32 bit binary integer.
-
Nah, he's just wondering if it's going to revert back to zero after reaching "cap"Where did you get that number from?
-
Sorry for my late replies. My comments keep having to be held for moderator approval.
-
This is anxiety inducing. I feel like I'm being rude for not being able to respond to other people's comments in a timely fashion.
-
That's weird, one of my messages finally went through.
I was saying that the number is the maximum positive value of a 32 bit binary integer and I was also apologizing for the late replies. Sorry for the long wait. -
Afaik, Ruby automatically converts Fixnum (32-bit integer) into a Bignum (even bigger one) once it's reached a limit of Fixnum (source: helpfile)
So, your number might be not an actual limit. Besides, who would gonna have step counter on such number lol. -
That's pretty awesome. I had no idea about that lol I found an alternative method of tracking steps using $game_player.moving? and a variable that resets after it reaches a point, but I'll just stick with the normal step counter to keep it simple for now. Thanks a bunch.
-
All my old messages finally came through. Sorry about that.
-
Ace's help files said:Bignum:
The class for long integers, limited only by memory size. The result of an operation is automatically converted into a Fixnum if its value is within Fixnum range. If the value is out of Fixnum range, it is extended into a Bignum. For bit operations, Bignum can be considered to be an infinite 2's complement bit string. Negative numbers in particular can operate as a string of 1 bits extending indefinitely to the left. Mixing Bignum with Float can result in digit cancellation errors upon conversion.
doesn't anyone read the help files?