- Joined
- Sep 6, 2007
- Messages
- 440
Meh don't get wrong by title. I actually got a problem.
As you can see I left the else place empty. All I want to do is to learn how to call the if action which makes the checking of heros hp ( x<%50 thing ) ( At the spot of else ). Is it something with return to *something* or any other special command. Help please
JASS:
function Trig_Aura_Func001Func001Func001C takes nothing returns boolean
if ( not ( GetUnitLifePercent(GetEnumUnit()) >= 50.00 ) ) then
return false
endif
return true
endfunction
function Trig_Aura_Func001Func001C takes nothing returns boolean
if ( not ( GetUnitLifePercent(GetEnumUnit()) < 50.00 ) ) then
return false
endif
return true
endfunction
function Trig_Aura_Func001A takes nothing returns nothing
if ( Trig_Aura_Func001Func001C() ) then
call CreateNUnitsAtLoc( 1, 'u001', GetOwningPlayer(GetEnumUnit()), GetRectCenter(GetPlayableMapRect()), bj_UNIT_FACING )
set udg_ReqofAura = GetLastCreatedUnit()
else
if ( Trig_Aura_Func001Func001Func001C() ) then
call RemoveUnit( udg_ReqofAura )
else
endif
endif
endfunction
function Trig_Aura_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsOfTypeIdAll('Nplh'), function Trig_Aura_Func001A )
endfunction
//===========================================================================
function InitTrig_Aura takes nothing returns nothing
set gg_trg_Aura = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Aura, 1.00 )
call TriggerAddAction( gg_trg_Aura, function Trig_Aura_Actions )
endfunction
As you can see I left the else place empty. All I want to do is to learn how to call the if action which makes the checking of heros hp ( x<%50 thing ) ( At the spot of else ). Is it something with return to *something* or any other special command. Help please