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

[JASS] GetItemIcon(GetManipulatedItem())

Status
Not open for further replies.
Level 4
Joined
May 6, 2006
Messages
79
I want to make a backpack system based on a multiboard. Everything works by now; as u enter an item it goes to the first availabl slot in the back pack, wichnregisters its type and displays its name. I just thought it would have been super cool if it also displayed its icon.

By the way... is there a way to make personal multiboads?? GUI lets you create a shared multiboard and i begun JASSing two days ago... so, if you could help me with the code I would be thankful
 
Level 1
Joined
Mar 18, 2006
Messages
1
maybe this function can help you,but you should know
to use it
here is it:
JASS:
native GetAbilityEffectById takes integer abilityId, effecttype t, integer index returns string
the ability could be the itemId,very useful function
 
Level 4
Joined
May 6, 2006
Messages
79
are you sure it works???

uhmmm... so i just do something like this?

JASS:
call GetAbilityEffectById('xxxx',null,null)

I don't get it; how come an item has effecttype or index... that shoud work only for abilities, as far as I can tell... but i'll try anything, it would be pretty cool to achieve it
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
You can not directly get the icon of an item I believe, but you can get the item type integer.

You simply have to make a system of retrieveing an icon for an item type.
Easiest is if you store the icons path in a game chache under the item type value.

About "private" multiboards.
IT IS VERY EASY TO MAKE THEM PRIVATE!

JASS:
if GetLocalPlayer() == Player(integer) then
call MultiboardDisplay(multiboard, true)
endif

integer = player number integer (player slot - 1)
multiboard = multiboard you want only the integer player to see.

Before you ask "WTF has the IF - THEN actions got to do with displaying a multiboard to a single player?" read this.

GetLocalPlayer is a very usefull but dangerous command.
It seems to run some hidden function when read by WC3 that sets a certain function to happen to a spacific player.
If you set the function to something more phyical it will cause a multiplayer desync or worse a crash.
It also works with player groups.
A few standard functions use this.

In that example it would only make the multiboard visable for the player integer by unhiding it for that player.
Note that the multiboard has to be hidden in the first place or it will do nothing.
 
Status
Not open for further replies.
Top