obj/Button
icon='buttons.dmi'
New(i_state,alt_icon)
..()
if(alt_icon) //Change the icon file
icon=alt_icon
if(i_state) //Set the icon_state
icon_state = i_state
mob/proc/CreateHUD()
//A button with the original icon file
src.client.screen += new/obj/Button(i_state="Save")
//A button with the BIGbuttons.dmi icon file
src.client.screen += new/obj/Button(i_state="Logout",alt_icon='BIGbuttons.dmi')
Problem description:I'm trying to change the icon file of an object when it is created, though it doesn't appear to be working.
Also, are you sure you have set a proper screen_loc variable to the object being created?