ID:175303
 
I am trying to make a verb, that makes u disappear, then reappear about 10 seconds later.

i used code:
obj
Shadow
verb
Shadow_Stalk()
set category = "Fighting"
view(6)<<"[usr] disappears!"
for(var/a in overlay)
overlaysave += a
overlays -= a
for(var/a in underlays)
underlaysave += a
underlays -= a
usr.icon = 'shadow.dmi'
sleep(5)
usr.icon = ""
sleep(rand(20,200))
if(usr.skin=="Pale")
usr.icon = 'male-white.dmi'
if(usr.skin=="Tan")
usr.icon = 'male.dmi'
if(usr.skin=="Dark Black")
usr.icon = 'male-black.dmi'
if(usr.skin=="Olive")
usr.icon = 'male-olive.dmi'
view(6)<<"[usr] reappears!"
for(var/a in overlaysave)
overlaysave -= a
overlays += a
for(var/a in underlaysave)
underlaysave -= a
underlays += a

//---------------------------------------------------
But my clothes never dissappear!
can anyone help?
(P.S please help with my other post further down the page)
Higher up in your code it should be for(var/A in overlays).
I have not tried myself, but I am almost certain that it has been proven that you cannot loop through overlays like you are trying to do. However, there is an easier way to accomplish the effect you desire, and that would be by changing the player's invisibility var.
In response to OneFishDown
Thanks man, I'll try that!
In response to Jon88
Thank you!!! Thank You ALL!!!!
I have got it to work.
I just wish someone would help with my other post "Odd Errors" which is back a coupla pages.