GetUnitId - is it possible?

T

Tooters

Guest
I would like to know if there is some JASS code that gets unitId from a unit.
Example:

Code:
function GetUnitId takes unit whichUnit returns integer
    local integer theUnitsId
    (Code)
    return theUnitsId
endfunction

Does anyone know of a code like this, or could make one like this?
 
T

Tooters

Guest
Well this is what I'm trying to do..

Code:
if GetUnitId( sortingUnit ) == 'hfoo' then

So sortingUnit = unit, and I was wondering if there was anything like that. I use JassCraft, and in the Native search list I looked for "GetUnitId" and it wasn't there.
 

emjlr3

Change can be a good thing
Reaction score
395
PHP:
constant native GetUnitTypeId       takes unit whichUnit returns integer
JASS Craft knows all
 
T

Tooters

Guest
Oh I thought that was like IsUnitIdType.. which says

Code:
constant native IsUnitIdType        takes integer unitId, unittype whichUnitType returns boolean

Because I thought that code checks if they are both ground units. Is that right?
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
IsUnitIdType in GUI would be "Unit-type classification check".

Something like this:
((Unit-type of (Triggering unit)) is A ground unit) Equal to True
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top