n[u]ll
You can change this now in User CP.
- Reaction score
- 93
This is my trigger...
The problem is that when the unit lands into the region he doesnt die... (even when it walks into the region).
Anyone see a problem with it?
Code:
function Trig_fly_die_Func001C takes nothing returns boolean
if ( not ( GetUnitMoveSpeed(gg_unit_Edem_0012) == 0.00 ) ) then
return false
endif
if ( not ( RectContainsUnit(gg_rct_Region_336, gg_unit_Edem_0012) == true ) ) then
return false
endif
return true
endfunction
function Trig_fly_die_Func002C takes nothing returns boolean
if ( not ( GetUnitMoveSpeed(gg_unit_Edem_0013) == 0.00 ) ) then
return false
endif
if ( not ( RectContainsUnit(gg_rct_Region_336, gg_unit_Edem_0013) == true ) ) then
return false
endif
return true
endfunction
function Trig_fly_die_Func003C takes nothing returns boolean
if ( not ( GetUnitMoveSpeed(gg_unit_Edem_0014) == 0.00 ) ) then
return false
endif
if ( not ( RectContainsUnit(gg_rct_Region_336, gg_unit_Edem_0014) == true ) ) then
return false
endif
return true
endfunction
function Trig_fly_die_Func004C takes nothing returns boolean
if ( not ( GetUnitMoveSpeed(gg_unit_Edem_0015) == 0.00 ) ) then
return false
endif
if ( not ( RectContainsUnit(gg_rct_Region_336, gg_unit_Edem_0015) == true ) ) then
return false
endif
return true
endfunction
function Trig_fly_die_Func005C takes nothing returns boolean
if ( not ( GetUnitMoveSpeed(gg_unit_Edem_0016) == 0.00 ) ) then
return false
endif
if ( not ( RectContainsUnit(gg_rct_Region_336, gg_unit_Edem_0016) == true ) ) then
return false
endif
return true
endfunction
function Trig_fly_die_Func006C takes nothing returns boolean
if ( not ( GetUnitMoveSpeed(gg_unit_Edem_0017) == 0.00 ) ) then
return false
endif
if ( not ( RectContainsUnit(gg_rct_Region_336, gg_unit_Edem_0017) == true ) ) then
return false
endif
return true
endfunction
function Trig_fly_die_Func007C takes nothing returns boolean
if ( not ( GetUnitMoveSpeed(gg_unit_Edem_0018) == 0.00 ) ) then
return false
endif
if ( not ( RectContainsUnit(gg_rct_Region_336, gg_unit_Edem_0018) == true ) ) then
return false
endif
return true
endfunction
function Trig_fly_die_Func008C takes nothing returns boolean
if ( not ( GetUnitMoveSpeed(gg_unit_Edem_0019) == 0.00 ) ) then
return false
endif
if ( not ( RectContainsUnit(gg_rct_Region_336, gg_unit_Edem_0019) == true ) ) then
return false
endif
return true
endfunction
function Trig_fly_die_Func009C takes nothing returns boolean
if ( not ( GetUnitMoveSpeed(gg_unit_Edem_0020) == 0.00 ) ) then
return false
endif
if ( not ( RectContainsUnit(gg_rct_Region_336, gg_unit_Edem_0020) == true ) ) then
return false
endif
return true
endfunction
function Trig_fly_die_Func010C takes nothing returns boolean
if ( not ( GetUnitMoveSpeed(gg_unit_Edem_0021) == 0.00 ) ) then
return false
endif
if ( not ( RectContainsUnit(gg_rct_Region_336, gg_unit_Edem_0021) == true ) ) then
return false
endif
return true
endfunction
function Trig_fly_die_Func011C takes nothing returns boolean
if ( not ( GetUnitMoveSpeed(gg_unit_Edem_0022) == 0.00 ) ) then
return false
endif
if ( not ( RectContainsUnit(gg_rct_Region_336, gg_unit_Edem_0022) == true ) ) then
return false
endif
return true
endfunction
function Trig_fly_die_Actions takes nothing returns nothing
if ( Trig_fly_die_Func001C() ) then
call KillUnit( gg_unit_Edem_0012 )
else
endif
if ( Trig_fly_die_Func002C() ) then
call KillUnit( gg_unit_Edem_0013 )
else
endif
if ( Trig_fly_die_Func003C() ) then
call KillUnit( gg_unit_Edem_0014 )
else
endif
if ( Trig_fly_die_Func004C() ) then
call KillUnit( gg_unit_Edem_0015 )
else
endif
if ( Trig_fly_die_Func005C() ) then
call KillUnit( gg_unit_Edem_0016 )
else
endif
if ( Trig_fly_die_Func006C() ) then
call KillUnit( gg_unit_Edem_0017 )
else
endif
if ( Trig_fly_die_Func007C() ) then
call KillUnit( gg_unit_Edem_0018 )
else
endif
if ( Trig_fly_die_Func008C() ) then
call KillUnit( gg_unit_Edem_0019 )
else
endif
if ( Trig_fly_die_Func009C() ) then
call KillUnit( gg_unit_Edem_0020 )
else
endif
if ( Trig_fly_die_Func010C() ) then
call KillUnit( gg_unit_Edem_0021 )
else
endif
if ( Trig_fly_die_Func011C() ) then
call KillUnit( gg_unit_Edem_0022 )
else
endif
endfunction
//===========================================================================
function InitTrig_fly_die takes nothing returns nothing
set gg_trg_fly_die = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_fly_die, 0.01 )
call TriggerAddAction( gg_trg_fly_die, function Trig_fly_die_Actions )
endfunction
The problem is that when the unit lands into the region he doesnt die... (even when it walks into the region).
Anyone see a problem with it?