- Joined
- Aug 7, 2013
- Messages
- 1,338
Hi,
Suppose I write the following function:
Now if I understand correctly,
But say I want to have separate behavior depending on the handle passed in. Is there a function that does this, i.e. tells me if a handle is of a certain type?
Suppose I write the following function:
JASS:
function foo takes handle h returns nothing
...
endfunction
Now if I understand correctly,
foo
will accept any handle (i.e. a reference to something which is an instance: unit in the map, a tree in the map, a region/rect in the map, an item in the map). But say I want to have separate behavior depending on the handle passed in. Is there a function that does this, i.e. tells me if a handle is of a certain type?
JASS:
native function isTypeOf takes handle whichHandle, type whichType returns boolean
...
endfunction