PDA

View Full Version : How do i end this loop i made..


Howeeeeee
12-08-2009, 06:53 PM
I made a loop that loops infinite times but when you click on one of the bugs it disappears and the counter for the bugs left goes down by one. So i have a while statement saying while the number of bugs left is greater than zero it continues to loop. But i set everything up and i see on the side that the bugsLeft variable is at 0 but the loops continues to loop. I also want a message to display once all the bugs are gone but cant seem to get there because it wont stop looping.

Dameria
12-08-2009, 07:47 PM
Are you trying to do the "Bug Disappear" program thing? Someone else was asking about that, and I gave them this sample program to help them out, tell me if this is what you are looking for, of if I was completely off.

Howeeeeee
12-08-2009, 07:52 PM
i already got that part but i have the bugs moving in random directions in a endless loop till all of them disappear but i cant seem to get the loop to stop

Dameria
12-09-2009, 09:48 AM
Well when do you want the loop to stop?

Post your world with the loop and I'll see if I can help.