• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

How to find the Unit Type ID of a unit?

Status
Not open for further replies.
Level 9
Joined
Apr 19, 2011
Messages
447
Hi.

I want to use the CreateUnit() function, but one of the parameters it takes is some kind of "Unit ID". I think this is what defines the unit type of the created unit. However, I have no idea about where can I find this ID...

Someone can help me with this?

Regards
 
Level 9
Joined
Apr 19, 2011
Messages
447
Thanks for your answer!

When I do what you say, my unit's name says "h000:hpea". I suppose this is the ID I'm looking, isn't it?

And another question... This is for a spell, and this unit I'm trying to create is a dummy unit. However, if another person uses my spell in his map, the ID of his dummy will probably be different to the one my dummy has, and the spell won't work.
Please, correct me if I'm wrong, but how could I solve this issue?

Regards
 
Level 9
Joined
Jul 10, 2011
Messages
562
Thanks for your answer!

When I do what you say, my unit's name says "h000:hpea". I suppose this is the ID I'm looking, isn't it?

And another question... This is for a spell, and this unit I'm trying to create is a dummy unit. However, if another person uses my spell in his map, the ID of his dummy will probably be different to the one my dummy has, and the spell won't work.
Please, correct me if I'm wrong, but how could I solve this issue?

Regards

you could make a local integer in the config area and set it to the dummy rawcode so everyone who uses your spell can change it easily.
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
@NarGalloth: Yes, you're wrong. You have to place an specific spot with a comment to guide your ability user, and let him/her know that in that place he/she has to place the ID of his dummy unit, and that your's is just an example
 
Status
Not open for further replies.
Top