|
圓0006.w3x
(27 KB, 下载次数: 7)
3技能,觸發那邊A006的都有關係....貼主要的上來好了......
首先是施放3技能的觸發...- function Trig_A006_3_Actions takes nothing returns nothing
-     local unit u0 = GetTriggerUnit()
-     local integer counter = LoadInteger(udg_ht,GetHandleId(u0),0)
-     local integer lvl = GetUnitAbilityLevel(u0,'A006')    
-     if lvl == 4 then
-         set udg_ooo[counter] = 3
-         call PolledWait(20.00)
-         set udg_ooo[counter] = 1
-     elseif lvl < 4 then  
-         set udg_ooo[counter] = 2        
-         call PolledWait(20.00)
-         set udg_ooo[counter] = 1
-     endif
-     set u0 = null
- endfunction
复制代码 udg_ooo[counter]是石頭的數量...(預設是1)
然後每4秒下石頭的觸發...- function Trig_A006_4_Actions takes nothing returns nothing
-     local location loc0 = null
-     local location loc1 = null
-     local integer counter = 0
-     local integer ooo = 0
-     local unit u = null    
-     call ClearTextMessages()
-     loop
-         exitwhen counter > udg_counter        
-         if udg_ooo2[counter] == 4.00 then              
-             loop
-                 exitwhen ooo >= udg_ooo[counter]
-                 set loc0 = GetUnitLoc(udg_co[counter])
-                 set loc1 = GetRandomLocInRadius(loc0,600)
-                 set u = CreateUnitAtLoc(GetOwningPlayer(udg_co[counter]),'h001',loc0,AngleBetweenPoints(loc0,loc1))
-                 call IssuePointOrderLoc(u,"inferno",loc1)
-                 call BJDebugMsg("HI")
-                 call RemoveLocation(loc0)
-                 call RemoveLocation(loc1)
-                 call RemoveUnit(u)
-                 set u = null
-                 set ooo = ooo + 1
-             endloop        
-         endif
-         set ooo = 0
-         set counter = counter + 1    
-     endloop
- endfunction
复制代码 "HI"的顯示數量都正確...就是石頭有時候會少......求解.......
對了...技能這樣的....每10/8/6/4秒在圓內隨機點下1顆石頭.....主動施放可在20秒內增加1/1/1/2顆石頭......
還有這個自定義函數..- function GetRandomLocInRadius takes location l, real r returns location
- return PolarProjectionBJ(l,GetRandomReal(0,r),GetRandomReal(0,360))
- endfunction
复制代码 |
|