|
function light_working takes nothing returns nothing
local timer t = GetExpiredTimer()
local unit ua = GetHandleUnit(t,"Light_ua")
local integer lv = GetHandleInt(t,"Light_lv")
local real CenterLocX = GetHandleReal(t,"CenterLocX")
local real CenterLocY = GetHandleReal(t,"CenterLocY")
local integer i = 1
local real k1 = GetHandleReal(t,"k1")
local real k2 = GetHandleReal(t,"k2")
local unit array U_loop1
local unit array U_loop2
local real array U_loop1_LocX
local real array U_loop1_LocY
local real array U_loop2_LocX
local real array U_loop2_LocY
local real array U_loop1_tempLocX
local real array U_loop1_tempLocY
local real array U_loop2_tempLocX
local real array U_loop2_tempLocY
local group g = CreateGroup()
local boolexpr bol = Condition(function filterunits6)
if ( GetUnitAbilityLevel(ua, 'A01F') != 0 ) then
set k1 = k1 + 1
call SetHandleReal(t,"k1",k1)
set k2 = k2 - 1
call SetHandleReal(t,"k2",k2)
loop
exitwhen i >24
set U_loop1= GetHandleUnit(t,("U_loop1"+ I2S(i)) )
set U_loop2= GetHandleUnit(t,("U_loop2"+ I2S(i)) )
set U_loop1_LocX = GetUnitX(U_loop1)
set U_loop1_LocY = GetUnitY(U_loop1)
set U_loop1_tempLocX = CenterLocX + Cos(k1)*( 42.00 * i )
set U_loop1_tempLocY = CenterLocY + Sin(k1)*( 42.00 * i )
call SetUnitPosition(U_loop1,U_loop1_tempLocX,U_loop1_tempLocY)
set U_loop2_LocX = GetUnitX(U_loop2)
set U_loop2_LocY = GetUnitY(U_loop2)
set U_loop2_tempLocX = CenterLocX + Cos(k2)*( 42.00 * i )
set U_loop2_tempLocY = CenterLocY + Sin(k2)*( 42.00 * i )
call SetUnitPosition(U_loop2,U_loop2_tempLocX,U_loop2_tempLocY)
set i = i + 1
endloop
call GroupEnumUnitsInRange(g, GetUnitX(ua), GetUnitY(ua) , 1200, bol )
set udg_Num_Int = lv
call ForGroupBJ( g, function EmyAway )
else
call Light_over(ua)
call PauseTimer( t )
call DestroyTimer( t )
endif
call DestroyBoolExpr(bol)
call GroupClear( g )
call DestroyGroup(g)
set g = null
set bol = null
call DisplayTextToPlayer( Player(0), 0, 0, "k1="+R2S(k1) )
call DisplayTextToPlayer( Player(0), 0, 0, "k2="+R2S(k2) )
endfunction
function Trig_Light_start_Actions takes nothing returns nothing
local timer t = CreateTimer()
local timer t2 = CreateTimer()
local integer i= 1
local unit ua = GetTriggerUnit()
local real r_ua = GetUnitFacing(ua)
local integer lv = GetUnitAbilityLevel(ua, 'A006')
local location loc_ua = PolarProjectionBJ(GetUnitLoc(ua), 30.00, ( r_ua + 5.00 ))
local real CenterLocX = GetLocationX(loc_ua)
local real CenterLocY = GetLocationY(loc_ua)
local unit array U_loop1
local unit array U_loop2
local real array U_loop1_LocX
local real array U_loop1_LocY
local real array U_loop2_LocX
local real array U_loop2_LocY
local real array U_loop1_tempLocX
local real array U_loop1_tempLocY
local real array U_loop2_tempLocX
local real array U_loop2_tempLocY
local real k1
local real k2
set k1 = GetRandomReal(r_ua, ( r_ua + 25.00 ))
set k2 = GetRandomReal(( r_ua - 25.00 ), r_ua )
loop
exitwhen i > 24
set U_loop1_tempLocX = CenterLocX + Cos(k1)*( 42.00 * i )
set U_loop1_tempLocY = CenterLocY + Sin(k1)*( 42.00 * i )
set U_loop1 = CreateUnit(GetOwningPlayer(ua),'e003',U_loop1_tempLocX,U_loop1_tempLocY,0)
call SetUnitFlyHeight( U_loop1, ( 210.00 + ( i * 12.00 ) ), 1000000000.00 )
call SetUnitLookAt( U_loop1, "bone_head", ua, 0.00, 0.00, 0.00 )
call SetUnitScale( U_loop1, ( 0.21 * i ), ( 0.21 * i ), ( 0.21 * i ) )
call SetUnitVertexColor( U_loop1, 255, 255, 255, 90 )
set U_loop2_tempLocX = CenterLocX + Cos(k2)*( 42.00 * i )
set U_loop2_tempLocY = CenterLocY + Sin(k2)*( 42.00 * i )
set U_loop2 = CreateUnit(GetOwningPlayer(ua),'e003',U_loop2_tempLocX,U_loop2_tempLocY,0)
call SetUnitFlyHeight( U_loop2, ( 210.00 + ( i * 12.00 ) ), 1000000000.00 )
call SetUnitLookAt( U_loop2, "bone_head", ua, 0.00, 0.00, 0.00 )
call SetUnitScale( U_loop2, ( 0.21 * i ), ( 0.21 * i ), ( 0.21 * i ) )
call SetUnitVertexColor( U_loop2, 255, 255, 255, 90 )
set i = i + 1
endloop
// 传送单位
set i = 1
loop
exitwhen i >24
call SetHandleHandle(t,( "U_loop1"+ I2S(i)),U_loop1 )
call SetHandleHandle(t,( "U_loop2"+ I2S(i)),U_loop2 )
set i = i + 1
endloop
// 传送单位完毕
call UnitAddAbility( ua, 'A01F' )
call SetHandleHandle(t2,"Light_ua2",ua)
call TimerStart(t2,2.95,true,function light_set )
call SetHandleReal(t,"CenterLocX",CenterLocX)
call SetHandleReal(t,"CenterLocY",CenterLocY)
call SetHandleHandle(t,"Light_ua",ua)
call SetHandleInt(t,"Light_lv",lv)
call SetHandleReal(t,"k1",k1)
call SetHandleReal(t,"k2",k2)
call TimerStart(t,0.07,true,function light_working )
endfunction
没法看了
2道光搞成这样
以下为当前效果图和T版的技能
光芒之驱逐.w3x
(25 KB, 下载次数: 3)
|
|