HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Get Object ID Assigned In Editor

12-18-2009, 04:56 AM#1
PsycoMarauder
Got another question if someone can spare a moment. I was wondering if it was possible to get the name/id that the map editor assigns to units/buildings placed on the map? I tried the GetUnitId function which returns a number, but that number is subject to change based on the total count and not even sure what that number relates to.
I have the unit object, I need some way to convert the unit object to the assigned ID or name.
12-18-2009, 05:25 AM#2
TriggerHappy
The raw code?

GetUnitTypeId(unit).
12-18-2009, 06:08 AM#3
PsycoMarauder
UnitType? No.
12-18-2009, 06:13 AM#4
PurplePoot
You mean the gg_unit_etc variable name?
12-18-2009, 07:39 AM#5
grim001
By GetUnitId, do you mean GetUnitId from AutoIndex?
12-19-2009, 12:59 AM#6
TriggerHappy
Well, define assigned ID because we don't know what you're talking about.
Do you mean the four letter integer like 'hfoo'? if so then this will solve your problem.
12-19-2009, 07:15 AM#7
DioD
you cannot use globals by name.