In either case, there is some trickery to doing this.
You cannot get the actor type of a unit to look up the portrait or the icon - but you can get the unit type of a unit. Therefore, if you name all of your actors exactly the same as you name their respective units, you can lookup the portrait or icon of any actor by substituting the unit type for the actor type.
I'm not sure if you can do that in the GUI, but in GalaxyScript, actor type and unit type are just strings, and therefore interchangeable.
Anyways, once you have the names properly set up, you want to get the icon/portrait by using the function Catalog Field Value Get. You would feed it something like:
Catalog Field Value Get (Actors, UnitGetType(unit), icon, Any Player)
Can you create a sample map of the Catalog Field Value get of the Function , Cause when I searched every directory in my part , I only read something about Set Leaderboard Item Icon with a Function.
If this doesn't work, u can make a new function which will automatically return the correct image, This however is very very time consuming, and if u make it u should post it to mapsters
Is there a way or how do I make one like the one in this thread through Triggers?
http://www.sc2mapster.com/forums/development/triggers/24409-getting-portraits-models-from-unit-type/
If somebody could help thanks, Its for my Scoreboard. :)
@Mugen245: Go
Did you want the portrait or the icon?
In either case, there is some trickery to doing this.
You cannot get the actor type of a unit to look up the portrait or the icon - but you can get the unit type of a unit. Therefore, if you name all of your actors exactly the same as you name their respective units, you can lookup the portrait or icon of any actor by substituting the unit type for the actor type.
I'm not sure if you can do that in the GUI, but in GalaxyScript, actor type and unit type are just strings, and therefore interchangeable.
Anyways, once you have the names properly set up, you want to get the icon/portrait by using the function Catalog Field Value Get. You would feed it something like:
Catalog Field Value Get (Actors, UnitGetType(unit), icon, Any Player)
Can you create a sample map of the Catalog Field Value get of the Function , Cause when I searched every directory in my part , I only read something about Set Leaderboard Item Icon with a Function.
If you could reply thanks , Its for my rpg :)
@Mugen245: Go
Here.
If this doesn't work, u can make a new function which will automatically return the correct image, This however is very very time consuming, and if u make it u should post it to mapsters
nvm I think I found this thread , Gonna check it out
http://www.sc2mapster.com/forums/development/map-development/6159-dynamic-leaderboard-icons/
It seems I have found the Solution thanks to Helral.
@Mugen245: Go
I already made a demo map for you... Did you seriously not see that?
@MasterWrath: Go
I'm currently using Wings of Liberty and not the Battlenet one , and nope I reviewed the map , It displays unknown function in my side.