|
楼主 |
发表于 2008-11-30 18:35:45
|
显示全部楼层
[codes=jass]function Trig_Arsw_Func002C takes nothing returns boolean
local unit u = GetFilterUnit()
local unit ua = I2U(GetStoredInteger(GameCache(),I2S(H2I(GetExpiredTimer())),"TriggerUnit"))
local group g = I2DW(GetStoredInteger(GameCache(),I2S(H2I(GetExpiredTimer())),"Group"))
if IsUnitEnemy(u,GetOwningPlayer(ua)) or (GetUnitAbilityLevel(u,'BOvd') > 0) or (not(IsUnitType(u,UNIT_TYPE_STRUCTURE) == false)) or (not(IsUnitType(u,UNIT_TYPE_GIANT) == false)) then
return false
endif
return true
set u = null
set ua = null
set g = null
endfunction[/codes]在上面加了1句IsUnitInGroup(u,g) or后WE就自动关闭啦. |
|