Tower Defense enemy unstuck and attack on block system?

OVRKLL

New Member
Reaction score
3
Hey all,

Does anybody know a good way to make TD enemy unit unstock and attack on block systems? At the moment I'm ordering all enemy units to move to the destination point on spawn which works except there is a delay between unit creation and order giving. Unfortunately there is one major flaw: When multiple units exist at the same time they tend to stack resulting in major movement bugs where large groups of units simply stand still and move only small distances one at a time.

Thanks for your time!
 
T

Tubba

Guest
Hm... I know a lot of TD:s have these problem (Skibi and Wintermaul comes to mind) but I never noticed it in my... I have a simple "Spawn at center of region" and "Order unit to move to center of region" system...
 

OVRKLL

New Member
Reaction score
3
Hm... I know a lot of TD:s have these problem (Skibi and Wintermaul comes to mind) but I never noticed it in my... I have a simple "Spawn at center of region" and "Order unit to move to center of region" system...

Well, that doesn't work for me... :/
 

OVRKLL

New Member
Reaction score
3
Maybe you should explain how your map works?

Very simple. Anemies are spawned one by one and ordered to move to a location. When they come close enough to that point after navigating through player built tower mazes, a point is lost.
 

ManyTimes

I'm so lonesome I could cry...
Reaction score
293
>>attack on block systems

(I seriously hope I understood you there, if not, jesus)
Alll creeps with 0 attack damage, meaning, they will always move whatsoever... two exceptions:

first (optionally): if you got waves that is supposed to attack towers, those creeps can ofc have damage.
seconldy (optionally this one too:p): a "dummy" unit, invulnerable, with scaling size 0.00 or something similar, he got attack damage 100000, instant killing towers. Well, more or less like in "Line Tower Defense" just with a unit that is hidden, so you dont see the ugly f#%¤#¤ running :)

Which also might look as you have triggered it so whenever a player blocks, it takes about 2-5 seconds and he loses a building (due to the fast movement speed of this "dummy attacker", and the fact that there are 2 dummy attackers per player or so, optional of course).

Thats what I would have done!:eek:

>>Does anybody know a good way to make TD enemy unit unstock
Making them not have a "crappy movement", reduce the amount of units, by 5-10% would be enough (or of course, it depends on the amount you got now)... Other things like; do not spawn all units at the same time, ever played "Element TD"? or "Ryoko TD"? Something like that, 1 and 1 unit at a time (or 5 and 5), not 100 and 100. Last, but also least, to reduce lag, advanced > gameplay constants > "decay bones - 88", reduce it to 10 +-.

Edit;
>>are spawned one by one
As in? One then wait 0.01 second create another 1? For 20 seconds?....
 

OVRKLL

New Member
Reaction score
3
>>>>are spawned one by one
As in? One then wait 0.01 second create another 1? For 20 seconds?....

Each unit is spawned with a .5 seconds interval until up to 120 (or something like that) units have been spawned... That makes 60 seconds for a wave.
 

OVRKLL

New Member
Reaction score
3
Protip: Use timers. Waits tend to mess stuff up.

Ooo...kay. Even when I'm using them only in a single single-treated single-purposed single-used trigger?
I know, most of the above aren't even words.
 

vypur85

Hibernate
Reaction score
803
I think ManyTimes idea should work? Spawn creeps at a slower rate (higher interval). At least there is enough interval time for the first spawned unit to move out of the first region before the second unit is spawned. Why Timers? Isn't the spawning trigger using Periodic Event? Not sure. Never done TD before :p.

Using waits in single-used trigger should be fine I guess (single meaning non-MUI/MPI?)
 

OVRKLL

New Member
Reaction score
3
I think ManyTimes idea should work? Spawn creeps at a slower rate (higher interval). At least there is enough interval time for the first spawned unit to move out of the first region before the second unit is spawned. Why Timers? Isn't the spawning trigger using Periodic Event? Not sure. Never done TD before :p.

Using waits in single-used trigger should be fine I guess (single meaning non-MUI/MPI?)

First... WTF are MUI and MPI? Sorry, never heard it before.
Second, the enemies are spawned at random positions so that they never stack from the beginning.
Third, the problem occurs on the way because multiple units hit each other creating a huge mob. Blizzard's built-in AI appearently can't fully handle such events so the units bug and move one at a time. Annoying.
So the thing is I need to know how to avoid this "mob creation".
 

vypur85

