Unit Movement Problem

Ryuu

I am back with Chocolate (:
Reaction score
64
I will try my best to explain my problem.
Thing is, after 25 seconds of when every player selects his/her hero, creeps will be spawned and will move to 4 different paths.

Each path involves 3 different regions (so as to not have any bugs) but the last region for every path is the same.

My map has 2 teams, so that means that each path it will have 2 teams of units clashing and attacking together (kind of like DotA). The last region for the opposing team is different.

So the problem comes in when units reaches the first region of EVERY path.
They will start to move towards the last region for the other team.

And then, new creeps spawned will just be stucked there, creating a mass spawn thingy..

And my units never reach to the other half of the map.
Well its difficult to explain my problem, not without showing the map.

So I've uploaded it.
If you're lazy to see through it,

Here are the triggers that are involved in this crazy problem (or so I think it is):

Terms are used in the triggers:

BTM - One of the paths, the bottom one. (this may refer to a region situated in the path)
BTM2 - A region in BTM.
BTM3 - A region in BTM.
BTMH - One of the paths, the bottom one, but not as bottom as BTM. (this may refer to a region situated in the path)
BTMH2 - A region in BTMH.
BTMH3 - A region in BTMH.
TOP - One of the paths, the top one. (this may refer to a region situated in the path)
TOP2 - A region in TOP.
TOP3 - A region in TOP.
TOPH - One of the paths, the top one, but not as top as TOP. (this may refer to a region situated in the path)
TOPH2 - A region in TOPH.
TOPH3 - A region in TOPH.
Orange - One of the teams.
Brown - One of the teams.
Orange_BTMcreep - The unit group that belongs to team Orange that is supposed to move to BTM.
Orange_BTMHcreep - The unit group that belongs to team Orange that is supposed to move to BTMH.
... (It is repetitive; Orange_TOPcreep, Orange_TOPHcreep, and the Brown equivalents has exactly the same principle has the above)

The movement goes like this:

BTM > BTM2 > BrownBase (for Orange creeps)
BTM > BTM3 > OrangeBase (for Brown creeps)

Code:
Orange Spawn
    Events
        Time - Every 25.00 seconds of game time
    Conditions
    Actions
        Set tmpPoint = (Center of OrangeCreepSpawn <gen>)
        Unit - Create 1 Archer for Player 6 (Orange) at tmpPoint facing Default building facing degrees
        Custom script:   call RemoveLocation(udg_tmpPoint)
        Unit Group - Add (Last created unit) to Orange_BTMcreep
        Set tmpPoint = (Center of OrangeCreepSpawn <gen>)
        Unit - Create 1 Archer for Player 6 (Orange) at tmpPoint facing Default building facing degrees
        Custom script:   call RemoveLocation(udg_tmpPoint)
        Unit Group - Add (Last created unit) to Orange_BTMcreep
        Set tmpPoint = (Center of OrangeCreepSpawn <gen>)
        Unit - Create 1 Archer for Player 6 (Orange) at tmpPoint facing Default building facing degrees
        Custom script:   call RemoveLocation(udg_tmpPoint)
        Unit Group - Add (Last created unit) to Orange_BTMcreep
        Set tmpPoint = (Center of OrangeCreepSpawn <gen>)
        Unit - Create 1 Huntress for Player 6 (Orange) at tmpPoint facing Default building facing degrees
        Custom script:   call RemoveLocation(udg_tmpPoint)
        Unit Group - Add (Last created unit) to Orange_BTMcreep
        Set tmpPoint = (Center of OrangeCreepSpawn <gen>)
        Unit - Create 1 Huntress for Player 6 (Orange) at tmpPoint facing Default building facing degrees
        Custom script:   call RemoveLocation(udg_tmpPoint)
        Unit Group - Add (Last created unit) to Orange_BTMcreep
        Set tmpPoint = (Center of OrangeCreepSpawn <gen>)
        Unit - Create 1 Mountain Giant for Player 6 (Orange) at tmpPoint facing Default building facing degrees
        Custom script:   call RemoveLocation(udg_tmpPoint)
        Unit Group - Add (Last created unit) to Orange_BTMcreep
        Unit Group - Pick every unit in Orange_BTMcreep and do (Actions)
            Loop - Actions
                Set tmpPoint = (Center of BTM <gen>)
                Unit - Order (Picked unit) to Attack-Move To tmpPoint
                Custom script:   call RemoveLocation(udg_tmpPoint)
        Custom script:   call DestroyGroup(udg_Orange_BTMcreep)
        Wait 2.00 seconds
        Set tmpPoint = (Center of OrangeCreepSpawn <gen>)
        Unit - Create 1 Archer for Player 6 (Orange) at tmpPoint facing Default building facing degrees
        Custom script:   call RemoveLocation(udg_tmpPoint)
        Unit Group - Add (Last created unit) to Orange_BTMHcreep
        Set tmpPoint = (Center of OrangeCreepSpawn <gen>)
        Unit - Create 1 Archer for Player 6 (Orange) at tmpPoint facing Default building facing degrees
        Custom script:   call RemoveLocation(udg_tmpPoint)
        Unit Group - Add (Last created unit) to Orange_BTMHcreep
        Set tmpPoint = (Center of OrangeCreepSpawn <gen>)
        Unit - Create 1 Archer for Player 6 (Orange) at tmpPoint facing Default building facing degrees
        Custom script:   call RemoveLocation(udg_tmpPoint)
        Unit Group - Add (Last created unit) to Orange_BTMHcreep
        Set tmpPoint = (Center of OrangeCreepSpawn <gen>)
        Unit - Create 1 Huntress for Player 6 (Orange) at tmpPoint facing Default building facing degrees
        Custom script:   call RemoveLocation(udg_tmpPoint)
        Unit Group - Add (Last created unit) to Orange_BTMHcreep
        Set tmpPoint = (Center of OrangeCreepSpawn <gen>)
        Unit - Create 1 Huntress for Player 6 (Orange) at tmpPoint facing Default building facing degrees
        Custom script:   call RemoveLocation(udg_tmpPoint)
        Unit Group - Add (Last created unit) to Orange_BTMHcreep
        Set tmpPoint = (Center of OrangeCreepSpawn <gen>)
        Unit - Create 1 Mountain Giant for Player 6 (Orange) at tmpPoint facing Default building facing degrees
        Custom script:   call RemoveLocation(udg_tmpPoint)
        Unit Group - Add (Last created unit) to Orange_BTMHcreep
        Unit Group - Pick every unit in Orange_BTMHcreep and do (Actions)
            Loop - Actions
                Set tmpPoint = (Center of BTMH <gen>)
                Unit - Order (Picked unit) to Attack-Move To tmpPoint
                Custom script:   call RemoveLocation(udg_tmpPoint)
        Custom script:   call DestroyGroup(udg_Orange_BTMHcreep)
        Wait 2.00 seconds
        Set tmpPoint = (Center of OrangeCreepSpawn <gen>)
        Unit - Create 1 Archer for Player 6 (Orange) at tmpPoint facing Default building facing degrees
        Custom script:   call RemoveLocation(udg_tmpPoint)
        Unit Group - Add (Last created unit) to Orange_TOPcreep
        Set tmpPoint = (Center of OrangeCreepSpawn <gen>)
        Unit - Create 1 Archer for Player 6 (Orange) at tmpPoint facing Default building facing degrees
        Custom script:   call RemoveLocation(udg_tmpPoint)
        Unit Group - Add (Last created unit) to Orange_TOPcreep
        Set tmpPoint = (Center of OrangeCreepSpawn <gen>)
        Unit - Create 1 Archer for Player 6 (Orange) at tmpPoint facing Default building facing degrees
        Custom script:   call RemoveLocation(udg_tmpPoint)
        Unit Group - Add (Last created unit) to Orange_TOPcreep
        Set tmpPoint = (Center of OrangeCreepSpawn <gen>)
        Unit - Create 1 Huntress for Player 6 (Orange) at tmpPoint facing Default building facing degrees
        Custom script:   call RemoveLocation(udg_tmpPoint)
        Unit Group - Add (Last created unit) to Orange_TOPcreep
        Set tmpPoint = (Center of OrangeCreepSpawn <gen>)
        Unit - Create 1 Huntress for Player 6 (Orange) at tmpPoint facing Default building facing degrees
        Custom script:   call RemoveLocation(udg_tmpPoint)
        Unit Group - Add (Last created unit) to Orange_TOPcreep
        Set tmpPoint = (Center of OrangeCreepSpawn <gen>)
        Unit - Create 1 Mountain Giant for Player 6 (Orange) at tmpPoint facing Default building facing degrees
        Custom script:   call RemoveLocation(udg_tmpPoint)
        Unit Group - Add (Last created unit) to Orange_TOPcreep
        Unit Group - Pick every unit in Orange_TOPcreep and do (Actions)
            Loop - Actions
                Set tmpPoint = (Center of TOP <gen>)
                Unit - Order (Picked unit) to Attack-Move To tmpPoint
                Custom script:   call RemoveLocation(udg_tmpPoint)
        Custom script:   call DestroyGroup(udg_Orange_TOPcreep)
        Wait 2.00 seconds
        Set tmpPoint = (Center of OrangeCreepSpawn <gen>)
        Unit - Create 1 Archer for Player 6 (Orange) at tmpPoint facing Default building facing degrees
        Custom script:   call RemoveLocation(udg_tmpPoint)
        Unit Group - Add (Last created unit) to Orange_TOPHcreep
        Set tmpPoint = (Center of OrangeCreepSpawn <gen>)
        Unit - Create 1 Archer for Player 6 (Orange) at tmpPoint facing Default building facing degrees
        Custom script:   call RemoveLocation(udg_tmpPoint)
        Unit Group - Add (Last created unit) to Orange_TOPHcreep
        Set tmpPoint = (Center of OrangeCreepSpawn <gen>)
        Unit - Create 1 Archer for Player 6 (Orange) at tmpPoint facing Default building facing degrees
        Custom script:   call RemoveLocation(udg_tmpPoint)
        Unit Group - Add (Last created unit) to Orange_TOPHcreep
        Set tmpPoint = (Center of OrangeCreepSpawn <gen>)
        Unit - Create 1 Huntress for Player 6 (Orange) at tmpPoint facing Default building facing degrees
        Custom script:   call RemoveLocation(udg_tmpPoint)
        Unit Group - Add (Last created unit) to Orange_TOPHcreep
        Set tmpPoint = (Center of OrangeCreepSpawn <gen>)
        Unit - Create 1 Huntress for Player 6 (Orange) at tmpPoint facing Default building facing degrees
        Custom script:   call RemoveLocation(udg_tmpPoint)
        Unit Group - Add (Last created unit) to Orange_TOPHcreep
        Set tmpPoint = (Center of OrangeCreepSpawn <gen>)
        Unit - Create 1 Mountain Giant for Player 6 (Orange) at tmpPoint facing Default building facing degrees
        Custom script:   call RemoveLocation(udg_tmpPoint)
        Unit Group - Add (Last created unit) to Orange_TOPHcreep
        Unit Group - Pick every unit in Orange_TOPHcreep and do (Actions)
            Loop - Actions
                Set tmpPoint = (Center of TOPH <gen>)
                Unit - Order (Picked unit) to Attack-Move To tmpPoint
                Custom script:   call RemoveLocation(udg_tmpPoint)
        Custom script:   call DestroyGroup(udg_Orange_TOPHcreep)

Code:
Brown Spawn
    Events
        Time - Every 15.00 seconds of game time
    Conditions
    Actions
        Set tmpPoint = (Center of BrownCreepSpawn <gen>)
        Unit - Create 1 Archer for Player 12 (Brown) at tmpPoint facing Default building facing degrees
        Custom script:   call RemoveLocation(udg_tmpPoint)
        Unit Group - Add (Last created unit) to Brown_BTMcreep
        Set tmpPoint = (Center of BrownCreepSpawn <gen>)
        Unit - Create 1 Archer for Player 12 (Brown) at tmpPoint facing Default building facing degrees
        Custom script:   call RemoveLocation(udg_tmpPoint)
        Unit Group - Add (Last created unit) to Brown_BTMcreep
        Set tmpPoint = (Center of BrownCreepSpawn <gen>)
        Unit - Create 1 Archer for Player 12 (Brown) at tmpPoint facing Default building facing degrees
        Custom script:   call RemoveLocation(udg_tmpPoint)
        Unit Group - Add (Last created unit) to Brown_BTMcreep
        Set tmpPoint = (Center of BrownCreepSpawn <gen>)
        Unit - Create 1 Archer for Player 12 (Brown) at tmpPoint facing Default building facing degrees
        Custom script:   call RemoveLocation(udg_tmpPoint)
        Unit Group - Add (Last created unit) to Brown_BTMcreep
        Set tmpPoint = (Center of BrownCreepSpawn <gen>)
        Unit - Create 1 Archer for Player 12 (Brown) at tmpPoint facing Default building facing degrees
        Custom script:   call RemoveLocation(udg_tmpPoint)
        Unit Group - Add (Last created unit) to Brown_BTMcreep
        Set tmpPoint = (Center of BrownCreepSpawn <gen>)
        Unit - Create 1 Archer for Player 12 (Brown) at tmpPoint facing Default building facing degrees
        Custom script:   call RemoveLocation(udg_tmpPoint)
        Unit Group - Add (Last created unit) to Brown_BTMcreep
        Unit Group - Pick every unit in Brown_BTMcreep and do (Actions)
            Loop - Actions
                Set tmpPoint = (Center of BTM <gen>)
                Unit - Order (Picked unit) to Attack-Move To tmpPoint
                Custom script:   call RemoveLocation(udg_tmpPoint)
        Custom script:   call DestroyGroup(udg_Brown_BTMcreep)
        Wait 2.00 seconds
        Set tmpPoint = (Center of BrownCreepSpawn <gen>)
        Unit - Create 1 Archer for Player 12 (Brown) at tmpPoint facing Default building facing degrees
        Custom script:   call RemoveLocation(udg_tmpPoint)
        Unit Group - Add (Last created unit) to Brown_BTMHcreep
        Set tmpPoint = (Center of BrownCreepSpawn <gen>)
        Unit - Create 1 Archer for Player 12 (Brown) at tmpPoint facing Default building facing degrees
        Custom script:   call RemoveLocation(udg_tmpPoint)
        Unit Group - Add (Last created unit) to Brown_BTMHcreep
        Set tmpPoint = (Center of BrownCreepSpawn <gen>)
        Unit - Create 1 Archer for Player 12 (Brown) at tmpPoint facing Default building facing degrees
        Custom script:   call RemoveLocation(udg_tmpPoint)
        Unit Group - Add (Last created unit) to Brown_BTMHcreep
        Set tmpPoint = (Center of BrownCreepSpawn <gen>)
        Unit - Create 1 Archer for Player 12 (Brown) at tmpPoint facing Default building facing degrees
        Custom script:   call RemoveLocation(udg_tmpPoint)
        Unit Group - Add (Last created unit) to Brown_BTMHcreep
        Set tmpPoint = (Center of BrownCreepSpawn <gen>)
        Unit - Create 1 Archer for Player 12 (Brown) at tmpPoint facing Default building facing degrees
        Custom script:   call RemoveLocation(udg_tmpPoint)
        Unit Group - Add (Last created unit) to Brown_BTMHcreep
        Set tmpPoint = (Center of BrownCreepSpawn <gen>)
        Unit - Create 1 Archer for Player 12 (Brown) at tmpPoint facing Default building facing degrees
        Custom script:   call RemoveLocation(udg_tmpPoint)
        Unit Group - Add (Last created unit) to Brown_BTMHcreep
        Unit Group - Pick every unit in Brown_BTMcreep and do (Actions)
            Loop - Actions
                Set tmpPoint = (Center of BTMH <gen>)
                Unit - Order (Picked unit) to Attack-Move To tmpPoint
                Custom script:   call RemoveLocation(udg_tmpPoint)
        Custom script:   call DestroyGroup(udg_Brown_BTMHcreep)
        Wait 2.00 seconds
        Set tmpPoint = (Center of BrownCreepSpawn <gen>)
        Unit - Create 1 Archer for Player 12 (Brown) at tmpPoint facing Default building facing degrees
        Custom script:   call RemoveLocation(udg_tmpPoint)
        Unit Group - Add (Last created unit) to Brown_TOPcreep
        Set tmpPoint = (Center of BrownCreepSpawn <gen>)
        Unit - Create 1 Archer for Player 12 (Brown) at tmpPoint facing Default building facing degrees
        Custom script:   call RemoveLocation(udg_tmpPoint)
        Unit Group - Add (Last created unit) to Brown_TOPcreep
        Set tmpPoint = (Center of BrownCreepSpawn <gen>)
        Unit - Create 1 Archer for Player 12 (Brown) at tmpPoint facing Default building facing degrees
        Custom script:   call RemoveLocation(udg_tmpPoint)
        Unit Group - Add (Last created unit) to Brown_TOPcreep
        Set tmpPoint = (Center of BrownCreepSpawn <gen>)
        Unit - Create 1 Archer for Player 12 (Brown) at tmpPoint facing Default building facing degrees
        Custom script:   call RemoveLocation(udg_tmpPoint)
        Unit Group - Add (Last created unit) to Brown_TOPcreep
        Set tmpPoint = (Center of BrownCreepSpawn <gen>)
        Unit - Create 1 Archer for Player 12 (Brown) at tmpPoint facing Default building facing degrees
        Custom script:   call RemoveLocation(udg_tmpPoint)
        Unit Group - Add (Last created unit) to Brown_TOPcreep
        Set tmpPoint = (Center of BrownCreepSpawn <gen>)
        Unit - Create 1 Archer for Player 12 (Brown) at tmpPoint facing Default building facing degrees
        Custom script:   call RemoveLocation(udg_tmpPoint)
        Unit Group - Add (Last created unit) to Brown_TOPcreep
        Unit Group - Pick every unit in Brown_TOPcreep and do (Actions)
            Loop - Actions
                Set tmpPoint = (Center of TOP <gen>)
                Unit - Order (Picked unit) to Attack-Move To tmpPoint
                Custom script:   call RemoveLocation(udg_tmpPoint)
        Custom script:   call DestroyGroup(udg_Brown_TOPcreep)
        Wait 2.00 seconds
        Set tmpPoint = (Center of BrownCreepSpawn <gen>)
        Unit - Create 1 Archer for Player 12 (Brown) at tmpPoint facing Default building facing degrees
        Custom script:   call RemoveLocation(udg_tmpPoint)
        Unit Group - Add (Last created unit) to Brown_TOPHcreep
        Set tmpPoint = (Center of BrownCreepSpawn <gen>)
        Unit - Create 1 Archer for Player 12 (Brown) at tmpPoint facing Default building facing degrees
        Custom script:   call RemoveLocation(udg_tmpPoint)
        Unit Group - Add (Last created unit) to Brown_TOPHcreep
        Set tmpPoint = (Center of BrownCreepSpawn <gen>)
        Unit - Create 1 Archer for Player 12 (Brown) at tmpPoint facing Default building facing degrees
        Custom script:   call RemoveLocation(udg_tmpPoint)
        Unit Group - Add (Last created unit) to Brown_TOPHcreep
        Set tmpPoint = (Center of BrownCreepSpawn <gen>)
        Unit - Create 1 Archer for Player 12 (Brown) at tmpPoint facing Default building facing degrees
        Custom script:   call RemoveLocation(udg_tmpPoint)
        Unit Group - Add (Last created unit) to Brown_TOPHcreep
        Set tmpPoint = (Center of BrownCreepSpawn <gen>)
        Unit - Create 1 Archer for Player 12 (Brown) at tmpPoint facing Default building facing degrees
        Custom script:   call RemoveLocation(udg_tmpPoint)
        Unit Group - Add (Last created unit) to Brown_TOPHcreep
        Set tmpPoint = (Center of BrownCreepSpawn <gen>)
        Unit - Create 1 Archer for Player 12 (Brown) at tmpPoint facing Default building facing degrees
        Custom script:   call RemoveLocation(udg_tmpPoint)
        Unit Group - Add (Last created unit) to Brown_TOPHcreep
        Unit Group - Pick every unit in Brown_TOPHcreep and do (Actions)
            Loop - Actions
                Set tmpPoint = (Center of TOPH <gen>)
                Unit - Order (Picked unit) to Attack-Move To tmpPoint
                Custom script:   call RemoveLocation(udg_tmpPoint)
        Custom script:   call DestroyGroup(udg_Brown_TOPHcreep)

Code:
Orange Enters Lane
    Events
        Unit - A unit enters BTM <gen>
        Unit - A unit enters BTMH <gen>
        Unit - A unit enters TOP <gen>
        Unit - A unit enters TOPH <gen>
    Conditions
        And - All (Conditions) are true
            Conditions
                ((Entering unit) is A Hero) Equal to True
                (Owner of (Entering unit)) Equal to Player 6 (Orange)
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (BTM <gen> contains (Triggering unit)) Equal to True
            Then - Actions
                Set tmpPoint = (Center of BTM2 <gen>)
                Unit - Order (Picked unit) to Attack-Move To tmpPoint
                Custom script:   call RemoveLocation(udg_tmpPoint)
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (BTMH <gen> contains (Triggering unit)) Equal to True
            Then - Actions
                Set tmpPoint = (Center of BTMH2 <gen>)
                Unit - Order (Picked unit) to Attack-Move To tmpPoint
                Custom script:   call RemoveLocation(udg_tmpPoint)
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (TOP <gen> contains (Triggering unit)) Equal to True
            Then - Actions
                Set tmpPoint = (Center of TOP2 <gen>)
                Unit - Order (Picked unit) to Attack-Move To tmpPoint
                Custom script:   call RemoveLocation(udg_tmpPoint)
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (TOPH <gen> contains (Triggering unit)) Equal to True
            Then - Actions
                Set tmpPoint = (Center of TOPH2 <gen>)
                Unit - Order (Picked unit) to Attack-Move To tmpPoint
                Custom script:   call RemoveLocation(udg_tmpPoint)
            Else - Actions

Code:
Brown Enters Lane
    Events
        Unit - A unit enters BTM <gen>
        Unit - A unit enters BTMH <gen>
        Unit - A unit enters TOP <gen>
        Unit - A unit enters TOPH <gen>
    Conditions
        And - All (Conditions) are true
            Conditions
                ((Entering unit) is A Hero) Equal to True
                (Owner of (Entering unit)) Equal to Player 12 (Brown)
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (BTM <gen> contains (Triggering unit)) Equal to True
            Then - Actions
                Set tmpPoint = (Center of BTM3 <gen>)
                Unit - Order (Picked unit) to Attack-Move To tmpPoint
                Custom script:   call RemoveLocation(udg_tmpPoint)
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (BTMH <gen> contains (Triggering unit)) Equal to True
            Then - Actions
                Set tmpPoint = (Center of BTMH3 <gen>)
                Unit - Order (Picked unit) to Attack-Move To tmpPoint
                Custom script:   call RemoveLocation(udg_tmpPoint)
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (TOP <gen> contains (Triggering unit)) Equal to True
            Then - Actions
                Set tmpPoint = (Center of TOP3 <gen>)
                Unit - Order (Picked unit) to Attack-Move To tmpPoint
                Custom script:   call RemoveLocation(udg_tmpPoint)
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (TOPH <gen> contains (Triggering unit)) Equal to True
            Then - Actions
                Set tmpPoint = (Center of TOPH3 <gen>)
                Unit - Order (Picked unit) to Attack-Move To tmpPoint
                Custom script:   call RemoveLocation(udg_tmpPoint)
            Else - Actions

Code:
Orange Enters Lane2
    Events
        Unit - A unit enters BTM2 <gen>
        Unit - A unit enters BTMH2 <gen>
        Unit - A unit enters TOP2 <gen>
        Unit - A unit enters TOPH2 <gen>
    Conditions
        (Owner of (Triggering unit)) Equal to Player 6 (Orange)
    Actions
        Set tmpPoint = (Center of BrownBase <gen>)
        Unit - Order (Picked unit) to Attack-Move To tmpPoint
        Custom script:   call RemoveLocation(udg_tmpPoint)

Code:
Brown Enters Lane2
    Events
        Unit - A unit enters BTM3 <gen>
        Unit - A unit enters BTMH3 <gen>
        Unit - A unit enters TOP3 <gen>
        Unit - A unit enters TOPH3 <gen>
    Conditions
        (Owner of (Triggering unit)) Equal to Player 12 (Brown)
    Actions
        Set tmpPoint = (Center of OrangeBase <gen>)
        Unit - Order (Picked unit) to Attack-Move To tmpPoint
        Custom script:   call RemoveLocation(udg_tmpPoint)

And the map:
 

Attachments

  • DeadAce10.w3x
    96 KB · Views: 59

perkeyone

something clever
Reaction score
71
could you post two little illustrations of where the regions are relative to eachother?

one illustration should use arrows to show what you want to happen
the other will use arrows to show what is happening

that would really help me at least

it might help to condense your unit creation triggers too
in stead of making one archer 3 times why not just make 3 archers?
or make a loop that make one archer 3 times?
 

perkeyone

something clever
Reaction score
71
do you have in your triggers "run melee ai script"?
if orange and brown are computer players and you have "run melee ai script"
i think it messes it up.
 

Ryuu

I am back with Chocolate (:
Reaction score
64
> do you have in your triggers "run melee ai script"?

Nope, don't have.​
 

perkeyone

something clever
Reaction score
71
i found this in a towerdefense tutorial i think it will help you though

Step 3 – Pathing

To make the creeps move on the lane, which the players have to defend, you need to create regions via the region palette at and order the creeps to move from one region to another. It is best to use the minimal amount of regions, placing them only in the turning points.

_pathing.gif



Note: When you have a really long straight line, the creeps tend to curve to the side, when walking from the checkpoint at the start to the checkpoint in the end. To prevent that, place (a few) a region(s) in the middle of the lane too.​

Making a trigger for every region is very annoying. Lets skip that and use the creeps custom value and some region arrays to make the pathing system as economical as possible. Start setting your regions into arrays.

td_regionss.jpg



Note: You must begin setting the array indexes from 0, not 1. Units' custom values are 0 by default, not 1.

After that, you just need to order them to move from one region to another. Basically, the custom value is there to keep track of the regions the unit has entered, so it can order it to move the next correct region.

exampleRegion.gif






Q: The creeps in my Tower Defense simply walk back to the starting point and ignore the given orders. How to remove it?
A: The problem lies in the gameplay constants - the creeps are ordered to move back to their guarding "spot" if they get too far.

To "remove" this nasty feature from your map, open gameplay constants by selecting "Advanced" from the menu.

Next, just modify the "Creeps - Guard Return Distance" and "Creeps - Guard Return Time" fields.

Insert something big, 99999.0 would do excellent.

dist.jpg


dist2.jpg
 
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