• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[JASS] Help!!please

Status
Not open for further replies.
Level 18
Joined
Jan 21, 2006
Messages
2,552
What do you mean, "Unit ID". A unit's ID is determined by it's raw-code (which is returned, as Bribe says, with GetUnitTypeId()). In the object editor it can be found by pressing Ctrl+D, which replaces the objects' names with raw-code data IDs.
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
It's weird, actually, when I make a GUI variable that is of the "Unit-Type" type, declare it and use it in a call statement it seems like the type is treated exactly as an integer, though when I define a global unittype variable and define it to the same thing as I did in the GUI version it tells me that it cannot convert a unit-type to an integer. This leads me to believe that GUI doesn't even use unittype, instead it simply uses an integer.

Yea, this is what it reads in the map script (the unit-type declaration in the GUI):

JASS:
integer udg_What= 0

That is how it is declared, and as you can see they do not even use their own useless type.
 
Status
Not open for further replies.
Top