Issue:
I am developing a heavily scripted random map. There are a lot of units controlled from triggers using trUnitMoveToPoint function. It works (mostly) fine when playing with AI but becomes terribly buggy with other players.
The exact issue seems to be that when a move command is issued from a trigger, it is sometimes issued to some other units instead (or together with the intended ones, I’m not sure).
This might actually be a bug in the trigger selection system.
Another (less critical) issue is that there seems to be some sort of a limit on how many commands can a trigger issue: when I spawn a lot of units, at some point some of them just stop moving.
Trigger Event:
Making many calls to trUnitMoveToPoint for different unit groups and different positions.
Repro Steps:
- Download the map and add to random_maps folder (map link)
- Host a 1v1 multiplayer game on ‘Mythical Chaos (testing)’ map, you may want to set speed to ‘Fast’
- Don’t do anything and just wait for a minute — the units are scripted to spawn and run clockwise from corner to corner, but soon they start running in random directions instead.
This isn’t exactly a minimal example but I commented out most of the stuff that produces any other effects. The only triggers that should be relevant to the issue are ‘_Create_Armies’, ‘_Control_Military’ and ‘_Init_Schedulers’.
An interesting detail is that this only happens when units are selected in groups of 3 or more. If you change ‘cMaxArmySize’ value to 1 or 2, it no longer happens (but instead you’ll see another issue with some units not moving at all a bit later).