| 06-08-2003, 03:08 AM | #1 |
when do i need to call it? I'm getting some wierd behavior when using stuff like: Code:
local unit whichUnit = GroupPickRandomUnit(GetUnitsSelectedAll(playerTake)) |
| 06-08-2003, 08:55 AM | #2 |
I think SyncSelections needs to be called before every reading of selections in Multiplayer games to avoid Desync. GetUnitsSelectedAll does call SyncSelections by itself so you do not need to call it manually. It seems that there needs to be a certain time passed in multiplayer before a selection done by a player or per trigger actually influences what you get from GetUnitsSelectedAll and similar functions. That might be source of your weirdness. |
| 06-08-2003, 11:14 PM | #3 |
so if i add a 'wait' 2 sec or so at the start of the trigger it should be ok? then set whichUnit = blah blah () |
| 06-09-2003, 08:57 AM | #4 |
Yes, exactly, if you have need the selection as it is at the beginning of the trigger then 1 second wait should be enough (although I am not sure if that depends on the lag, but I checked in LAN and b.net and could find no noticable difference). |
