• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[General] Unit to Unit Type

Status
Not open for further replies.
Level 15
Joined
Aug 7, 2013
Messages
1,337
Hi,

I'm completely blanking out, but what's the name of the native function that takes a unit and returns an integer value that corresponds to its rawcode/type?

JASS:
native function GetUnitId takes unit whichUnit returns integer
...
endfunction
...
unit u = CreateUnit('hfoo', ...)
GetUnitId(u) == 'hfoo' //returns true

Thanks!
 
Status
Not open for further replies.
Top