[General] Looping through Rects

Status
Not open for further replies.
Level 9
Joined
Apr 23, 2011
Messages
460
What are my choices for looping through various rects. I'm haven't renamed any of them so they're all "Region_00X" where x is any integer between 0 and 5. I was wondering how I could concatenate the integer in a loop to the "Region_00" or if it would be just as easy to do this by storing the regions in an array, as they won't change during game-play.
 
What are my choices for looping through various rects. I'm haven't renamed any of them so they're all "Region_00X" where x is any integer between 0 and 5. I was wondering how I could concatenate the integer in a loop to the "Region_00" or if it would be just as easy to do this by storing the regions in an array, as they won't change during game-play.

Storing them in an array is the best solution.
 
I think he is talking about preplaced rects. Looping through preplaced rects is not possible, unfortunately, without manually registering them to an array.
(Actually, there IS a solution which abuses handle IDs and a certain function that is used to convert a handle ID back to a handle variable, but it's not recommended if you can just put your rects in an array manually at map init)
 
Status
Not open for further replies.
Back
Top