HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Spawn/Pathing problems (units pausing)

12-21-2003, 04:34 PM#1
azeckoski
I am having a problem with my units pausing as they walk around my map. I have the pathing set up with nothing in their way but they still clump up and stop randomly as they are walking around. Does anyone have any idea why this would happen?

Here are my spawn triggers.
(trigger 1)
Spawn Left
Events
Conditions
Actions
-------- First group --------
Unit - Create 1 Monster1Type[Round] for Player 11 (Dark Green) at (Random point in SpawnWest <gen>) facing 0.00 degrees
Unit - Set life of (Last created unit) to ((Max life of (Last created unit)) x unitHealthFactor)
Unit - Create 1 Monster2Type[Round] for Player 11 (Dark Green) at (Random point in SpawnWest <gen>) facing 0.00 degrees
Unit - Set life of (Last created unit) to ((Max life of (Last created unit)) x unitHealthFactor)
Unit - Create 1 Monster3Type[Round] for Player 11 (Dark Green) at (Random point in SpawnWest <gen>) facing 0.00 degrees
Unit - Set life of (Last created unit) to ((Max life of (Last created unit)) x unitHealthFactor)
-------- Second group --------
Wait spawnInterval game-time seconds
Unit - Create 1 Monster1Type[Round] for Player 11 (Dark Green) at (Random point in SpawnWest <gen>) facing 0.00 degrees
Unit - Set life of (Last created unit) to ((Max life of (Last created unit)) x unitHealthFactor)
Unit - Create 1 Monster2Type[Round] for Player 11 (Dark Green) at (Random point in SpawnWest <gen>) facing 0.00 degrees
Unit - Set life of (Last created unit) to ((Max life of (Last created unit)) x unitHealthFactor)
Unit - Create 1 Monster3Type[Round] for Player 11 (Dark Green) at (Random point in SpawnWest <gen>) facing 0.00 degrees
Unit - Set life of (Last created unit) to ((Max life of (Last created unit)) x unitHealthFactor)
-------- Third group --------
Wait spawnInterval game-time seconds
Unit - Create 1 Monster1Type[Round] for Player 11 (Dark Green) at (Random point in SpawnWest <gen>) facing 0.00 degrees
Unit - Set life of (Last created unit) to ((Max life of (Last created unit)) x unitHealthFactor)
Unit - Create 1 Monster2Type[Round] for Player 11 (Dark Green) at (Random point in SpawnWest <gen>) facing 0.00 degrees
Unit - Set life of (Last created unit) to ((Max life of (Last created unit)) x unitHealthFactor)
Unit - Create 1 Monster3Type[Round] for Player 11 (Dark Green) at (Random point in SpawnWest <gen>) facing 0.00 degrees
Unit - Set life of (Last created unit) to ((Max life of (Last created unit)) x unitHealthFactor)

(trigger 2)
RWest
Events
Unit - A unit enters SpawnWest <gen>
Conditions
(Owner of (Triggering unit)) Equal to Player 11 (Dark Green)
Actions
AI - Ignore (Triggering unit)'s guard position
Unit - Order (Triggering unit) to Move To (Center of 100 <gen>)
Unit - Set mana of (Triggering unit) to 100.00
Unit - Set the custom value of (Triggering unit) to 100


Thanks for any help
-AZ
12-21-2003, 06:06 PM#2
Kywrath
I have had the same problem when I dabbled in TDs. I think that Units have troubles following orders given through triggers when there are a large number of units on the screen. I don't know why this is. hm...
12-22-2003, 02:31 PM#3
azeckoski
Anyone have any ideas on this at all? I have noticed this behavior in a few of the TD maps out there but it seems to have been resolved in others. Any TD map makers who can offer advice?

