ID:177152
![]() Oct 23 2002, 3:03 am
|
|
i know its stupid but i have never really used icon states in my games! so could someone tell me the code to change icon states
|
Copyright © 2025 BYOND Software.
All rights reserved.
icon_state = "green"
Of course, you can substitue the name for whatever you want, it could be "blue" "pink" "fighting" "dead" or whatever. A good way to add this in a verb, so a user can change their own icon_state, is like this..
By putting usr.icon_state, we are using a "reference" (at least thats what I call them. Some people say 'pointer'), which basically points to a certain object, mob, or whatever, and tells the code to modify that mob's variables. Hopefully this makes a bit of sense to you?
[atom to change variable].icon_state = "[new state]"
~Polatrite~