0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, ...
0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, ...
New Game (index = 0)
Continue (index = 1)
Gallery (index = 2)
Quit (index = 3)
Sry man, im using 2003 right now, but at the first time i was using the MV. I will change that@DarlesLSF This is posted in RPGMaker 2000/2003, but the information under your avatar says that you use MV.
Could you please post and clarify which engine this query refers to.
Thanks.
I still use that part, because i dont knew about that mod function hahaOnly if you are familiar with math, you will see that modulo is very helpful.
Suppose you have a variable that always increased by one.
Now you put an operation of mod 4 at the final operation. The iteration will change to this :Code:0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, ...
Code:0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, ...
This is useful for indexing in menu / option. You know when there are selectable choice where you navigate by pressing up and down for example. Imagine you have 4 selectable choice.
What do you think happened when you keep pressing down after the Quit? Your cursor will loop back to New Game, thanks to the mod 4 operation.Code:New Game (index = 0) Continue (index = 1) Gallery (index = 2) Quit (index = 3)
I'm ashamed that some people still use if (index == 4) then index = 0 as a solution for these.
Let start with this(Currently, i know how to make it show 1234, 234 34 4, but not 1,234)
Let start with this
to get 1 from 1234, divide it by 1000
to get 2 from 234, divide it by 100
to get 3 from 32, divide it by 10
@Blair Pendragon , please refrain from necro-posting in a thread. Necro-posting is posting in a thread that has not had posting activity in over 30 days. You can review our forum rules here. Thank you.