Enemies Getting Stuck

Vonpuppin

New Member
Reaction score
0
Hello everyone, I'm new here. I've been getting back into Warcraft III (and still play SC2). I enjoy using the World Editor, but I'm not amazing. At all. I do have enough knowledge, however, to create a Tower Defense/Survival game. Now, I have a problem. The units that spawn use a code I made that spawns them in the middle of a region at the start of the lanes. The code also tells units who enter this region to attack move to the center of the player base. This works, but after enemies start spawning in groups larger than 10, more than half of the group just stop in the region, or even halfway along the path. Even Bosses get stuck.


triggera.jpg


Any ideas on what's wrong?
Just got back to WC3 so I'm going to be a bit slow at this, sorry..
 

bajaist

Member
Reaction score
4
That is leaking, and for TD it is bad, use Action:
Trigger:
  • ActionsUntitled Trigger 001
    • Actions
    • Set Temp_Point[1] = Center of region 004 <ge>
    • Unit - Order (Entering unit) to Attack-Move To (Center of Temp_Point[1])
    • Custom script: call RemoveLocation (udg_Temp_Point[1])


And maybe your path is to small for all of them. You could try sending units 1 by 1.
 

Evil Seal

Member
Reaction score
2
When you create the units mabey you could order them as a unit group to move to "Temp_Point". Do as bajaist said, otherwise your trigger will leak and your game will run slow.

Trigger:
  • Spawn
    • Events
    • Time - Every 30.00 seconds of game time
    • Conditions
    • Actions
    • -------- You have to set the point as an variable or it will leak. --------
    • Set Temp_Point = (Center of Spawn <gen>)
    • Unit - Create 10 Footman for Player 10 (Light Blue) at Temp_Point facing Default building facing degrees
    • -------- Now we destroy the Temp_Point so that it won't leak. --------
    • Custom script: call RemoveLocation (udg_Temp_Point)
    • -------- Sets the point as an variable again <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" /> --------
    • Set Temp_Point = (Center of Point 1 &lt;gen&gt;)
    • -------- Im ordering the units as an group so that im sure that no unit will stay. --------
    • Unit Group - Order (Last created unit group) to Attack-Move To Temp_Point
    • -------- And destroys the Temp_Point so that it won&#039;t leak. --------
    • Custom script: call RemoveLocation (udg_Temp_Point)


Trigger:
  • Move
    • Events
    • Unit - A unit enters Point 1 &lt;gen&gt;
    • Conditions
    • (Owner of (Triggering unit)) Equal to Player 10 (Light Blue)
    • Actions
    • Set Temp_Point = (Center of Point 2 &lt;gen&gt;)
    • -------- Im only ordering one unit now. --------
    • Unit - Order (Triggering unit) to Attack-Move To Temp_Point
    • Custom script: call RemoveLocation (udg_Temp_Point)


Try this ;)
 

Vonpuppin

New Member
Reaction score
0
So, I tried these, and the situation just got worse. Enemies would start piling up even further. I just let it run for awhile and after so many ghouls spawned, the graphics completely glitched out and large black, brown, and yellow lines were spurting and spazzing out across the map. I'm going to redesign the map with thicker lanes.
 

jig7c

Stop reading me...-statement
Reaction score
123
thicker lane, less units(make them more powerful instead), and make them walk through each other... like those boots in dota... not sure whats it called
 

Tharius

Occasionally Around
Reaction score
39
It sounds like the problem isn't actually the lane width. If you're creating a group of units all at once, at a single point, and immediately ordering each of them to move somewhere else, the units spawned in the center of the group (assuming all the units have collision) won't have any available path because they're completely blocked in by other units. The best thing for you would probably be to spread out the spawn points enough for each unit to find an initial path in between every other spawned unit in that wave. Alternatively, you could stagger the spawns by a couple seconds, and only create 6 or so units at a time.
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
612
Usually units will get stuck if you order a large group of them to move at once. I believe any number larger than 12 is liable to this problem.
 

Imp Midna

Active Member
Reaction score
52
Summing up:

Usually units will get stuck if you order a large group of them to move at once. I believe any number larger than 12 is liable to this problem.
True. You might want to pick every unit in the group and give it the order, which will improve the situation, but not solve it.
If you're creating a group of units all at once, at a single point, and immediately ordering each of them to move somewhere else, the units spawned in the center of the group (assuming all the units have collision) won't have any available path because they're completely blocked in by other units. [...] Alternatively, you could stagger the spawns by a couple seconds, and only create 6 or so units at a time.
Also True.
Give all your creeps the unit ability Ghost (Visible), or try lowering the amount of creeps.
Quoting ftw. Ghost will make the units capable of walking INTO each other reducing the block-problem and is commonly used for TD's. May be a stupid solution if this is a survival game though.
make an unstuck trigger
Thats the most useless quote if made so far and the system he described was for TDs only anyways, but i started the other 3 thingys with a quote, so...
anyways, if you tell a unit to move somewhere it doesnt neccessarily mean that it reaches this point. Many weird things can happen. Making some kind of system (maybe every x seconds, when its attacked, when someone writes -unstuck, when new creeps spawn (which would again be periodic (hurray bracket stack (ok, im gonna stop))) etc)
The graphics completely glitched out and large black, brown, and yellow lines were spurting and spazzing out across the map.
Hurray for more quote. That, btw, is warcraft specific, common, and happens when too many (i dont have a clue, maybe 100 or 300) units are drawn at the same time. You can NOT prevent this, it's HELL DAMN of annoying and i want to write ONE MORE THING in caps. So, think about putting your units in a unitgroup and limiting the spawn.
 

Vonpuppin

New Member
Reaction score
0
I fixed it by creating a trigger that told every unit owned by the undead player to attack move to a temp_point I made in the center of the players base - this happens every 10 seconds.
I was so fed up at that point that I named it "move you pieces a' shit" and to my great pleasure, it works extremely well. I did have to take collision off crypt fiends because they blocked melee units, but other than that, thanks a lot everyone consider the problem SOLVED.
 
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