这段J问题出在哪?
本帖最后由 fssssss 于 2014-8-11 15:43 编辑function Trig_ZhuaS_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A006' ) ) then
return false
endif
return true
endfunction
function Zhua takes nothing returns nothing
local location up = GetUnitLoc(udg_ZhuaU)
call PauseUnitBJ( true, udg_ZhuaU )
call ReviveHeroLoc( udg_ZhuaU, up, false )
call RemoveLocation( up )
call SetUnitLifePercentBJ( udg_ZhuaU, 1.00 )
call SetUnitOwner( udg_ZhuaU, Player(0), true )
call SetUnitAnimation( udg_ZhuaU, "death" )
set up = null
endfunction
function ZhuaSFaDong takes code f , unit su returns trigger
local trigger t = CreateTrigger()
call TriggerAddAction( t, f )
call TriggerRegisterUnitEvent( t, su, EVENT_UNIT_DEATH )
return t
endfunction
function Trig_ZhuaS_Actions takes nothingreturns nothing
local trigger t = ZhuaSFaDong(function Zhua,udg_ZhuaU)
set udg_ZhuaU = GetSpellTargetUnit()
call PolledWait(4)
call DestroyTrigger(t)
set t = null
endfunction
//=================================================================
function InitTrig_ZhuaS takes nothing returns nothing
set gg_trg_ZhuaS = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ( gg_trg_ZhuaS, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_ZhuaS, Condition( function Trig_ZhuaS_Conditions ) )
call TriggerAddAction( gg_trg_ZhuaS, function Trig_ZhuaS_Actions )
endfunction 我想做一个施放目标身上,然后在持续时间内打死目标那么他就变成我的人了,但是完全没有效果。请问问题出在哪里。
创建触发的时候还没有udg_ZhuaU这玩意 udg_ZhuaU 名称.其他看不懂
页:
[1]