|
问题1:
[trigger] 事件
条件
((触发单位) 拥有 神圣护甲) 等于 TRUE
动作[/trigger]
[codes=jass]function UnitHasBuffBJ takes unit whichUnit, integer buffcode returns boolean
return (GetUnitAbilityLevel(whichUnit, buffcode) > 0)
endfunction[/codes]
奇怪的是为什么返回GetUnitAbilityLevel(技能)?
问题2:
[codes=jass]function AA takes nothing returns boolean
endfunction
function BB takes nothing returns boolean
endfunction
function A takes nothing returns nothing
endfunction
function Btakes nothing returns nothing
endfunction
//===========================================================================
function InitTrig_AB takes nothing returns nothing
local trigger tri0 = CreateTrigger()
local trigger tri1 = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(tri0,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(tri0,Condition(function AA))
call TriggerAddAction(tri0,function A)
call TriggerRegisterAnyUnitEventBJ(tri1,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(tri1,Condition(function BB))
call TriggerAddAction(tri1,function B)
set tri0 = null
set tri1 = null
endfunction[/codes]这样写函数AB的顺序有关系呢?? |
|