I try acess one obj in usr.overlays but i can't , anybody knwo how make this?
first i try this code but not work
for(var/obj/Hair/S in usr.overlays)
S.icon_state="[NumberHair]"
Please Help me
ID:1216241
Mar 27 2013, 4:26 am (Edited on Mar 27 2013, 4:35 am)
(See the best response by Murrawhip.)
|
|
Mar 27 2013, 6:34 am
|
|
Are you using a verb? If you are in a proc you should not be using usr. Please use <dm> tags so we can see the code. More code than this would also be helpful to find the issue. At least post the whole section of code this is in.
|
One method is to keep the overlays in a separate list and then apply them when necessary.
mob/var/list/Overlays = list() That way you can modify the objects in Overlays and then call applyOverlays() for the changes to take effect. |