• 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] how to shorten conditions ?

Status
Not open for further replies.
JASS:
function Trig_Red_Kills_Counter_Func000C takes nothing returns boolean
    if ( ( GetTriggerUnit() == udg_Unit_Spawns_Red[1] ) ) then
        return true
    endif
    if ( ( GetTriggerUnit() == udg_Unit_Spawns_Red[2] ) ) then
        return true
    endif
    if ( ( GetTriggerUnit() == udg_Unit_Spawns_Red[3] ) ) then
        return true
    endif
    if ( ( GetTriggerUnit() == udg_Unit_Spawns_Red[4] ) ) then
        return true
    endif
    if ( ( GetTriggerUnit() == udg_Unit_Spawns_Red[5] ) ) then
        return true
    endif
    if ( ( GetTriggerUnit() == udg_Unit_Spawns_Red[6] ) ) then
        return true
    endif
    if ( ( GetTriggerUnit() == udg_Unit_Spawns_Red[7] ) ) then
        return true
    endif
    if ( ( GetTriggerUnit() == udg_Unit_Spawns_Red[8] ) ) then
        return true
    endif
    if ( ( GetTriggerUnit() == udg_Unit_Spawns_Red[9] ) ) then
        return true
    endif
    if ( ( GetTriggerUnit() == udg_Unit_Spawns_Red[10] ) ) then
        return true
    endif
    if ( ( GetTriggerUnit() == udg_Unit_Spawns_Red[11] ) ) then
        return true
    endif
    if ( ( GetTriggerUnit() == udg_Unit_Spawns_Red[12] ) ) then
        return true
    endif
    if ( ( GetTriggerUnit() == udg_Unit_Spawns_Red[13] ) ) then
        return true
    endif
    if ( ( GetTriggerUnit() == udg_Unit_Spawns_Red[14] ) ) then
        return true
    endif
    if ( ( GetTriggerUnit() == udg_Unit_Spawns_Red[15] ) ) then
        return true
    endif
    if ( ( GetTriggerUnit() == udg_Unit_Spawns_Red[16] ) ) then
        return true
    endif
    if ( ( GetTriggerUnit() == udg_Unit_Spawns_Red[17] ) ) then
        return true
    endif
    if ( ( GetTriggerUnit() == udg_Unit_Spawns_Red[18] ) ) then
        return true
    endif
    if ( ( GetTriggerUnit() == udg_Unit_Spawns_Red[19] ) ) then
        return true
    endif
    if ( ( GetTriggerUnit() == udg_Unit_Spawns_Red[20] ) ) then
        return true
    endif
    if ( ( GetTriggerUnit() == udg_Unit_Spawns_Red[21] ) ) then
        return true
    endif
    if ( ( GetTriggerUnit() == udg_Unit_Spawns_Red[22] ) ) then
        return true
    endif
    if ( ( GetTriggerUnit() == udg_Unit_Spawns_Red[23] ) ) then
        return true
    endif
    if ( ( GetTriggerUnit() == udg_Unit_Spawns_Red[24] ) ) then
        return true
    endif
    if ( ( GetTriggerUnit() == udg_Unit_Spawns_Red[25] ) ) then
        return true
    endif
    return false
endfunction


 if ( Trig_Red_Kills_Counter_Func000C() ) then//i need them to go into this one

thanks to anyone tht can help they r or condition if any of them r true also if u could tell me how to do it for and conitions alaso for an and + or condition thank you
 
Status
Not open for further replies.
Top