JASS:
function Trig_kill_Func1A takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'H00A' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'H00z' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'n00B' ) ) then
return false
endif
return true
endfunction
function Trig_kill_Func2A takes nothing returns nothing
call KillUnit( GetEnumUnit() )
endfunction
call ForGroupBJ( GetUnitsOfPlayerMatching(GetOwningPlayer(GetEnteringUnit()), Condition(function Trig_kill_Func1A)), function Trig_kill_Func2A )
Trying to remove all units for the player, other than those 3 ('H00A', 'H00z' and 'n00B'). For some reason it unconditionally kills everything. Renamed stuff for simplicity, I am sure it is with the conditional checking, but can't see what's wrong.
Event is a unit entering region.
Thanks.
Edit: Yes, I realise this is a gui -> jass convert, but I am not sure how to do with multiple conditions otherwise....
Last edited: