|
发表于 2008-7-6 16:58:56
|
显示全部楼层
[codes=jass]function TriggerRegisterDestDeathInRegionEvent takes trigger trig, rect r returns event
set bj_destInRegionDiesTrig = trig
set bj_destInRegionDiesCount = 0
call EnumDestructablesInRect(r, null, function RegisterDestDeathInRegionEnum)
return trig
endfunction[/codes]
[codes=jass]function RegisterDestDeathInRegionEnum takes nothing returns nothing
set bj_destInRegionDiesCount = bj_destInRegionDiesCount + 1
if (bj_destInRegionDiesCount <= bj_MAX_DEST_IN_REGION_EVENTS) then
call TriggerRegisterDeathEvent(bj_destInRegionDiesTrig, GetEnumDestructable())
endif
endfunction[/codes]
或许把bj_MAX_DEST_IN_REGION_EVENTS搞大就好了
其实也就是选取所有可破坏物注册事件呀 |
|