- Joined
- Oct 24, 2012
- Messages
- 6,545
does boolexpr leak if so how do i remove them ? thanks
scope PlusSignKill initializer Init_Plus_Sign_Random_Kill
globals
trigger trg_Plus_Sign_Random_Killer
endglobals
private function PlusSignKillCondition takes nothing returns boolean
if GetTriggerUnit() == Selected_Hero_Player[0] or GetTriggerUnit() == Selected_Hero_Player[1] then
return true
else
return false
endif
endfunction
private function Trig_Plus_Sign_Random_Kill_Actions takes nothing returns nothing
call DisplayTextToForce( GetPlayersAll(), "unit in range" )
endfunction
//===========================================================================
function Init_Plus_Sign_Random_Kill takes nothing returns nothing
set trg_Plus_Sign_Random_Killer = CreateTrigger( )
call TriggerRegisterUnitInRange( trg_Plus_Sign_Random_Killer, gg_unit_h05F_0036, 125, Condition( function PlusSignKillCondition ) )
call TriggerRegisterUnitInRange( trg_Plus_Sign_Random_Killer, gg_unit_h05F_0037, 125, Condition( function PlusSignKillCondition ) )
call TriggerRegisterUnitInRange( trg_Plus_Sign_Random_Killer, gg_unit_h05F_0038, 125, Condition( function PlusSignKillCondition ) )
call TriggerRegisterUnitInRange( trg_Plus_Sign_Random_Killer, gg_unit_h05F_0039, 125, Condition( function PlusSignKillCondition ) )
call TriggerRegisterUnitInRange( trg_Plus_Sign_Random_Killer, gg_unit_h05F_0040, 125, Condition( function PlusSignKillCondition ) )
call TriggerRegisterUnitInRange( trg_Plus_Sign_Random_Killer, gg_unit_h05F_0041, 125, Condition( function PlusSignKillCondition ) )
call TriggerRegisterUnitInRange( trg_Plus_Sign_Random_Killer, gg_unit_h05F_0043, 125, Condition( function PlusSignKillCondition ) )
call TriggerRegisterUnitInRange( trg_Plus_Sign_Random_Killer, gg_unit_h05F_0044, 125, Condition( function PlusSignKillCondition ) )
call TriggerAddAction( trg_Plus_Sign_Random_Killer, function Trig_Plus_Sign_Random_Kill_Actions )
endfunction
endscope
private function PlusSignKillCondition takes nothing returns boolean
return GetTriggerUnit()==Selected_Hero_Player[0] or GetTriggerUnit()==Selected_Hero_Player[1] //I don't know why the JASS tag linebreaks this line;
endfunction
Condition()
, yould use Filter()
; not that big of a deal, but it's easier to type out private function PlusSignKillCondition takes nothing returns boolean
if GetTriggerUnit()==Selected_Hero_Player[0] or GetTriggerUnit()==Selected_Hero_Player[1] then //and this one too
call Trig_Plus_Sign_Random_Kill_Actions()
endif
return false //It's important
endfunction