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?
 

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.
  • jonas jonas:
    Oh, I see. I thought Chinese version of A-levels :D
  • jonas jonas:
    I've been using the translate app a lot on my phone. take a photo, translate. take another photo, translate again :D
  • jonas jonas:
    it also has voice translation, my colleagues sometimes use that
  • jonas jonas:
    You came during the 0 covid policy right? How'd you get through quarantine? Did you have some help with the apps and green codes?
  • tom_mai78101 tom_mai78101:
    If you have any Chinese you need help with, let me know.
    +1
  • vypur85 vypur85:
    @jonas Those were the things I did too. Translate app and VPN are always the most important things to have to survive. Lol.
  • vypur85 vypur85:
    Yea I came last year. I was quarantined for about 30 days. Fml. The first day of my quarantine was the eve of Chinese new year last year. Fml again... Lol.
  • vypur85 vypur85:
    @tom_mai78101 IIRC you're from Taiwan right.
  • The Helper The Helper:
    I thought China had cracked down on having any foreign teachers?
  • vypur85 vypur85:
    Yeah I've heard of the news before. My school is still actively hiring foreign teachers. Not sure how things work now.
  • The Helper The Helper:
    yeah it is hard to get reliable information about that kind of stuff
  • The Helper The Helper:
    but you are doing it so it is still doable
  • vypur85 vypur85:
    I think it doesn't affect existing foreign teachers. Then again, its still weird that my school is hiring.
  • The Helper The Helper:
    Happy Monday people hope everyone has a fantastic week!
  • Ghan Ghan:
    Happy Monday?! That's a contradiction.
  • jonas jonas:
  • jonas jonas:
    please put this in the news section, it's crazy
  • tom_mai78101 tom_mai78101:
    Technically, you can post in the Headline News. Just posted your news there.
  • tom_mai78101 tom_mai78101:
    I'm not aware of you not being able to post news.
  • jonas jonas:
    I think technically I can I just forget how
    +1
  • The Helper The Helper:
    Happy Thursday!
  • The Helper The Helper:
    Happy Friday Night!
    +1
  • V-SNES V-SNES:
    Happy Friday night!
    +1
  • vypur85 vypur85:
    Happy Sunday. Sigh. Work day tomorrow.
    +1

    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