Hibernate
Reaction score
803
>So the thing is I need to know how to avoid this "mob creation".
I believe this is quite unavoidable if the unit is too many. Most TD's have this problem as well. As mentioned, maybe ManyTimes method or tips would be the best to avoid this problem. :) If I'm not mistaken, there was someone who posted a JASS trigger tutorial to handle this problem before. Can't remember. Maybe someone else could kindly post it. I'll try to find also.


MUI = Multi Unit Instance-something
MPI = Multi Player Instance-something

MUI meaning the trigger cannot get overwritten when there are multiple units call the trigger into effect (something like that, not sure how to explain).

MPI meaning the trigger cannot get overwritten when there are multiple players call the trigger into effect (something like that, not sure how to explain).

So, when you mentioned this (along with the 'waits'):
Ooo...kay. Even when I'm using them only in a single single-treated single-purposed single-used trigger?
I thought you were implying MUI/MPI.
 

OVRKLL

New Member
Reaction score
3
>So the thing is I need to know how to avoid this "mob creation".
I believe this is quite unavoidable if the unit is too many. Most TD's have this problem as well. As mentioned, maybe ManyTimes method or tips would be the best to avoid this problem. :) If I'm not mistaken, there was someone who posted a JASS trigger tutorial to handle this problem before. Can't remember. Maybe someone else could kindly post it. I'll try to find also.


MUI = Multi Unit Instance-something
MPI = Multi Player Instance-something

MUI meaning the trigger cannot get overwritten when there are multiple units call the trigger into effect (something like that, not sure how to explain).

MPI meaning the trigger cannot get overwritten when there are multiple players call the trigger into effect (something like that, not sure how to explain).

So, when you mentioned this (along with the 'waits'):

I thought you were implying MUI/MPI.

Perhaps I should post the trigger. Will do when this lesson is over... I'm at school atm.



--- EDIT ---

Spawn wave
Events
Time - TIMER_NextWave expires
Conditions
Actions
Set INTEGER_CurrentWave = (INTEGER_CurrentWave + 1)
Game - Display to (All players) for 10.00 seconds the text: (Wave + ((String((INTEGER_CurrentWave + 1))) + has begun.))
For each (Integer A) from 1 to (Integer((10.00 x (Power((Real((Number of players in PLAYERGROUP_Players))), 1.25))))), do (Actions)
Loop - Actions
Set POINTARRAY_TEMP[0] = (Random point in Enemy start 1 <gen>)
Set POINTARRAY_TEMP[1] = (Random point in Enemy start 2 <gen>)
Set POINTARRAY_TEMP[2] = (Random point in Enemy start 3 <gen>)
Set POINTARRAY_TEMP[3] = (Random point in Enemy start 4 <gen>)
Set POINTARRAY_TEMP[4] = (Random point in Enemy start 5 <gen>)
Set POINTARRAY_TEMP[5] = (Random point in Enemy start 6 <gen>)
Set POINTARRAY_TEMP[6] = (Random point in Enemy start 7 <gen>)
Set POINTARRAY_TEMP[7] = (Random point in Enemy start 8 <gen>)
Set POINTARRAY_TEMP[8] = (Random point in Enemy start 9 <gen>)
For each (Integer B) from 0 to 8, do (Actions)
Loop - Actions
Special Effect - Create a special effect at POINTARRAY_TEMP[(Integer B)] using Abilities\Spells\Human\MassTeleport\MassTeleportTarget.mdl
Wait 0.25 seconds
Unit - Create 1 UNITTYPEARRAY_Wave[INTEGER_CurrentWave] for Player 12 (Brown) at POINTARRAY_TEMP[6] facing 0.00 degrees
For each (Integer B) from 0 to 5, do (Actions)
Loop - Actions
Unit - Create 1 UNITTYPEARRAY_Wave[INTEGER_CurrentWave] for Player 12 (Brown) at POINTARRAY_TEMP[(Integer B)] facing 90.00 degrees
Unit - Create 1 UNITTYPEARRAY_Wave[INTEGER_CurrentWave] for Player 12 (Brown) at POINTARRAY_TEMP[7] facing 180.00 degrees
Unit - Create 1 UNITTYPEARRAY_Wave[INTEGER_CurrentWave] for Player 12 (Brown) at POINTARRAY_TEMP[8] facing 270.00 degrees
Wait 0.25 seconds


Enemy unit created
Events
Unit - A unit enters (Entire map)
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Entering unit) is A flying unit) Equal to True
Then - Actions
Else - Actions
Unit - Order (Entering unit) to Move To (Position of Arcane Vault 0013 <gen>)



There ya go!
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top