• 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.

Raw code or name of item type

Status
Not open for further replies.
Level 19
Joined
Aug 8, 2007
Messages
2,765
How.

I can do raw code of item and name of item, but how do i get raw code or name of an item type.

If i do CreateItem() or whatever, the item type variable could be 0 and cause a fatal error
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
something like this?

  • Untitled Trigger 003
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • Set item = (Item being manipulated)
      • Custom script: set udg_string=GetObjectName(udg_item)
      • Custom script: set udg_integer=GetItemTypeId(udg_item)
      • Game - Display to (All players) the text: (This item name is + (string + ( and raw code is + (String(integer)))))
string=string variable in gui
integer=integer variable in gui
item=item variable in gui
 
Status
Not open for further replies.
Top