Ok guys, i have this 2 trigger in my map (i took them froma tutorial on this forum)
here is the first, it checks all unit playable map area owned bu neutral hostile and assignes to them a custom value and position
the second revive every dying unit where it was at map initialisation
this should work perfectly and be leak free... but it does not!! rarely i find a unit respawned in a different location (maybe a couple of units respwaned where another unit died )
might it be due the time needed for bones of creeps corpes to disappear? i saw some people talkink abount that, but i dunno how could it be related to my triggers..
thanx!!!
here is the first, it checks all unit playable map area owned bu neutral hostile and assignes to them a custom value and position
Code:
Creep Revival System Initialization
Events
Time - Map initialisazion // i also tried to change it to elapsed game time
Conditions
Actions
Unit Group_ - Pick every unit in (Units in (Playable map area) owned by Neutrale-ostile) and do (Actions)
Loop - Actions
Set Integer = (Integer + 1)
Unit_ - Set the custom value of (Picked unit) to Integer
Custom script: set udg_Creep_X[udg_Integer] = GetUnitX(GetEnumUnit())
Custom script: set udg_Creep_Y[udg_Integer] = GetUnitY(GetEnumUnit())
the second revive every dying unit where it was at map initialisation
Code:
Revive Creeps 1 by 1
Events
Unit_ - A unit is dead
Conditions
(Owner of (Triggering unit)) Equal to Neutrale-ostile
((Triggering unit) is A Hero) Equal to FALSE
((Triggering unit) is Summoned) Equal to FALSE
Actions
Set TempPointCreeps[1] = (Center of (Entire map))
Set TempPointCreeps[2] = (TempPointCreeps[1] offset by (Creep_X[(Custom value of (Triggering unit))], Creep_Y[(Custom value of (Triggering unit))]))
Wait 90.00 seconds
Unit_ - Create 1 (Unit-type of (Triggering unit)) for Neutrale-ostile at TempPointCreeps[2] facing Orientamento predefinito degli edifici degrees
Unit_ - Set the custom value of (Last created unit) to (Custom value of (Triggering unit))
Custom script: call RemoveLocation(udg_TempPointCreeps[1])
Custom script: call RemoveLocation(udg_TempPointCreeps[2])
this should work perfectly and be leak free... but it does not!! rarely i find a unit respawned in a different location (maybe a couple of units respwaned where another unit died )
might it be due the time needed for bones of creeps corpes to disappear? i saw some people talkink abount that, but i dunno how could it be related to my triggers..
thanx!!!