Remainder Variable

Started by k9inpoop, December 15, 2010, 04:18:27 am

Previous topic - Next topic

k9inpoop

Is there any way to make a variable equal the remainder of 2 variables for example:
variable A = 10
variable B = 2
Variable C = The Remaining of Variables A and B combined which will equal 8.
If it is possible can someone make it or show me how it is done because i am making a custom leveling system in my game
I have no clue how to do it  :^_^':



Blizzard

Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

k9inpoop

WOW :) thanks blizz i didn't think it was that easy *brain-fart*



Aqua

Um... that's called "Subtraction" o-o

Remainder is modulus
10 % 2 = 0
10 % 3 = 1

Blizzard

Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Aqua

I'm just saying for the future...
It's kinda important to know the difference between subtraction and remainder XD

k9inpoop

well i am sorry that i didn't say subtract. the reason why is because it was like 3 am where i was when i made the post so i was not thinking right  :^_^':