[General] When I operate 100 units to move, there will be a feeling of delay in operation.

Level 1
Joined
Jan 3, 2024
Messages
3
I mean when you got a mass of units they start to have quite a delay in their movement. Is there ways to prevent this?
 
Level 19
Joined
Mar 16, 2008
Messages
798
it's possible all these units are controlled by a single player causing a bug that makes it difficult for the units to carry out commands. if a player has more than 50-100 units then it causes this bug.

also what is the exact trigger function you are using to issue the commands?

you may want to make several CPUs to control all the units, add them to an index, then each time you spawn one, count through the index. here's an example trigger but it might be a bit confusing at first glance (credit Uncle):
  • Set VariableSet legion_array[1] = Player 7 (Green)
  • Set VariableSet legion_array[2] = ...
  • ...
  • ...
  • ...
  • For each (Integer A) from 1 to 2, do (Actions) <-- edit for how many units you want to spawn of this type, this one will spawn 2 units
    • Loop - Actions
      • Set VariableSet legion_index = (legion_index + 1)
      • If (legion_index Greater than 9) then do (Set VariableSet legion_index = 1) else do (Do nothing)
      • Unit - Create 1 random_unit_type[(Random integer number between 1 and 3)] for legion_array[legion_index] at spawn_pt facing 90.00 degrees
      • Unit Group - Add (Last created unit) to demon_grp
      • Set VariableSet sfx_pt = (Position of (Last created unit))
      • Special Effect - Create a special effect at sfx_pt using Abilities\Spells\Human\MassTeleport\MassTeleportTarget.mdl
      • Special Effect - Destroy (Last created special effect)
      • Custom script: call RemoveLocation(udg_sfx_pt)
  • ...
  • Unit Group - Pick every unit in demon_grp and do (Actions)
    • Loop - Actions
      • Unit - Order (Picked unit) to Attack-Move To ran_tar_pt_two
  • ...
 
Last edited:
Level 1
Joined
Jan 3, 2024
Messages
3
it's possible all these units are controlled by a single player causing a bug that makes it difficult for the units to carry out commands. if a player has more than 50-100 units then it causes this bug.

also what is the exact trigger function you are using to issue the commands?
I just put 200 units together to fight, 2 players with 100 units each, there was a noticeable delay when I controlled some of the units
 
Level 11
Joined
May 19, 2022
Messages
192
yes i had it normally it be around 150 units to be exact try to keep the unit count around 60-100 to avoid this problem as it becomes over a 100 the higher the risk of having this issue and its really annoying to deal with
 
Level 11
Joined
May 19, 2022
Messages
192
As I said, removing/reducing unit collision will make them move with less lags - it does come with its own downside of,
well, reduced/removed unit collision, but it works.

Units belonging to multiple players rather than one can also help but in your example that may not be ideal solution.
its just a temporary fix idk how effective it is and would still have units freezing for a second when u give them orders heck they would freeze during a march
 
Last edited by a moderator:
Top