Is it possible to grab an icon and loop through all of it's icon states, as well as output the names of all it's state? If so, how would one go about this?
|
![]() May 11 2013, 10:44 am
Best response
|
|
There is an icon_states() proc that takes an argument, an icon, and you can use a for() loop to output each state.
|
Thank you, I glanced over that but didn't think it was what I was looking for. Now looking over it again I saw what I was doing wrong the first time I glanced and tested it. I never stored them as a list. Thank you.
|
On this note, how come when saving a list of icons/icon states; upon trying to call them back when loading them they are registered as existing, but have no icon?
|
var/list/cached_icons = list() It works perfectly fine without the loading system, upon saving, and loading, since the list loads the already cached icon, it doesn't recreate it. However, it says it's made already inside the cache. It doesn't place the icon on the src though. Without loading and saving the system works fine, however if I plan to have a massive amount of cached icons it would be easier to save them all then have to generate/have them all made via playing each host time. Yet when I use the save/load system it displays no icon, yet states the icon is already in the cache and doesn't generate a new icon(Which it would if it wasn't located in the cache already) It might be the way i'm saving it, because that's the only thing i see that might be wrong. EDIT: I also forgot to state I tried this with and without using global.cached_icons |