Creeps mix pathing up

Tumult

New Member
Reaction score
0
I'm one of those persons that likes to figure everything out themselves and so far i have been able to solve every problem i had using these forums even though i'm quite new to using the editor. (Thumbs up for Andrewgosu's TD guide)

But now i'm having some problems with the pathing from my creeps and i just cant figure out what to do. I made a quick and simplified drawing to explain my problem better. My creeps are all from player 12, i made them different colors in the image to make it clear which path they are following. The grey circles represent the regions.

pathing.jpg


As you can see all the regions drawn are used by multiple spawns, and here is where it goes wrong. Because when they enter one of those regions they walk to random regions instead to the one they are supposed to go to. If i delete the pathing for all spawns but 1, they move as they are supposed to.

Any suggestions?
 

jhnam95

Active Member
Reaction score
12
Judging by the diagram, I think you're going for a 4 or 8 player TD. Why not have a separate owner for each creep spawn? Then you can just check the owner of the creep and tell it to move accordingly.
 

Tumult

New Member
Reaction score
0
If i could do that there would be no problem, but i need to stick to 1 player for the creeps. My picture is simplified, the map will be for 8-11 players with creeps coming from 8 locations, i just couldn't be bothered drawing it all.
 

jedi8955

New Member
Reaction score
4
Post the trigger that tells them where to go. That would help a lot.

It looks to me like they're supposed to do 3/4s of a full circle then move into the center. To do that for each split up, you would need some way of differentiating what creep spawned where.

Set a custom value for creeps when they spawn, then in each trigger that has them moving to the next place, set up something that looks like:

Trigger:
  • Events
    • A unit enters Region
    • Conditions
    • Actions
      • If Custom Value of (Triggering Unit) equals /Custom Value of the unit that's supposed to move in/ Then Order (Triggering Unit) to Move to Center Region. Else, Order (Triggering Unit) to move to /next Region in the Circle/


edit: dunno why it won't snap back out, but the gist is there.
 

Tumult

New Member
Reaction score
0
Trigger:
  • Pathing Red
    • Events
      • Unit - A unit enters Red Spawn <gen>
      • Unit - A unit enters Red 2 <gen>
      • Unit - A unit enters Yellow 2 <gen>
      • Unit - A unit enters Top Right 1 <gen>
      • Unit - A unit enters Top Right 2 <gen>
      • Unit - A unit enters Teal 2 <gen>
      • Unit - A unit enters Green 2 <gen>
      • Unit - A unit enters Low Right 1 <gen>
      • Unit - A unit enters Low Right 2 <gen>
      • Unit - A unit enters Blue 2 <gen>
      • Unit - A unit enters Orange 2 <gen>
      • Unit - A unit enters Low Left 1 <gen>
      • Unit - A unit enters Low Left 2 <gen>
      • Unit - A unit enters Purple 2 <gen>
      • Unit - A unit enters Pink 2 <gen>
      • Unit - A unit enters Red 3 <gen>
      • Unit - A unit enters Red Pink 4 <gen>
      • Unit - A unit enters Red Pink 5 <gen>
      • Unit - A unit enters Red Pink 6 <gen>
    • Conditions
      • (Owner of (Triggering unit)) Equal to hostileCreeps
    • Actions
      • Unit - Set the custom value of (Triggering unit) to ((Custom value of (Triggering unit)) + 1)
      • Set tmpPoint = (Center of regions_red[(Custom value of (Triggering unit))])
      • Unit - Order (Triggering unit) to Move To tmpPoint
      • Custom script: call RemoveLocation( udg_tmpPoint )


1 of the 8 pathing triggers i have, apart from the locations they are all the same.

I think what you typed is what i'm looking for and i understand the trigger you made.

Trigger:
  • Defining Red Spawn
    • Events
      • Unit - A unit enters Red Spawn <gen>
    • Conditions
      • (Owner of (Triggering unit)) Equal to hostileCreeps
    • Actions
      • Unit - Set the custom value of (Triggering unit) to (????????)


So would this work and what kind of variable do i need?
 

jedi8955

New Member
Reaction score
4
I'd suggest separating out the pathing triggers. It shouldn't lag the map (unless you have an unholy crap-ton of stuff going on) and would clean things up immensely. Also, it would free up the custom value slot. (Units can only have 1 custom value)

Do it exactly like I had mentioned before.

And the Defining Red Spawn is perfect, you just need to assign a number to each spawn spot. This isn't done in WC3 or anything, this should be in your Design Document, so you have notes and documentation on everything. Place the number you want to move into the center in each move along trigger as appropriate and you should be good.
 

Tumult

New Member
Reaction score
0
Hey, thanks a lot for your help so far, really appreciate it and i´m on the right way now. I'm still a bit stuck though (i guess its my unfamiliarity with the editor or a lack of sleep).

Trigger:
  • Yellow Spawn
    • Events
      • Unit - A unit enters Yellow Spawn <gen>
    • Conditions
      • (Owner of (Triggering unit)) Equal to hostileCreeps
    • Actions
      • Unit - Set the custom value of (Triggering unit) to 5
      • Unit - Order (Triggering unit) to Move To (Center of Yellow 2 <gen>)

Trigger:
  • Yellow 2
    • Events
      • Unit - A unit enters Yellow 2 <gen>
    • Conditions
    • Actions
      • If ( ???? ???? ) then do (Unit - Order (Triggering unit) to Move To (Center of Yellow 3 <gen>)) else do (Unit - Order (Triggering unit) to Move To (Center of Top Right 1 <gen>))


For the 8 spawn points i have, i gave all spawns a different value (red=1, blue=2 etc...) like shown above in the "Yellow Spawn Trigger" that got 5.

Now i got to refer to that value at the beginning of the if/then/else Action in the "Yellow 2 Trigger" But i can't find what i'm supposed to put at the beginning of the Action. I just don't see the options that you posted in your first reply to me :/
 

Guest3z

New Member
Reaction score
22
Using your picture it looks like you just want the creeps to move clockwise until they make 3/4 of a circle. As stated by jedi8955 you can use custom values to determine when each creep has made this 3/4 circle trip with a trigger like
Trigger:
  • Bottom Middle
    • Events
      • Unit - A unit enters Bottom Middle <gen>
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Custom value of (Triggering unit)) Equal to 3
        • Then - Actions
          • Unit - Order (Triggering unit) to Move To (Center of Middle <gen>)
        • Else - Actions
          • Unit - Set the custom value of (Triggering unit) to ((Custom value of (Triggering unit)) + 1)
          • Unit - Order (Triggering unit) to Move To (Center of Bottom Left <gen>)

(this leaks)
Adding +1 to the creeps custom value and having it continue its clockwise movement at each junction with the middle (bottom middle circle, middle left circle, top middle circle, middle right circle) until after it reaches 3 he goes to the middle.
Hope this helps :thup:
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • 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 The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +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