- Joined
- Jul 26, 2008
- Messages
- 1,009
I have some rects on my map, and I need to use a few of them to check if a unit will spawn there. There are 21 to check. I need to check which rect was entered in order to find out if the unit will be respawning in it.
Instead of doing a ton of if thens, I would like to do a loop instead. I want to loop thrugh the rects.
My first idea was to rename the rects to start with a number, then loop an integer + 1 every time and check by converting it to a string. But I don't know how to convert the name of the rect.
Is there some easy way to loop through rects?
Instead of doing a ton of if thens, I would like to do a loop instead. I want to loop thrugh the rects.
My first idea was to rename the rects to start with a number, then loop an integer + 1 every time and check by converting it to a string. But I don't know how to convert the name of the rect.
Is there some easy way to loop through rects?