The Very-Important Mod function

How would I construct the mod function to turn a counter’s number into a number between one and four?

what is a mod function? And couldn’t you just use a trigger that will set a property to a random integer from 1 to 4, and tie the property to the counter?

No, I’m working on my GK8 map, and was having trouble on when to reset the counters for the checkpoints. To sidestep that can of worms, I decided to just take the mod of the number. However, I forgot how to.

So take the remainder of the number when divided by 4. Multiply that by 4. Voila!

How would I take the remainder? Is there a block for that?

Can’t you store it in a property?

Yes there is a block for that. Go hunt in the far reaches of the math section.

I found one of black hole’s old posts about the backspace button that talked about the mod. Would the A or the B be 4?

The thing that divides is 4.

This topic was automatically closed 3 hours after the last reply. New replies are no longer allowed.