Need help with a Tower Defense trigger ( Unit movement )

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 :
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>
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?
 

R@d14nc3

New Member
Reaction score
49
you could make a preiodic event that "refreshes" the creeps issued order ;)

P.S: Oof, passed 666 posts...
 

Corleone

New Member
Reaction score
44
What do you mean? That I should make the one I posted a periodic trigger, or make a new one that keeps giving the unit a new movement order?
 

Corleone

New Member
Reaction score
44
::EDIT::

Well, I changed the TempMovement variable to
Code:
Set TempMovement = (Center of UnitPath[Custom value of (triggering unit)]
and it seems to be working fine now... Don't really understand why it didn't work as a Random Point, but does as Center of <gen>. Ah well.. problem fixed...
 
M

Mythic Fr0st

Guest
hmm

Just so you know, when I was making td's, I found using "Unit Group" issue order targeting a point, or w/e, to do that stuff, cus when you use

Unit - issue order targeting a point, some stop, unit group works

maybe that'd help
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top