HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Help with unit stalls, anti-sticking

12-31-2003, 03:44 AM#1
Lil Blue Smurf
Okay, this is the first map I am doing so maybe I am missing something.
Some units stall and I can't get them to unstall. Heres all the info.

It is a td type of game, so there are quite a few if enter, go to things.
Here is the script I use for those (well, ignore the custom number, it changes on every region). It is based off the blizzard td one.

----------
Events
Unit - A unit enters TL01 <gen>
Conditions
(Owner of (Triggering unit)) Equal to Player 9 (Gray)
Actions
Unit - Set the custom value of (Triggering unit) to 1
Unit - Order (Triggering unit) to Move To (Center of Move_Points [(Custom value of (Triggering unit))])
-----------

The anti-stick script I use is this.

-------
Events
Unit - A unit owned by Player 9 (Gray) Is issued an order with no target
Conditions
Actions
Unit - Order (Triggering unit) to Move To (Center of Center <gen>)
-------

The above originally order the units to Move To (Center of Move_Points [(Custom value of (Triggering unit))]) just as in the normal triggers, but that didn't work either. I also tried using the condition that the issued order was stop.

What it looks like to me, is that the units stop just before the region they are supposed to go to, so there is not actually an order issued, they just finish the move to order too early, which doesn't make the anti-stick trig work. I can move behind the unit and attack, forcing it to move tower the region, and it instantly continues, which also suggests that it stops just short of the region. Also, I have checked the custom number and it is set for just before the region they stall near (again suggesting stopping short).

Any help is greatly appreciated, I just can't seem to figure this one out. The only thing I can think of is to make two regions at each point, ordering to go to the further one to ensure that the unit enters the closer, but that would add a lot of regions, and require a lot of reworking triggers.
12-31-2003, 03:54 AM#2
Nemesis9x
I think this is your problem, the region is too small so creeps croud up around it so they cant get to it and decide they have gotten to the region. I dont know why this happens but this happened to me so make the regions bigger and order them to move to center.

Or your problem is that there is too many units on the map. I dont know why but in my map i had soo many units that sometimes they are dumbasses and just stop. If this is the case make stronger units and less.
12-31-2003, 04:15 AM#3
Lil Blue Smurf
Well, the regions about 1 tile wide and 2 tiles high, or around enough room that I could stick 2 towers in them. I have looked at other tds and this is not any smaller than the area they use. As far as number of guys go, I am still testing so I am only spawning units for myself, so there are in total about 45 units on the map. Any one else have suggestions? Oh, but thanks for the input :D
12-31-2003, 04:35 AM#4
Ninja Squirrel
In Blizzard's TD map all of the escaping prisoners were set to have small collision areas. Blizzard used 5 for some reason. Nice round number I guess.

I also noticed that Blizzard's movement orders are to a random point in the region, not the center.

In Blizzard's stuck triggers, it waits 0.1 seconds before it issues the move order, it also checks to see if the order was Stop in the Conditions. I'm guessing that the delay is necessary for some reason or another. Maybe try that?
12-31-2003, 05:46 AM#5
Lil Blue Smurf
I tried doing both the enlarged regions, and addind a wait to the anti-stick, neither worked. I got smart finally, and added a display text to the end of the anti stick trigger, so every time it fired I knew.... well, it never fired and the units still got stuck. So I know for sure know that the units just aren't making it all the way to the region, stopping just short of it. Any insight would be very very useful as I have not seen this problem with other tds.

I guess blizzard had the same problem. I just noticed that on their td they have two areas at each location, one a bit smaller than the other, one is "entering" the region, the other is the region. I guess if blizzard couldn't even figure it out then neither will I... May just have to go ahead and do the double region thing :nono:
12-31-2003, 06:00 AM#6
AllPainful
Are you ordering your units in groups?

Meaning, when you spawn your wave, do you spawn them all then order them as a group to goto the first point?

If so thats your problem...

Here is my ATTEMPTED explanasion of why that doesn't work.

When you order units as a group then only 1 unit is actually ordered to move to the spot you told it to, and the others are ordered to move to spots offset from that spot, so if you order them to move as a group, some of the ones in the back of the group are not actually being ordered to go into the region, hense they don't reach the region and they never get ordered to move on. Don't order units to move as a group in TDs. It doesn't work.

I found that out when making my TD. Units would stop just short of the point, and when I stopped ordering my units in groups, the problem disappeared.
12-31-2003, 08:02 PM#7
Lil Blue Smurf
I am creating them and ordering them to move one at a time. Like I said, look at the blizzard td. It looks like they had the same problem, so they made a region just bigger than the one they were ordered to go to so that when the unit does stop just short it doesn't matter, they at least entered the region that orders them to go to the next. I did the same thing and I have no problems now. Yes, my region count practically doubled, but I am hoping that isn't much of a problem. Guess I'll find out when I beta test on bnet.
12-31-2003, 09:34 PM#8
AllPainful
Glad to hear you got it fixed.

I have never opened the blizzard TD so I didn't know about them using 2 regions like that.

Appearently I didn't have your particular problem because when I made my map I did something like that with the 2 regions and so I didn't have that problem...



Its shouldn't be a problem, In my TD there are up to 96 units, that are randomly pathing to the end. There are over 35 different combinations of paths for them to take... and there are 170 regions in my map... I have multiplayed my map before with problem, so yours should be fine.