- Joined
- Oct 24, 2012
- Messages
- 6,545
well i have an if condition but it has to check multiple conditions (all r units) any way to shorten this ?
thanks for helping
JASS:
if ( GetTriggerUnit() == udg_Unit_Spawns_Red[1] or GetTriggerUnit() == udg_Unit_Spawns_Red[2] or GetTriggerUnit() == udg_Unit_Spawns_Red[3] or GetTriggerUnit() == udg_Unit_Spawns_Red[4] or GetTriggerUnit() == udg_Unit_Spawns_Red[5] or GetTriggerUnit() == udg_Unit_Spawns_Red[6] or GetTriggerUnit() == udg_Unit_Spawns_Red[7] or GetTriggerUnit() == udg_Unit_Spawns_Red[8] or GetTriggerUnit() == udg_Unit_Spawns_Red[9] or GetTriggerUnit() == udg_Unit_Spawns_Red[10] or GetTriggerUnit() == udg_Unit_Spawns_Red[11] or GetTriggerUnit() == udg_Unit_Spawns_Red[12] or GetTriggerUnit() == udg_Unit_Spawns_Red[13] or GetTriggerUnit() == udg_Unit_Spawns_Red[14] or GetTriggerUnit() == udg_Unit_Spawns_Red[15] or GetTriggerUnit() == udg_Unit_Spawns_Red[16] or GetTriggerUnit() == udg_Unit_Spawns_Red[17] or GetTriggerUnit() == udg_Unit_Spawns_Red[18] or GetTriggerUnit() == udg_Unit_Spawns_Red[19] or GetTriggerUnit() == udg_Unit_Spawns_Red[20] or GetTriggerUnit() == udg_Unit_Spawns_Red[21] or GetTriggerUnit() == udg_Unit_Spawns_Red[22] or GetTriggerUnit() == udg_Unit_Spawns_Red[23] or GetTriggerUnit() == udg_Unit_Spawns_Red[24] or GetTriggerUnit() == udg_Unit_Spawns_Red[25] or GetTriggerUnit() == udg_Boss_Unit_Player[1]) then
thanks for helping