ID:160446
 
Now, I am not really great at skinning. So, I am not exactly sure how I'd do this. Basically I have a 32x32 label that I want to have an icon over (with an icon state), now I tried this with output, but since I know that my proc refreshes in a couple of millaseconds there was'nt any point of doing so. So, I am not exactly how I'd do this with winset or anything as I am not used to other skinning procs as of, yet..
copy the icon state or w/e into a paint file and just use that :o
In response to Yash 69
Uh, no that won't do I am afraid. Since, I have the icon state change. Thats, why I have my proc refresh.
The winset() proc will work. You'll want to set the image parameter of your label.
///Obviously, you'll use your own var names.
winset(myPlayer,"myLabel","image=['myPic.png']")
I use PNGs instead of DMIs. They're related, but I'm not aware of a notation to specify states and have not seen animations. (You can export icon frames to PNGs if you're worried about how to get them.)
In response to ACWraith
Well, they are rank images that I plan to use it for. So, if I were to export them all to .png format that would mean I'd have to call winset for each one then? Then, check if they actually have that rank or not?
In response to MasterLink2003
Hopefully, you'd check ranks before calling winset() so you'd know what image to use, but that's basically it. ;)

That said, I'd save some code and name the images in a manner that matches how you refer to ranks. Then you could just use something like '[myRank].png' as a variable file argument and not have to perform checks.
In response to ACWraith
Don't you need to use the \icon macro, too?
In response to Jeff8500
You could use the \icon macro for an output, but winset labels don't appear to require it. I've been setting icon vars to PNGs and using the line winset(M,"pic[index]","image=[P.icon]") in PathWrath 2's scoreboard for ages... Granted, I've been thinking of switching to a grid for better text formatting.
In response to Jeff8500
The \icon macro isn't really some magic convenient feature or something - it's just a shortcut for the <IMG> tag
(this also means browse_rsc() could be required for it under certain situations), and is often used in HTML situations, where you can't otherwise display a graphic (or it's limited/constricting), but if you're displaying an object's icon you can just use the built-in means of displaying it available in statpanels, grids, labels (which they do have in their behavior, so you don't have to use an <IMG> tag). Then you'll also get the advantage that it's not just a regular image (which may be desired in other situations, but not when displaying on atom, most often) sitting there, but it actually functions like the atom would function on the map: you can access its Click() procedures, see its name (with a mouseover), probably even access its right-click menu.