- Joined
- Jul 16, 2009
- Messages
- 10
I need some help. can soemone tell me why i am having undeclared g and l.
JASS:
function Trig_Counter_Helix_Func002C takes nothing returns boolean
if ( not ( UnitHasBuffBJ(GetTriggerUnit(), 'B000') == true ) ) then
return false
endif
return true
endfunction
function Trig_Counter_Helix_Conditions takes nothing returns boolean
if ( not Trig_Counter_Helix_Func002C() ) then
return false
endif
return true
endfunction
function Trig_Counter_Helix_Func001Func002002003001 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(GetTriggerUnit())) == true )
endfunction
function Trig_Counter_Helix_Func001Func002002003002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Counter_Helix_Func001Func002002003 takes nothing returns boolean
return GetBooleanAnd( Trig_Counter_Helix_Func001Func002002003001(), Trig_Counter_Helix_Func001Func002002003002() )
endfunction
function Trig_Counter_Helix_Func001Func003A takes nothing returns nothing
call AddSpecialEffectTargetUnitBJ( "origin", GetEnumUnit(), "Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl" )
call ConditionalTriggerExecute( gg_trg_Destroy_FX )
call UnitDamageTargetBJ( GetTriggerUnit(), GetEnumUnit(), ( 75.00 + ( 25.00 * I2R(GetUnitAbilityLevelSwapped('A000', GetTriggerUnit())) ) ), ATTACK_TYPE_HERO, DAMAGE_TYPE_NORMAL )
endfunction
function Trig_Counter_Helix_Func001C takes nothing returns boolean
if ( not ( GetRandomInt(1, 100) <= 15 ) ) then
return false
endif
return true
endfunction
function Trig_Counter_Helix_Actions takes nothing returns nothing
if ( Trig_Counter_Helix_Func001C() ) then
local location l = GetUnitLoc(GetTriggerUnit())
local group g = GetUnitsInRangeOfLocMatching(200.00, l, Condition(function Trig_Counter_Helix_Func001Func002002003))
call ForGroupBJ( g, function Trig_Counter_Helix_Func001Func003A )
call SetUnitAnimation( GetTriggerUnit(), "spin" )
call RemoveLocation(l)
set l = null
call DestroyGroup(g)
set g = null
call DisableTrigger( GetTriggeringTrigger() )
call TriggerSleepAction( 0.25 )
call EnableTrigger( GetTriggeringTrigger() )
call SetUnitAnimation( GetTriggerUnit(), "stand" )
else
endif
endfunction
//===========================================================================
function InitTrig_Counter_Helix takes nothing returns nothing
set gg_trg_Counter_Helix = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Counter_Helix, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_Counter_Helix, Condition( function Trig_Counter_Helix_Conditions ) )
call TriggerAddAction( gg_trg_Counter_Helix, function Trig_Counter_Helix_Actions )
endfunction