Page 2 of 2

Re: For loop problem

Posted: Sat May 30, 2020 6:38 am
by CanYouReply
Another question - is there any need to use the 'break' in this loop ? is there a specific reason for this ? I can see If I don't use 'break' here it still works perfectly.

Code: Select all

if CheckCollision(x, y, 0, 0, v.x, v.y, v.width, v.height) then
			inside_small_boxes = true
			 break
		end

Re: For loop problem

Posted: Sat May 30, 2020 8:11 am
by 4vZEROv
If you click on the first small boxe you don't need to check if you clicked on the 2 others.