Thanks
-AZ
12-23-2003, 02:14 AM#4
Jace Saturn
First off, I'* not a TD maker, just so you know. I just know my way around. 8))
The problem is that when units are unable to go where they want, forcing them to halt, their orders reset to Stop.
(A) Use the "Ignore Guard Position" trigger for all the units right after you spawn them. Spawning all those units is gonna lag anyway. Doing this will eliminate this reseting behavior.
(B) Use a Trigger similar to this :
[Event] - A Unit owned by [Player] is given an order [with no target].
[Condition] - Issued order is [equal] to [stop].
[Action] - Order [ordered unit] to [move to [Region]].
12-23-2003, 04:21 AM#5
azeckoski
I realize that I was not as clear as I should have been.

Thanks for the tip Jace Saturn but I actually have that trigger in my map already (though not with the condition for stop, I just do it anytime they have no orders).

THe problem is that the guys seem to bunch up and pause for maybe a second. Then they move again for a couple of seconds and then pause. They don't do it syncronously. Each one pauses at different times and what appear to be random intervals. I have noticed that some units keep moving pretty well as long as they are up front but others just jitter along (mostly the ones in the back).

I already set all units to have a collision size of 0 so I don't think they are colliding. That's why I assumed that setting the "Ignore Guard Position" would fix this but it does not. Should I post more triggers?

I am up for any suggestions at this point. I have tried everything I could think of.
Thanks
-AZ
12-23-2003, 04:32 AM#6
Newhydra
Also, order them to move right after you create them.
12-23-2003, 08:53 AM#7
Jace Saturn
Sorry if I didn't read your trigger bits. I had assumed you were having the problem addressed in my trigger fix. :////
12-23-2003, 11:47 AM#8
Heaven
From my experience this happens when the total unit count for a team goes over 100. Of course it's relative, not absolute, so your units aren't going to magically start pausing at 101 units. I used to have 150+ units on a team and they would be CRAWLING. I capped it at 100 and it was acceptable. The less units in-game the faster they all react.

Why?

Because each unit is given a time-slice. Only so much time exists in which to handle each unit's pathing and commands. The more units in-game the less time eac unit gets to "think", resulting in each unit going slower and slower. It really does seem to be team oriented, because in an AOS style map I had the team that had <100 units was slaughtering the team with 150+. Because the <100 team was moving fast and the >150 was crawling, hardly attacking at all.

Solution? Keep your total unit count per team down, or use multiple teams (change colors to keep them looking the same). Put conditions in your respawners such that it only respawns if total team count is less than 100. Also, be sure and experiment. It may be more or less on your computer.

Hope this helps!

Take care.
12-23-2003, 12:35 PM#9
AllPainful
Also, for pathing monsters in TDs, set colision to .01 or off, because they could be "stuttering" because they are coliding with eachother. I had this problem in my TD at first.

When I get the chance (and more time) I will copy your tigger into a map and see if I can see whats wrong. As my TD had this problem at first but doesn't anymore. My TD can spawn 96 units a round, and they randomly can walk down approx 20 differ variations in their path. And I don't have the problem you mentioned.

But then agian, my spawn trigger is WAY different then yours....

You have this trigger:

Events
Unit - A unit enters SpawnWest <gen>
Conditions
(Owner of (Triggering unit)) Equal to Player 11 (Dark Green)
Actions
AI - Ignore (Triggering unit)'s guard position
Unit - Order (Triggering unit) to Move To (Center of 100 <gen> )
Unit - Set mana of (Triggering unit) to 100.00
Unit - Set the custom value of (Triggering unit) to 100

In my oppion.. YUCK... it could be your problem....

