ID:139914
 
Code: So im trying to add an overlay when my character is using the rasengan technique. Yes my code is probably terrible but it's like 5 mins work so nothing is really done properly yet.
mob
var
R = new /obj/overlay/rasengan
list/Toverlays = list() //basicly technique overlays
verb
Rasengan(mob/M)
usr.icon_state = "makerasengan"
sleep(40)
usr.icon_state = ""
usr.overlays+=R
Toverlays.Add(R)
sleep(20)
var/random = rand(1,2)
for(M in get_step(usr,usr.dir))
if(random == 2)
M<<"You are hit by rasengan"
M.HP-=50
M.y-=1
sleep(1)
M.y-=1
sleep(1)
M.y-=1
else
usr<<"You miss with rasengan"
Toverlays.Remove(R)
usr.overlays-=R


Problem description: Now it's not adding the overlay icon to my character and I can't figure out why :(

mob
var
R = new /obj/overlay/rasengan//No
list/Toverlays = list() //basicly technique overlays
verb
Rasengan(mob/M)
usr.icon_state = "makerasengan"
sleep(40)
usr.icon_state = ""


mob
var
list/Toverlays = list() //basicly technique overlays
verb
Rasengan(mob/M)
var/R = new /obj/overlay/rasengan //(Yes)When you want to create new objects out of thin air, put it here
usr.icon_state = "makerasengan"
sleep(40)
usr.icon_state = ""
Yes...
In response to Kenny84
I tried that way but i fixed it in the end it was an indentation error when removing then overlay it removed straight away for some reason.