|
发表于 2006-12-25 17:37:04
|
显示全部楼层
会的,对指定玩家选取单位组:
function SelectGroupBJEnum takes nothing returns nothing
call SelectUnit( GetEnumUnit(), true )
endfunction
function SelectGroupForPlayerBJ takes group g, player whichPlayer returns nothing
if (GetLocalPlayer() == whichPlayer) then
// Use only local code (no net traffic) within this block to avoid desyncs.
call ClearSelection()
call ForGroup( g, function SelectGroupBJEnum )
endif
endfunction
以前的修正方案是
function SelectGroupBJEnum takes nothing returns nothing
if (GetLocalPlayer() == whichPlayer) then
call SelectUnit( GetEnumUnit(), true )
endif
endfunction
function SelectGroupForPlayerBJ takes group g, player whichPlayer returns nothing
if (GetLocalPlayer() == whichPlayer) then
call ClearSelection()
endif
call ForGroup( g, function SelectGroupBJEnum )
endfunction
至于加call SyncSelections()的作用就不知道了。 |
|