How do units moving backwards in a tower defense?

MissKerrigan

Active Member
Reaction score
23
Hello,

- I created a path in my tower defense for the creeps to move over
- I just drew this path by using the terrain editor
- I used about 12 regions which function like waypoints for the creeps

question

I want to make a special ability for towers which having 5% chance to let the targeted creep moving backwards the path for about 3-4 seconds

I tried SO MANY things but nothing seems to work well
Can anyone help me with this?

MissKerrigan


(I tried a trigger to order the targeted unit to the start, and after 3 seconds to the finish again, but the unit is NOT moving backwards at the path, it just walks in a straight line to the start)
 

Darthfett

Aerospace/Cybersecurity Software Engineer
Reaction score
615
Is your tower defense the type that allows players to maze with their towers, or the type that has towers outside the path of the creeps, so that the creeps always have a predetermined direction?

If you allow mazing, would you expect creeps to go backwards through a player's maze?

One catch-all way of doing this, is to track the last 3-4 seconds worth of positions (log a new position every 0.1 seconds or so) for each creep, and to move it backwards through these points when it gets hit.
 

MissKerrigan

Active Member
Reaction score
23
No I don't have any maze, in fact I hate maze tower defense games :)

- The creeps starting in the left and going to the right in a specific way by a few bends
- I called my 12 regions 'corner 1' 'corner 2' 'corner 3' etc...
- The creeps moving from corner 1,2,3,4,5,6,7,8,9,10,11,12 to the finish
- The players must build towers outside the path and stop the creeps

the problem is JUST that I don't know which trigger to make because I don't know WHERE the targeted units are when the effect occurs, so I can't send them to any corner

does anyone understand this?
 

X-maul

AKA: Demtrod
Reaction score
201
Well, the easiest way I can think off, would be to make the area around the path, unpathable. Then you could just order the units to walk to the Start, and then go to the end when the effect wears off.
 

MissKerrigan

Active Member
Reaction score
23
I already thought of that but this is not working, because it's too complicated and takes too much time to place so many path blockers in the map
 

MissKerrigan

Active Member
Reaction score
23
I just created a straight line from left to right and created a trigger which orders the targeted unit to the start, and after x seconds to the finish
 

Phubar

Ultra Cool Member
Reaction score
30
Sry for the schematic answer but i have some problems explaining it using normal sentences.

You have to:
- get which is the destination point of the order that is in the index 0 (zero) of the tageted unit
-assign it to a variable
-check what "corner" is equal to this variable
-order that unit to go to the previous "corner"
-after a while order the unit to go to the point in the variable

All this will work only if the unit will only walk while are in the path, not if they will make attacks (becouse the order in the index 0 in this case can be a move order or an attack order)
 

X-maul

AKA: Demtrod
Reaction score
201
If you go into the Terrain editor and click [H] you will go to the pathing part of the terrain editor. Here you can paint the path as you want, it does not take that long. But do as you find best.
 

MissKerrigan

Active Member
Reaction score
23
The problem with pathing (H) is that the minimun pathing is 0.5 tile, so I tried to make the path 1 tile (surrounding by 0.5 tile pathing)

This is causing trouble the creeps walking to 1 edge of the pathing since I MUST give the creeps 0 radius, because some effects (slow, stun, teleport)


It would be only possible for me to create a path of 0.5 tiles and surrounded by 0.5 tile pathings, but this bothers the map from not being equally in beauty
 
General chit-chat
Help Users
  • The Helper The Helper:
    I just got to watch the video because even though I was there I was trying to work out tech problems with the chat since I was the social media guy so I was distracted but check it out guys the video is super fucking great!
    +1
  • WildTurkey WildTurkey:
    is there a stephen green in the house?
    +1
  • The Helper The Helper:
    What is up WildTurkey?
  • The Helper The Helper:
    Looks like Google fixed whatever mistake that made the recipes on the site go crazy and we are no longer trending towards a recipe site lol - I don't care though because it motivated me to spend alot of time on the site improving it and at least now the content people are looking at is not stupid and embarrassing like it was when I first got back into this like 5 years ago.
  • The Helper The Helper:
    Plus - I have a pretty bad ass recipe collection now! That section of the site is 10 thousand times better than it was before
  • The Helper The Helper:
    We now have a web designer at my job. A legit talented professional! I am going to get him to redesign the site theme. It is time.
  • Varine Varine:
    I got one more day of community service and then I'm free from this nonsense! I polished a cop car today for a funeral or something I guess
  • Varine Varine:
    They also were digging threw old shit at the sheriff's office and I tried to get them to give me the old electronic stuff, but they said no. They can't give it to people because they might use it to impersonate a cop or break into their network or some shit? idk but it was a shame to see them take a whole bunch of radios and shit to get shredded and landfilled
  • The Helper The Helper:
    whatever at least you are free
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top