trb92
Throwing science at the wall to see what sticks
- Reaction score
- 142
I have this code, to detect when a unit enters the map.
When a hero enters the map, created via call CreateUnit(arguments), it shows the "Returning false" message. If I comment out/delete the IsUnitType function, it returns true. How come that comparison doesn't return true even when the unit is a hero?
The weird thing is that this trigger worked before the patch, but ever since patching my warcraft it has started returning false. I don't get how that could break this, but that's when the issue started.
JASS:
globals
group G = CreateGroup()
endglobals
function EnteranceFilter takes nothing returns boolean
call BJDebugMsg("Unit entrance being tested")
debug if ((IsUnitInGroup(GetEnteringUnit(),G) == false) and (IsUnitType(GetEnteringUnit(),UNIT_TYPE_HERO) == true)) then
debug call BJDebugMsg("Returning true")
debug else
debug call BJDebugMsg("Returning false")
debug endif
return ((IsUnitInGroup(GetEnteringUnit(),G) == false) and (IsUnitType(GetEnteringUnit(),UNIT_TYPE_HERO) == true))
endfunction
The weird thing is that this trigger worked before the patch, but ever since patching my warcraft it has started returning false. I don't get how that could break this, but that's when the issue started.