I want to make a for loop that checks every other index in an array. To do this, I need to have the loop increment by 2 instead of 1, or somehow be able to add 1 to the loopindex within the loop itself which I have not figured out how to do.
Can anyone help?
Develop games in your browser. Powerful, performant & highly capable.
you can use a local variable to which you add 2 every iteration.
alternatively use loopindex*2 when checking