ID:155294
 
does anyone know a good tutorial that will teach me how to use icon states?
What do you exactly mean?
In response to Raimo
What??
Theres nothing hard about icon states its basically self explanatory
In response to Raimo
Step 1. icon state="(name of icon state)"
Step 2. no step 2, there's your tutorial.
In response to Xyphon101
I think he means switching states, like regular to mining to firing weapons etc.
In response to Kyle_ZX
Kyle_ZX wrote:
I think he means switching states, like regular to mining to firing weapons etc.
It's still the same thing though. It's just a variable.
In response to Xyphon101
Kinda. Depends what level of complexity you want in your state changes.
In response to Dj dovis
i meant switching between states.. so far i have this;

Teleport_home()
icon_state = "[usr.icon_state] teleport"
sleep(5)
usr.Move(locate(/turf/start))
sleep(5)
icon_state =

but i don't know what to put to revert to the original state.. due to the "usr.icon_state" being changed i dont know how to go back to the original
In response to Nitro1009
Why dont you just use flick() on the teleport verb instead of changing your icon state?
heres the reference on flick:
http://www.byond.com/ members/?command=reference&path=proc%2Fflick
In response to Nitro1009
Nitro1009 wrote:
i meant switching between states.. so far i have this;

Teleport_home()
icon_state = "[usr.icon_state] teleport"
sleep(5)
usr.Move(locate(/turf/start))
sleep(5)
icon_state =

but i don't know what to put to revert to the original state.. due to the "usr.icon_state" being changed i dont know how to go back to the original


Set icon_state to an empty string to set it back to its original.
And for switching icon states, flick() does the trick.
In response to Dj dovis
thanks guys! this helped alot :)