|
set udg_Action[bj_forLoopAIndex]=TriggerAddAction(udg_Trig[bj_forLoopAIndex]
问下这哪里出错了。
删掉那一句的话就能进游戏了,但是技能没了
function Trig_CastConditions takes nothing returns boolean
return ((GetSpellAbilityId() == 'A000'))
endfunction
function Trig_CastFunc002002003 takes nothing returns boolean
return (((IsUnitAliveBJ(GetFilterUnit()) == true) and (IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(GetTriggerUnit())) == true)))
endfunction
function Trig_CastFunc003A takes nothing returns nothing
// 找到一个可供使用的空编号,记为【循环整数A】
set bj_forLoopAIndex = 0
loop
exitwhen udg_Trig[bj_forLoopAIndex] == null
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call DisplayTextToPlayer( Player(0), 0, 0, ( "触发编号" + ( I2S(bj_forLoopAIndex) + "开始" ) ) )
// 创建触发
set udg_Trig[bj_forLoopAIndex]=CreateTrigger()
// 注册受伤害事件
call TriggerRegisterUnitEvent( udg_Trig[bj_forLoopAIndex], GetEnumUnit(), EVENT_UNIT_DAMAGED )
// 注册到期事件
call TriggerRegisterTimerEventPeriodic( udg_Trig[bj_forLoopAIndex], 10.00 )
// 添加动作,并用变量记录
set udg_Action[bj_forLoopAIndex]=TriggerAddAction(udg_Trig[bj_forLoopAIndex]
set udg function Trig_Effect_Actions)
// 添加视觉效果,并用变量记录
set udg_Buff[bj_forLoopAIndex] = AddSpecialEffectTarget("Abilities\\Spells\\Other\\HowlOfTerror\\HowlTarget.mdl", GetEnumUnit(), "chest")
endfunction
function Trig_CastActions takes nothing returns nothing
set udg_TempPoint = GetSpellTargetLoc()
set udg_TempUnits = GetUnitsInRangeOfLocMatching(250.00, udg_TempPoint, Condition(function Trig_CastFunc002002003))
call ForGroupBJ( udg_TempUnits, function Trig_CastFunc003A )
call DestroyGroup( udg_TempUnits )
call RemoveLocation( udg_TempPoint )
endfunction
//===========================================================================
function InitTrig_Cast takes nothing returns nothing
set gg_trg_Cast = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ( gg_trg_Cast, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition(gg_trg_Cast, Condition(function Trig_CastConditions))
call TriggerAddAction(gg_trg_Cast, function Trig_CastActions)
endfunction |
|