|
在下jass初学,正在试着做几个技能耍耍,不料突然timer这东西没反应了。。。纠结了一晚上
globals
integer n_FL=0
real n2_FL=0
real n3_FL=0
timer time1=CreateTimer()
endglobals
function FL_Action3 takes nothing returns nothing (没法执行)
local unit s=GetTriggerUnit()
if n_FL <= n2_FL/50 then
call SetUnitX(s, GetUnitX(s)+ 50*Sin(n3_FL))
call SetUnitY(s, GetUnitY(s)+ 50*Cos(n3_FL))
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\IllidanBlueMissile.mdx",s,"weapon"))
set n_FL= n_FL+1
set s=null
else
set n_FL=0
call PauseTimer(time1)
call SetUnitAnimation(s,"Stand Ready (1.000 s)")
call PauseUnit(s,false)
call SetUnitPathing(s,false)
set s=null
endif
endfunction
function FL_Action takes nothing returns nothing
local unit s=GetTriggerUnit()
local location p=GetUnitLoc(s)
local location p2=GetSpellTargetLoc()
call SetUnitPathing(s,false)
call CreateNUnitsAtLoc( 1,'hbew', GetOwningPlayer(s),p, bj_UNIT_FACING )
call SetUnitFacingToFaceLocTimed(GetLastCreatedUnit(),p,0)
call UnitApplyTimedLife(GetLastCreatedUnit(),'BHwe',2)
call ShowUnit( GetLastCreatedUnit(), false )
call SetUnitPathing(GetLastCreatedUnit(),false)
call IssueNeutralTargetOrderById( GetOwningPlayer(s), GetLastCreatedUnit(), 852274,s )
call ShowUnit(s,false)
set n2_FL=DistanceBetweenPoints(p,p2)
set n3_FL=AngleBetweenPoints(p,p2)
call TriggerSleepAction(3)
call TimerStart(time1,0.05,true,function FL_Action3) (我已经打了没错啊)
call ShowUnit(s,true)
call PauseUnit(s,true)
call SetUnitAnimationWithRarity( s, "attack", RARITY_RARE )
call RemoveLocation(p)
call RemoveLocation(p2)
set p=null
set p2=null
set s=null
endfunction
function FL_Condition takes nothing returns boolean
return GetSpellAbilityId()=='A00E'
endfunction
function InitTrig_FL_______u takes nothing returns nothing
local trigger t= CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function FL_Condition))
call TriggerAddAction(t,function FL_Action)
set t= null
endfunction
如上,语法检查没有问题,技能已经是次要的了,关键是我想让timerstart给我动起来啊啊啊。。。
请教各位大大 小弟哪里犯错了呢 还是系统问题 我用的YDWE1.21修正版
再次求教 |
|