Try combining your 2 triggers (note: my combine has a unit group variable called SpawnGroup):
Code:
Unit - Create 1 Monster1Type[Round] for Player 11 (Dark Green) at (Random point in SpawnWest <gen> ) facing 0.00 degrees
Unit - Set life of (Last created unit) to ((Max life of (Last created unit)) x unitHealthFactor)
Add unit (last created unit) to group SpawnGroup
Unit - Create 1 Monster2Type[Round] for Player 11 (Dark Green) at (Random point in SpawnWest <gen> ) facing 0.00 degrees
Unit - Set life of (Last created unit) to ((Max life of (Last created unit)) x unitHealthFactor)
Add unit (last created unit) to group SpawnGroup
Unit - Create 1 Monster3Type[Round] for Player 11 (Dark Green) at (Random point in SpawnWest <gen> ) facing 0.00 degrees
Unit - Set life of (Last created unit) to ((Max life of (Last created unit)) x unitHealthFactor)
Add unit (last created unit) to group SpawnGroup
Pick all units in group SpawnGroup
  AI - Ignore (Picked unit)'s guard position
  Unit - Order (Picked unit) to Move To (Center of 100 <gen> )
  Unit - Set mana of (Picked unit) to 100.00
  Unit - Set the custom value of (Picked unit) to 100
Remove all units from group SpawnGroup
-------- Second group --------
Wait spawnInterval game-time seconds
Unit - Create 1 Monster1Type[Round] for Player 11 (Dark Green) at (Random point in SpawnWest <gen> ) facing 0.00 degrees
Unit - Set life of (Last created unit) to ((Max life of (Last created unit)) x unitHealthFactor)
Add unit (last created unit) to group SpawnGroup
Unit - Create 1 Monster2Type[Round] for Player 11 (Dark Green) at (Random point in SpawnWest <gen> ) facing 0.00 degrees
Unit - Set life of (Last created unit) to ((Max life of (Last created unit)) x unitHealthFactor)
Add unit (last created unit) to group SpawnGroup
Unit - Create 1 Monster3Type[Round] for Player 11 (Dark Green) at (Random point in SpawnWest <gen> ) facing 0.00 degrees
Unit - Set life of (Last created unit) to ((Max life of (Last created unit)) x unitHealthFactor)
Add unit (last created unit) to group SpawnGroup
Pick all units in group SpawnGroup
  AI - Ignore (Picked unit)'s guard position
  Unit - Order (Picked unit) to Move To (Center of 100 <gen> )
  Unit - Set mana of (Picked unit) to 100.00
  Unit - Set the custom value of (Picked unit) to 100
Remove all units from group SpawnGroup
-------- Third group --------
Wait spawnInterval game-time seconds
Unit - Create 1 Monster1Type[Round] for Player 11 (Dark Green) at (Random point in SpawnWest <gen> ) facing 0.00 degrees
Unit - Set life of (Last created unit) to ((Max life of (Last created unit)) x unitHealthFactor)
Add unit (last created unit) to group SpawnGroup
Unit - Create 1 Monster2Type[Round] for Player 11 (Dark Green) at (Random point in SpawnWest <gen> ) facing 0.00 degrees
Unit - Set life of (Last created unit) to ((Max life of (Last created unit)) x unitHealthFactor)
Add unit (last created unit) to group SpawnGroup
Unit - Create 1 Monster3Type[Round] for Player 11 (Dark Green) at (Random point in SpawnWest <gen> ) facing 0.00 degrees
Unit - Set life of (Last created unit) to ((Max life of (Last created unit)) x unitHealthFactor)
Add unit (last created unit) to group SpawnGroup
Pick all units in group SpawnGroup
  AI - Ignore (Picked unit)'s guard position
  Unit - Order (Picked unit) to Move To (Center of 100 <gen> )
  Unit - Set mana of (Picked unit) to 100.00
  Unit - Set the custom value of (Picked unit) to 100
Remove all units from group SpawnGroup


If of course could be improved even more, but I am out of time right now.... If you still need assistance when I get more time I will see what I can do.

PS. Something else I noted, NEVER order pathing units to move as a group, that is why I did a "Pick all units in group" instead of just ordering the whole group as one. That is because it can screw up the pathing to order them all at once, because the ones in the back of the group may not enter your next region properly.