• Use Regions, instead of locations in the Map Init to define their spawning spot. Remove TempLoc leaks (two, at the moment).
• Though you should pick regions into the code,
-
Set TempLoc = SR_SpawnRegion[LoopingInteger]
-
Hashtable - Save Handle OfTempLoc as (Key RespawnLoc) of SR_Key in SR_Hashtable
Simply:
-
Hashtable - Save Handle Of SR_SpawnRegion[LoopingInteger] as (Key RespawnLoc) of SR_Key in SR_Hashtable
Well, that's not exactly what I said, but if you want to stick with that, you are currently leaking a location, upon saving it.
If you were up to using locations, then you would use the method above; if not, then you can go for the next solution:
• When the unit dies, after checking what array index
(LoopingInteger variable) it belongs to, save the LoopingInteger to it and when the time-out comes, then set
-
TempLoc = (Center of SpawnRegions[(Load 20 of SR_Key from SR_Hashtable)])[trigger]
-
Where Load 20 is the LoopingInteger.[/hidden]
-
[/box][/td][/tr][/TABLE][/center]