How to change obj's icon_state with a proc. in Developer Help
|
|
Well, I tried it, but it always failed.
This is what I got so far:
obj Titlescreen icon='Titlescreen.dmi' CHANGETITLESCREENICON() Click() var/mob/Loginscreen/M = usr M.CHECKSAVE() obj/proc CHANGETITLESCREENICON() src.icon_state="" sleep(5) src.icon_state="Text" src.CHANGETITLESCREENICON()
|
|
You can invoke the procedure when the object is created via New() (not new()):
What you just did was define a custom procedure under /obj and you modified that procedure in the titlescreen object.
Bumped() is a good example of defining a custom procedure and modifying the procedure under other objects ^_^ Forum searching is required if you want to know what I am talking about.