ID:145809
 
Code:
obj/Genjutsu/Henge_no_Jutsu
verb
v(mob/characters/M in oview(15))
set name = "Henge no Jutsu"
set category = "Genjutsu skills"
if(usr.Chakra>=5)
var/ticon=usr.icon
var/toverlays=usr.overlays
usr.icon=M.icon
usr.overlays-=usr.overlays
usr.overlays+=M.overlays
usr.Chakra -= 2
sleep(60)
usr.icon=ticon
usr.overlays-=M.overlays
usr.overlays+=toverlays
else
alert("you dont have enough chakra to do this")


Problem description:overlays won't come back. My icon changes back but the overlays don't and it still says they're equipped.
That way sucks?
                    var/list/O = usr.overlays.Copy()
usr.overlays = usr.overlays.Remove(usr.overlays)
usr.overlays-=usr.overlays

usr.overlays+=M.overlays
sleep(100)
usr.overlays-=usr.overlays
sleep(10)
usr.overlays = O.Copy()
In response to XzDoG
Nice to see i have a coder that actually dose work for once thanks CYN
In response to FaceOff Productions
Just to tell you, making alert when something fails is not funny. Imagine being in the heat of the battle, and suddenly 5 alerts popup because you don't have the requirements.
In response to Mysame
He is too right. Alerts are the most annoying thing you can do to a player for not meeting the requirements. Outputting text is so much easier and faster.
In response to CaptFalcon33035
yeh yeh. by the way the idiot who actually replied with help had so many errors in his code it wasn't funny. Holy Retribution came through for me.
In response to CYN
CYN wrote:
yeh yeh. by the way the idiot who actually replied with help had so many errors in his code it wasn't funny. Holy Retribution came through for me.

The idiot? IM SORRY, DON'T COPY AND PASTE CODE. You aren't a programmer.
In response to XzDoG
i am sorry but he didnt copy and paste any code thats all the code i did hes just fixing it for me i cant cade and he can hes a great coder so how would you know of just one snippet eh???
In response to FaceOff Productions
Because that snippet he posted is horrible. Mine is efficent and works, if he knew what he was doing. Its tested.
In response to XzDoG
he dose know what he is doing its just i did that bit of coding there not him and i have already admited i cant bloody code!!!
In response to FaceOff Productions
Said what? Sorry, I don't understand your way of writing.
As again, FaceOff, you're wrong. Number1 reason of errors is when you copy/paste. Iden. is mostly (always) off, and why ask for help when you don't want to learn from it?

And at the threadposter:

You're really quite an ass, now, aren't you? People TRY to help you, but you call them 'idiots' when the code doesn't help you. Try 'playing' with the code, make sure nothing of your own code before or after it is wrong. If you continue like this, be sure that in the future nobody will help you.
In response to Mysame
sorry ur rite i am wrong as always better not opress the big headedness of the people of byond eh ...............
In response to Mysame
What does Ident. mean? How is he writing when he is typing?

You're right, we should not copy and paste, and if we do, we should at least indent correctly, but I don't doubt that this guy knows what 'Inconsistent Indetation' because it is the most common error given to begginers.

And FaceOff/CYN, you should really lay-off calling people idiots because if we actually are idiots, you are too, for not having any idea on how to do something. Please, do stop. It's not helping you at all to call others idiots.

Keep in mind that we have not seen the rest of your code and therefore can give you no exact solution to your problem. You'll have to work with what we give you. Lay off the bad-mouthing spawned from your ignorance. It will help you dearly in the long run.