Question
Loop using external variables
I need to make a loop, which keeps a spawned item within the boundaries of the screen. It needs to be like this:
if (square_x + (width/2) > 480)
{
square_x = square_x - 5
}
(square_x is a variable defined before the conditional) but it needs to be a loop, so that it keeps repeating that effect until it satisfies the statement: "square_x < 480"
