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

[Trigger] Multiboard - Icon of unit

Status
Not open for further replies.
Level 3
Joined
Aug 25, 2012
Messages
30
I am creating a multiboard for my map and i want there icon of curently used unit by all players.

I find a function:

Multiboard - Set Item Icon
(Set the icon for <multiboard> item in column <int>, row <int> to <path_to_icon>)

I looked for function similar like this:

Icon of <unit>
(returns path to unit´s icon)

Is there a posibilty to do this?
Or i must use if, else?
 
Level 19
Joined
Feb 25, 2009
Messages
2,004
You must save each unit's icon into a string and then set the <path_to_icon> using the string.

  • Set Icon_String = ReplaceableTextures\CommandButtons\BTNFootman.blp
  • Multiboard - Set the icon for (Last created multiboard) item in column 1, row 1 to Icon_String
If not, you can directly set the path to this icon without using a string.
 
Level 23
Joined
Apr 16, 2012
Messages
4,041
you can set every hero to the string array and unit array with like Padalin having unit[0] as well as string[0] and then when player picks a hero loop check if the unit is == unit[looper] and if it is set multiboard item to string[thenumber]
maybe there are easier ways but if you have 50 heros this is faster then having 50 nested ifs
 
Level 3
Joined
Aug 25, 2012
Messages
30
you can set every hero to the string array and unit array with like Padalin having unit[0] as well as string[0] and then when player picks a hero loop check if the unit is == unit[looper] and if it is set multiboard item to string[thenumber]
maybe there are easier ways but if you have 50 heros this is faster then having 50 nested ifs

Yeah, i was thinking bout this already, but thanks for answering ;)
I was just wondering if there is any function or custom script that will do this, but looks like there isnt :(
Its second or third unit attribute, that i want to get, but it itsnt implemented :(
 
Status
Not open for further replies.
Top