|
发表于 2007-3-9 21:47:08
|
显示全部楼层
汗,这函数需要这么麻烦吗。。。- function GroupPickLowestLifeUnitEnum takes nothing returns nothing
- if GetUnitState(GetEnumUnit(), UNIT_STATE_LIFE) < GetUnitState(bj_groupRandomCurrentPick, UNIT_STATE_LIFE) then
- set bj_groupRandomCurrentPick = GetEnumUnit()
- endif
- endfunction
- function GroupPickLowestLifeUnit takes group whichGroup returns unit
- set bj_groupRandomCurrentPick = FirstOfGroup(whichGroup)
- call ForGroup(whichGroup, function GroupPickLowestLifeUnitEnum)
- if bj_wantDestroyGroup then
- call DestroyGroup(whichGroup)
- endif
- set bj_wantDestroyGroup = false
- return bj_groupRandomCurrentPick
- endfunction
复制代码 |
|