- Joined
- Nov 3, 2004
- Messages
- 79
This are the Script of my Stun Aura why it doesnt works?
function Trig_Stun_Aura_Conditions takes nothing returns boolean
if ( not ( GetLearnedSkillBJ() == 'A000' ) ) then
return false
endif
return true
endfunction
function Trig_Stun_loop_Actions takes nothing returns nothing
local timer t=GetExpiredTimer()
local unit learn = GetLinkedUnit(t,"learn")
local group g
local location p
local unit u
set p = GetUnitLoc(learn)
set g = GetUnitsInRangeOfLocAll(800.00, p)
set u = FirstOfGroup(g)
loop
exitwhen u==null
set u = FirstOfGroup(g)
if IsUnitEnemy(u, GetOwningPlayer(learn))==true then
call GroupRemoveUnit(g,u)
set dumb = CreateUnitAtLoc(GetOwningPlayer(learn), ‘n000’, GetUnitLoc(u), 0.00)
call IssueTargetOrderBJ(dumb, “sleep”, u)
call UnitApplyTimedLifeBJ (1.50, ‘BTLF’, dumb)
set dumb = null
endif
endloop
set g = null
set u = null
set p = null
endfunction
function Trig_Stun_Aura_Actions takes nothing returns nothing
local unit learn
local timer t
set learn = GetLearningUnit()
set t = CreateTimer()
call StoreHandle(t,learn, "learn")
call TimerStart(t,4.00,true,function Trig_Stun_loop_Actions)
endfunction
//===========================================================================
function InitTrig_Stun_Aura takes nothing returns nothing
set gg_trg_Stun_Aura = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Stun_Aura, EVENT_PLAYER_HERO_SKILL )
call TriggerAddCondition( gg_trg_Stun_Aura, Condition( function Trig_Stun_Aura_Conditions ) )
call TriggerAddAction( gg_trg_Stun_Aura, function Trig_Stun_Aura_Actions )
endfunction
function Trig_Stun_Aura_Conditions takes nothing returns boolean
if ( not ( GetLearnedSkillBJ() == 'A000' ) ) then
return false
endif
return true
endfunction
function Trig_Stun_loop_Actions takes nothing returns nothing
local timer t=GetExpiredTimer()
local unit learn = GetLinkedUnit(t,"learn")
local group g
local location p
local unit u
set p = GetUnitLoc(learn)
set g = GetUnitsInRangeOfLocAll(800.00, p)
set u = FirstOfGroup(g)
loop
exitwhen u==null
set u = FirstOfGroup(g)
if IsUnitEnemy(u, GetOwningPlayer(learn))==true then
call GroupRemoveUnit(g,u)
set dumb = CreateUnitAtLoc(GetOwningPlayer(learn), ‘n000’, GetUnitLoc(u), 0.00)
call IssueTargetOrderBJ(dumb, “sleep”, u)
call UnitApplyTimedLifeBJ (1.50, ‘BTLF’, dumb)
set dumb = null
endif
endloop
set g = null
set u = null
set p = null
endfunction
function Trig_Stun_Aura_Actions takes nothing returns nothing
local unit learn
local timer t
set learn = GetLearningUnit()
set t = CreateTimer()
call StoreHandle(t,learn, "learn")
call TimerStart(t,4.00,true,function Trig_Stun_loop_Actions)
endfunction
//===========================================================================
function InitTrig_Stun_Aura takes nothing returns nothing
set gg_trg_Stun_Aura = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Stun_Aura, EVENT_PLAYER_HERO_SKILL )
call TriggerAddCondition( gg_trg_Stun_Aura, Condition( function Trig_Stun_Aura_Conditions ) )
call TriggerAddAction( gg_trg_Stun_Aura, function Trig_Stun_Aura_Actions )
endfunction
JASS: