Quantcast
Channel: Questions in topic: "loops"
Viewing all articles
Browse latest Browse all 184

how to tell if a for loop has completed

$
0
0
I've been having trouble with for loops. I've created a simple for loop that decides how far my units move for (int i = 0; i < moveSpeed; i++) { //moves unit if (i == moveSpeed) { path = null; } } My problem is that the path is not cleared. And I'm too dumb to figure it out. Is there any way to tell if the loop has ended and act on that information?

Viewing all articles
Browse latest Browse all 184

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>