• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] something causing unit response time to slow

Status
Not open for further replies.
Level 3
Joined
Jun 23, 2007
Messages
32
i'm working on a map where there are alot of auto-spawned units that you can control.

so for convenience, ive made a unit that has an ability that when used, all these units will attack-move to his position every 4 seconds. when you turn it off, they stop.

the problem is sometimes any unit you give an order to starts doing something funny. for example, tell them to move to a point, and they will rotate in that direction, then proceed to walk. sometimes theres a long pause before they start walking. normally, units do not rotate, stop , then move when u give them a command.

this probem happens when theres lots of units on the screen? i'm notsure.

anyone know what im talking about?
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
Two reasons I can think of:
A lot of units, not only on screen but on the map(projectiles and doodads count in this one)
Leaks
 
Level 3
Joined
Jun 23, 2007
Messages
32
it's not projectiles because this movement lag can happen when im just making them move in circles, not shooting.

and there are no doodads.

as for leaks, i dont think so. even if my map had leaks, i'm not activating any triggers but jsut runnign around.

i also forgot to mention taht this "movement lag" will stop . i think it stops when i manually tell all the units to stop. for example i have 50 hydralisks trying to attack move to one spot, so they form a big circle around it. there will be 20 runing around tryuing to squeeze in. im telling these units to stop.

im not sure about this but i hope this is a clue.
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
You gave little information.
I simply shared all the reasons I could think of.
So does that mean you have only 40-41 units?
If so I guess the problem is 'leaks'.
Some of your triggers is causing this 'lag'.
Post the trigger(simply open WE go to the trigger in the right part right click the top line and click copy as text) or if there are multiple trigger involving the ability, the units, the movement(only thing connected with this, I do not want something irrelevant).
 
Level 3
Joined
Jun 23, 2007
Messages
32
yes that's what i was looking for.."pathing delay"

it seems like this because its not the game that is lagging, just units being slow

but anywhere here's the triggers.

  • mass attack on
    • Events
      • Time - Every 4.00 seconds of game time
    • Conditions
    • Actions
      • Player Group - Pick every player in playergroup and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • massattackon[(Player number of (Picked player))] Equal to True
            • Then - Actions
              • Set point = (Position of massattacker[(Player number of (Picked player))])
              • Unit Group - Pick every unit in massattackgolems[(Player number of (Picked player))] and do (Actions)
                • Loop - Actions
                  • Unit - Order (Picked unit) to Attack-Move To point
              • Custom script: call RemoveLocation(udg_point)
            • Else - Actions
when the mass attack spell is used, it switches "massattackon" boolean array to true

"massattacker[]" is the unit casting the spell, where other units attack-move to

"massattackgolems" is the unit group array containing the units. units are added to this group when they spawn.

so is there a way around this pathing overload??
 
Level 3
Joined
Jun 23, 2007
Messages
32
through more testing i determined taht the cause of the pathing delay was too many units going to the same spot at once. this seems to cause all units on the map to take a pause before moving after being issued a command.

so my temporary fix is that instead of the mass attack skill ordering units to attack to taht point, i create a region around that point, and they attack a random point within the region. the larger the region ,the less bumping into each other and the less chance of pathing delay.

as of now, im not sure if pathing delay is shared with all units on the map or just for the owner of the units causing the pathing delay.
 
Status
Not open for further replies.
Top