Corleone
New Member
- Reaction score
- 44
I was first using a horrible system to move my units to move in my Tower Defense, so I decided to 'upgrade' it to the system that Blizzard uses in the Blizzard Tower Defense. Anyway, one of the main reasons why I did so is because there's a trigger which makes sure that if a unit would happen to stop, it would receive the last order again, so that it wouldn't stop and screw up the game.
This 'back-up' trigger is :
Player 2 is the owner of the enemy creeps in the TD.
UnitPath[] is an array with all regions that the unit can move towards ( spawn area is UnitPath[1], second one is UnitPath[2], etc ) and I use
The movement system usually works, but the problem is that if a unit stops ( about 10% of the units stops... ) that they don't start to move again after 0.10 seconds. What could be the problem? Am I missing any leaks or anything?
This 'back-up' trigger is :
Code:
Event
Unit - A unit owned by Player 2 ( Blue ) receives an order with no target.
Condition
(Issued order) equals (Order(stop))
Action
Wait 0.10 seconds
Set TempMovement = (Random Point in UnitPath[Custom Value of (triggering unit)
Unit - Order (triggering unit) to Move to TempMovement
Custom script: call RemoveLocation( udg_TempMovement )
Player 2 is the owner of the enemy creeps in the TD.
UnitPath[] is an array with all regions that the unit can move towards ( spawn area is UnitPath[1], second one is UnitPath[2], etc ) and I use
Code:
Unit - Set the custom value of (entering unit) to <index of next region>