de1337
D
de1337
I'm trying to make TD with strictly mazing, but have come across a problem with detecting blocking.
The only solution I can think of is to detect when a creep stops moving because it is unable to follow along a maze. This trigger actually works, but the unit typically follows the maze up until the dead end, runs back a short distance, returns to the dead end, and then it is finally recognized by the trigger. I'd like to find a way to detect the dead end on the spot so there is no build up of creeps going back and forth.
Thanks in advance.
The only solution I can think of is to detect when a creep stops moving because it is unable to follow along a maze. This trigger actually works, but the unit typically follows the maze up until the dead end, runs back a short distance, returns to the dead end, and then it is finally recognized by the trigger. I'd like to find a way to detect the dead end on the spot so there is no build up of creeps going back and forth.
Thanks in advance.
-
Blocking
-

Events
-


Time - Every 1.00 seconds of game time
-
-

Conditions
-

Actions
-


Set tempStuckCreeps = (Units owned by Neutral Extra matching (((Current order of (Matching unit)) Not equal to (Order(move))) and (((Matching unit) is alive) Equal to True)))
-


Unit Group - Pick every unit in tempStuckCreeps and do (Actions)
-



Loop - Actions
-




Set tempPoint = (Position of (Picked unit))
-




Set tempUnits = (Units within 100.00 of tempPoint matching (((Matching unit) is A structure) Equal to True))
-




Set tempPlayers = (Player group((Player((Custom value of (Picked unit))))))
-




Unit - Explode (Random unit from tempUnits)
-




Game - Display to tempPlayers for 0.50 seconds the text: Blocking detected!
-




Custom script: call DestroyForce( udg_tempPlayers )
-




Custom script: call DestroyGroup( udg_tempUnits )
-




Custom script: call RemoveLocation( udg_tempPoint )
-




Unit Group - Remove (Picked unit) from tempStuckCreeps
-
-
-


Custom script: call DestroyGroup( udg_tempStuckCreeps )
-
-
