mob/verb/DEBUG1()
flick("rawr",usr)
This only changes/flicks my players icon. How can I get it to flick the overlays as well? (Yes, they are named 'rawr' also.(The icon states for the overlays)).
ID:168861
![]() Aug 20 2005, 2:20 am (Edited on Aug 20 2005, 2:36 am)
|
|
mob/verb/DEBUG1() This only changes/flicks my players icon. How can I get it to flick the overlays as well? (Yes, they are named 'rawr' also.(The icon states for the overlays)). |
![]() Aug 20 2005, 3:06 am
|
|
Subtract the original overlay, add the new one.
|
Sinoflife wrote:
Subtract the original overlay, add the new one. > usr.overlays-=/obj/rawr I shouldn't have to do that. flick() should work and do what it's supposed to. |
The icon_state of each and every one of an atom.overlays is equal to atom.icon_state. You can't change the icon_state of an atom without changing the icon_state of its overlays. I asked this same question when I first started on BYOND.
|
Basically meaning(for those of you who didn't catch it), changing the icon_state changes the state of all overlays to the same state. I much prefer changing icon_state than using flick as it can be tested. Like if(icon_state=="state"). After changing the state you can just use spawn to set a delay before returning to the calling state.
Hiead |
Branks wrote:
The icon_state of each and every one of an atom.overlays is equal to atom.icon_state. You can't change the icon_state of an atom without changing the icon_state of its overlays. I asked this same question when I first started on BYOND. Gee, that sounds familiar: [link]. Branks, when you copy and paste text from somebody else's post, you need to cite it. Otherwise, you're plagiarizing. |