HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

TD Path Issue

03-15-2007, 04:08 PM#1
djdeth
Hey everyone,

I am pretty new to the map making field and decided to make a very simple td. The problem is that sometimes the units are not staying on the path and are running way off the path to get to the end. Is there any way to fix this? Maybe specify that they units have to stay on the path somehow? Any input would be much appreciated.
03-15-2007, 04:28 PM#2
Earth-Fury
Units are lazy, like electricity. they will, barring some AI quirks, take the path of least resistance. What that means is they will go however they can fastest to the area they are orderd. lets draw this out:

OOOOOOXOOOOOO
O1OOOOXOOOO2O
OPOOOOXOOOOPO
OPOOOOXOOOOPO
OPOOOOOOOOOPO
OPOOOOOOOOOPO
OPPPPPPPPPPPO
OOOOOOOOOOOOO


1 = start, 2 = the point a unit is orderd to move
O = walkable
P = the path you want them to take
X = unwalkable

The unit will take a path like this: (U = units path)

OOOOOOXOOOOOO
O1OOOOXOOOU2O
OPUOOOXOOUOPO
OPOUOOXOUOOPO
OPOOUUUUOOOPO
OPOOOOOOOOOPO
OPPPPPPPPPPPO
OOOOOOOOOOOOO


Now, to get them to follow the path, you would need to set it up like this:

OOOOOOXOOOOOO
O1OOOOXOOOO4O
OPOOOOXOOOOPO
OPOOOOXOOOOPO
OPOOOOOOOOOPO
OPOOOOOOOOOPO
O2PPPPPPPPP3O
OOOOOOOOOOOOO


Now, if the player blocks the path with a tower, the units will try to get past it and to the point they are orderd in the most effective manner. Which is why many TDs revolve around the idea of makign mazes around the points units are orderd, forcing them to follow the mazes, or making complex mazes that usually start with a strait / diagonal line to force the units into a maze of towers.

Sample of your current movement trigger please?
03-16-2007, 05:20 AM#3
Av3n
Hmmm, order them to go to rects outlining the path

-Av3n
03-16-2007, 11:04 PM#4
FatalError
If you have a somewhat crooked path and you don't want 50 regions, then use Pathing Blockers on both sides of the path. Using a combination of those and regions/triggers, it works great.

(Basically Pathing Blockers are invisible doodads that...well, block the path. I usually put them on the insides of the corners, so the creeps don't cut any corners.)
03-19-2007, 06:10 PM#5
djdeth
Right now its just when a unit moves into start region and its player 12

move to the end region. it is a straight path. I want it setup so that people can maze, only problem is if you block the units dont attack. i took off them being able to flee and that helped them from running away.
03-19-2007, 07:03 PM#6
Earth-Fury
I remember seeing it done this way, but i cant rememebt where:

When a unit is orderd to stop, order them to attack move to their destination. Start a timer, and when it expires, order them to move to their destination (so that they only attack for a brief period)
03-20-2007, 04:07 AM#7
Av3n
Attack move is yr order (rep us!)

-Av3n