|
楼主 |
发表于 2008-11-26 18:10:40
|
显示全部楼层
可我记得biackese 先生说过:(以下片段)
是选取单位组最简化写法(Red_wolf)
单位组动作的简化也是推荐写法:
globals
group udg_TempGroup=CreateGroup()
//全局公用临时变量
endglobals
function GroupFunc takes nothing returns nothing
if xxx then
do anything
endif
endfunction
call GroupEnumUnitsInRange( udg_TempGroup, 0., 0, 1000, Condition(function GroupFunc))
udg_TempGroup其实只素个摆设而已,GroupFunc是return nothing的,也即永远返回false,不会有任何单位被加到udg_TempGroup,该代码的作用就是选取满足条件的单位作xx动作,相比较ForGroup要精简也要高效的多
=============
不知是否了.... |
|