|
请问call PolledWait()后面是否只能使用整数?
我在使用如下语句时,测试无效
[codes=jass]
loop
exitwhen IntNum > 150
set IntNum = IntNum+ 1
call SetUnitFacingToFaceUnitTimed( GetTriggerUnit(), yourunit, 0 )
call PolledWait(0.02)
endloop[/codes]
但是改成[codes=jass]
loop
exitwhen IntNum > 3
set IntNum = IntNum+ 1
call SetUnitFacingToFaceUnitTimed( GetTriggerUnit(), yourunit, 0 )
call PolledWait(1)
endloop[/codes]就能使用了,何故?
另外,在下面的语句中我试图做一个冲锋动作(创建的傀儡单位以沙土效果为模型),但在实际测试时,有沙土短暂移动的效果,英雄却始终停留在原地,哪位前辈能帮我找出错误所在
[codes=jass]
local unit yourunit
local unit itsunit
local location PTbegin
set yourunit= GetSpellTargetUnit()
set PTbegin= PolarProjectionBJ(GetUnitLoc(GetTriggerUnit()), 40.00, GetUnitFacing(GetTriggerUnit()))
set itsunit = CreateUnitAtLoc( GetTriggerPlayer(), 'e000', PTbegin, AngleBetweenPoints( PTbegin, GetUnitLoc( yourunit )))
set PTbegin = PolarProjectionBJ(PTbegin, 40.00, GetUnitFacing( itsunit ))
call SetUnitPositionLoc( GetTriggerUnit(), PTbegin )
call UnitApplyTimedLifeBJ( 2.00, 'BTLF', itsunit )
call SetUnitFacingToFaceUnitTimed( GetTriggerUnit(), yourunit, 0 )
set PTbegin= PolarProjectionBJ(GetUnitLoc(GetTriggerUnit()), 40.00, GetUnitFacing(GetTriggerUnit()))
call RemoveLocation( GetUnitLoc(GetTriggerUnit()) )[/codes] |
|