• 🏆 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!

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