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

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