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.

      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