- Joined
- Sep 9, 2007
- Messages
- 6,759
Ok because my problem is that hard I try to explain with picture
I want 2 make those 3 nether dragons fly to the target location and hit all enemy unit in that region.
Green = Netherdrake
Black = Flyight route
Darkred = Area Effect
Red = Target Location
Can someone help me? I've done that and I am using JNGP!
I want 2 make those 3 nether dragons fly to the target location and hit all enemy unit in that region.
Green = Netherdrake
Black = Flyight route
Darkred = Area Effect
Red = Target Location
Can someone help me? I've done that and I am using JNGP!
JASS:
globals
gamecache udg_GameCache = null
endglobals
function T2I takes timer t returns integer
return t
return 0
endfunction
function I2T takes integer i returns timer
return i
return CreateTimer()
endfunction
function DW_Save takes unit u, real t_x, real t_y, integer m returns nothing
call StoreUnit(udg_GameCache,"DW"+"m","u",u)
call StoreReal(udg_GameCache,"DW"+"m","t_x",t_x)
call StoreReal(udg_GameCache,"DW"+"m","t_y",t_y)
endfunction
function DW_Load takes integer i, returns unit u, real t_x, real t_y, integer m
set u = RestoreUnitLocFacingAngleBJ("DW"+I2S(i),"u",udg_GameCache,Player(14))
return i
return
return
return
endfunction
function DW_M_Action takes nothing returns nothing
local timer t = GetExpiredTimer()
local integer i = T2I(t)
local unit u
local integer m
local real t_x
local real t_y
call DW_Load
endfunction
function DW_Actions takes nothing returns nothing
local unit u = GetTriggerUnit()
local integer i = GetUnitAbilityLevel(u,'A00Y')
local location l = GetSpellTargetLoc()
local real t_x = GetLocationX(l)
local real t_y = GetLocationY(l)
local timer t = CreateTimer()
local integer m
set m = T2I(t)
call TimerStart(t,0.01,false, function DW_M_Action)
call DW_Save(u,t_x,t_y,m)
endfunction
function DW_Conditions takes nothing returns boolean
return GetSpellAbilityId() == 'A00Y'
endfunction
//===========================================================================
function InitTrig_DW takes nothing returns nothing
local trigger gg_trg_DW = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_DW, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_DW, Condition( function DW_Conditions ) )
call TriggerAddAction( gg_trg_DW, function DW_Actions )
endfunction