Ok i explain my problem. There is an island and a gate in the middle of it. The island is all covered by a region called: Regione 005. Under the gate there is a region called To 006. The next island is Regione 006 (obvious)
I have a trigger that do this: when a hero enters the gate, if there are no creeps in the island, the hero is teleported to the nex island. It always worked perfectly, but then i discovered what memory leaks are, so i tried to make the trigger leaks-free...
and now the triggers works for the first time, but when i come back to that island and creeps are respawned... it doesnt work anymore, im able to be teleported to next island even if there are creeps in the island in which i am :banghead: there is no difference than before, i just added the custom script!
how to fix it? tnx al lot!!
here the trigger:
I have a trigger that do this: when a hero enters the gate, if there are no creeps in the island, the hero is teleported to the nex island. It always worked perfectly, but then i discovered what memory leaks are, so i tried to make the trigger leaks-free...
and now the triggers works for the first time, but when i come back to that island and creeps are respawned... it doesnt work anymore, im able to be teleported to next island even if there are creeps in the island in which i am :banghead: there is no difference than before, i just added the custom script!
how to fix it? tnx al lot!!
here the trigger:
Code:
To006
Events
Unit_ - A unit enters To 006 <gen>
Conditions
((Entering unit) is Un eroe) Uguale a TRUE
Actions
Unit Group_ - Add all units of (Units in Regione 005 <gen> owned by Neutrale-ostile) to GruppoRegione005
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(All units of GruppoRegione005 are dead) Uguale a TRUE
Than - Actions
Units - Move (Entering unit) instantly to (Random point in Regione 006 <gen>)
Camera - Pan camera for (Owner of (Entering unit)) to (Position of (Entering unit)) over 0.00 seconds
Else - Actions
Do nothing
Custom script: call DestroyGroup (udg_GruppoRegione005)