- Joined
- Apr 29, 2007
- Messages
- 826
Uncomment the lines so you have to save, but don't save. Close the map and click yes to save, after that load it again and you should see the abilities in the OE.
There are a lot of systems now-a-days that use a functionGetUnitId
, perhaps it should be privatized?
function GetUnitId takes unit u returns integer
return GetHandleId(u)-0x100000
endfunction
struct Id
static method operator [] takes unit u returns integer
return GetUnitId(u)
endmethod
endstruct
Half the library was syntactic sugar while we waited for vJASS wrappers to be implemented. In the above case, it'sJASS:function GetUnitId takes unit u returns integer return GetHandleId(u)-0x100000 endfunction struct Id static method operator [] takes unit u returns integer return GetUnitId(u) endmethod endstruct
Just can't see nonsense like this in the "approved resources" section, and while I see your point I'm not going to instant-graveyard this without even the slim possibility of him updating it first.
unit:Id
. All properties are accessible this way, as the first post mentions.