| 08-31-2006, 06:37 AM | #1 |
I'm unsure whether this trigger has leaks or not. Since I use Random Point in Rect(bla) in many triggers, this is only one of them, since it would apply to all anyways. Trigger: I'm pretty sure the custom text would be RemoveLoc(...) but I'm not positive for this. Anyone know? Thanks. |
| 08-31-2006, 06:50 AM | #2 |
You can decide for yourself quite easily. Convert the trigger to custom text, and find the function which generates the random point. Then look it up in Blizzard.j, and you should find something which clearly does or does not create a location. In this case though it clearly creates a new location as the random point is not something that exists beforehand. |
| 08-31-2006, 10:29 AM | #3 |
You had a group leak as well, the code below should take care of things. Don't destroy the tempgroup as it's continously used by the create unit thingy Trigger: ![]() ...
![]() Set temploc = (Random point in Alien Spawn <gen>)
![]() Unit - Create 9 Alien Spawn 1 for Player 12 (Brown) at (temploc) facing Default building facing (270.0) degrees
![]() Custom script: call RemoveLocation(udg_temploc)
![]() Set temploc = (Random point in Spawn Attack Target <gen>)
![]() Custom script: set udg_tempgroup = bj_lastCreatedGroup
![]() Unit Group - Order (tempgroup) to Attack-Move To (temploc)
![]() Custom script: call RemoveLocation(udg_temploc)
![]() ... |
| 08-31-2006, 02:27 PM | #4 |
Oh, Thanks Aquilla. I'll put that through all my triggers, it looks good. +rep |
