Hey people,
got a little problem here with my attempt to make a TD. The path has a
circle-like shape with 4 corners. The creeps are to move from their spawning
point to the circle and then... well run in circles. Actually it works, but every
now and then creeps stop at the corners with no idea what to do or decide
to run the other way.
Here is my trigger:
I checked the Regions[] array like a thousand times and I'm pretty sure they
are correct. Furthermore, 3 creeps are periodically created each time and
in total there are ~150 creeps circling in worst case (unkilled).
+rep Appreciate any help.
got a little problem here with my attempt to make a TD. The path has a
circle-like shape with 4 corners. The creeps are to move from their spawning
point to the circle and then... well run in circles. Actually it works, but every
now and then creeps stop at the corners with no idea what to do or decide
to run the other way.
Here is my trigger:
Code:
CircleRun
Events
Unit - A unit enters Region 1 <gen>
Unit - A unit enters Region 2 <gen>
Unit - A unit enters Region 3 <gen>
Unit - A unit enters Region 4 <gen>
Conditions
(Owner of (Triggering unit)) Equal to creeps
Actions
-------- Set custom value. --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Custom value of (Triggering unit)) Equal to 4
Then - Actions
Set CustomValue = 1
Else - Actions
Set CustomValue = ((Custom value of (Triggering unit)) + 1)
-------- Move order. --------
Unit - Set the custom value of (Triggering unit) to CustomValue
Set TempMovePoint = (Random point in Regions[CustomValue])
Unit - Order (Triggering unit) to Move To TempMovePoint
-------- Leak removal --------
Custom script: call RemoveLocation ( udg_TempMovePoint )
I checked the Regions[] array like a thousand times and I'm pretty sure they
are correct. Furthermore, 3 creeps are periodically created each time and
in total there are ~150 creeps circling in worst case (unkilled).
+rep Appreciate any help.