ID:155080
 
is there any way to show all icon_states of an icon on Map like Falacy have done it in Icon Share
In response to Ocean King
i know this but how should i make a list of it plz reply. i tried lots of time but not working
In response to Hassanjalil
Hassanjalil wrote:
i know this but how should i make a list of it plz reply. i tried lots of time but not working

mob/verb/CreateStates()
var/icon = 'icom.dmi'
for(var/State in icon_states(icon, 1))
world << State;


That shows all the States of the icon, well you can also do:

mob/verb/CreateStates()
var/icon = 'icom.dmi'
for(var/Counter = 1; Counter < length(icon_states(icon, 1)) + 1; Counter++)
world << icon_states(icon, 1)[Counter];


But i prefer first way ^_^

Well with this hint i hope you 'should' be able to place all the icon_states on the screen. (Which i think that you create an object for each state).
In response to Ocean King
Tnx i will give it a try
In response to Ocean King
mob/verb/CreateStates()
var/icon = 'Goku.dmi'
var/CounterY=1
for(var/Counter = 1; Counter < length(icon_states(icon, 1)) + 1; Counter++)
world << icon_states(icon, 1)[Counter];
var/obj/O=new()
O.icon=icon(icon,icon_states(icon, 2))
// O.icon_state=
O.screen_loc="[Counter],[CounterY]"
src.client.screen+=O
if(Counter==5&&CounterY<=9)
Counter=1
CounterY++

this is what i created yet but the icon states keep going on and same icon_state keep accuring
In response to Hassanjalil
Hassanjalil wrote:
> mob/verb/CreateStates()
> var/icon = 'Goku.dmi'
> var/CounterY=1
> for(var/Counter = 1; Counter < length(icon_states(icon, 1)) + 1; Counter++)
> world << icon_states(icon, 1)[Counter];
> var/obj/O=new()
> O.icon=icon(icon,icon_states(icon, 2))
> // O.icon_state=
> O.screen_loc="[Counter],[CounterY]"
> src.client.screen+=O
> if(Counter==5&&CounterY<=9)
> Counter=1
> CounterY++

this is what i created yet but the icon states keep going on and same icon_state keep accuring

Change the o.icon = icon(icon, icon_states(icon, 2)) to:

O.icon=icon(icon,icon_states(icon, 1)[Counter])

In response to Ocean King
Thankyou very much but just want to know how to make moving state