Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Not sure what is happening, but I think the i counter in the for loop might be altered halfway (reduced?) resulting in the for loop not ending as it should. You might want to print out i to debug? Also its not clear how the program flow for the mirror effect via the break statement is working. Perhaps you want to post some of the code used?

Thanks! I posted in another thread with a link to my GitHub with the code, and adroitconceptions was able to help me solve the problem. (The logic of the loop was completely messed up.) There was a lot of extra stuff in there - manipulating the positioncount and so on - that was absolutely unnecessary.