• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[JASS] Hello jass, you are complicated

Status
Not open for further replies.
Level 10
Joined
Sep 6, 2007
Messages
440
Meh don't get wrong by title. I actually got a problem.

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
 
Status
Not open for further replies.
Top