I kind a want to make a list of unit-types, and instead of writing "unit-type equal to ... or .... or .... or .... or .... or ...." I want to write "is unit-type in the list".
I don't insist on doing it the way I poined out, ANY way to do it faster/easier will be apreciated.
I kind a have my eyes on "unitpool"s, I don't really know what they are, but the name at least sounds like something that can be used for my purposes.
EDIT: I kind a found a workaround:
This way all of these units are in 1 group, and there are even sub-groups
my condition later is (i != 0) if I want to see if the unit is in the group, and I can do (i == 1) to see if it's in sub-group 1
I don't insist on doing it the way I poined out, ANY way to do it faster/easier will be apreciated.
I kind a have my eyes on "unitpool"s, I don't really know what they are, but the name at least sounds like something that can be used for my purposes.
EDIT: I kind a found a workaround:
JASS:
function UT_Comparison takes integer ut returns integer
if ut == 'n00N' then
return 1
elseif ut == 'n002' or ut =='n00O' then
return 2
elseif ut == 'n00M' or ut == 'e005' then
return 3
endif
return 0
endfunction
This way all of these units are in 1 group, and there are even sub-groups
my condition later is (i != 0) if I want to see if the unit is in the group, and I can do (i == 1) to see if it's in sub-group 1
Last edited:


