- Joined
- Nov 28, 2008
- Messages
- 704
Hi, I'm making a map where there are basically a lot of doors. Hard coding every single door to open when a unit enters a region would have been utter and brutal torture, not to mnetion the countless errors I might make.
So, in lieu of wasting over 9000 hours of my life, I made a system that makes an array of destruct(i/a)bles, which then creates rectangles 200 size in other direction from the door. Then, I made a periodically firing trigger (every .5 seconds atm, it seems to work fine) which picks every destrct(i/a)ble in this rect array, and closes it. Then it checks in those same rectangles for units, if there are some, it opens.
Simple enough, waste of writing to ask if there are any inherently better methods (I searched for something to check if any units are in radius of a door, but couldnt find - is there something like this?) and was going to ask if
leaks. I cant find ANY sort of variable for a destruct(i/a)ble group, so I'm assuming that unlike ForGroup(), it does not actually make a group of destruct(i/a)bles, and so does not leak.
Does it?
Thanks for anyone who can answer any of these questions.
So, in lieu of wasting over 9000 hours of my life, I made a system that makes an array of destruct(i/a)bles, which then creates rectangles 200 size in other direction from the door. Then, I made a periodically firing trigger (every .5 seconds atm, it seems to work fine) which picks every destrct(i/a)ble in this rect array, and closes it. Then it checks in those same rectangles for units, if there are some, it opens.
Simple enough, waste of writing to ask if there are any inherently better methods (I searched for something to check if any units are in radius of a door, but couldnt find - is there something like this?) and was going to ask if
JASS:
call EnumDestructablesInRectAll( DoorsRect[TempDoorCounter], function Trig_Doors_Func002002002
leaks. I cant find ANY sort of variable for a destruct(i/a)ble group, so I'm assuming that unlike ForGroup(), it does not actually make a group of destruct(i/a)bles, and so does not leak.
Does it?
Thanks for anyone who can answer any of these questions.