for(var/mob/P as mob in range(2,usr))
if(usr.evil && M.indemonschool){P.inmagicschool=1; usr.inmagicschool=1}
if(usr.good && M.inmagicschool){P.inmagicschool=1; usr.inmagicschool=1}
if(M.inhell){P.inhell = 1; usr.inhell = 1}
if(!M.inhell){P.inhell = 0; usr.inhell = 1}
if(P.shimerexept)
var/obj/A = new(locate(P.x,P.y,P.z))
var/obj/B = new(locate(usr.x,usr.y,usr.z))
A.layer = 1000; P.Freeze = !usr.Freeze; usr.Freeze = !usr.Freeze
A.icon = 'magicgood2.dmi'
B.icon = 'magicgood2.dmi'
B.layer = 1000
flick("[usr.Teleport]",A)
flick("[usr.Teleport]",B)
hearers()<< "[P] teleports out!"
spawn(5)
P.invisibility = !P.invisibility
del A; del B
sleep(7)
P.x = M:x
P.y = M:y+1
P.z = M:z
usr.x = M:x
usr.y = M:y+1
usr.z = M:z
P.dir = SOUTH
usr.dir = SOUTH
M << "[P] teleported behind you!"
A = new(locate(P.x,P.y,P.z))
A.layer = 1000
A.icon = 'magicgood2.dmi'
flick("[usr.Teleport]",A)
B.layer = 1000
B.icon = 'magicgood2.dmi'
flick("[usr.Teleport]",B)
hearers()<< "[P] teleports in!"
spawn(5)
del A; del B; P.Freeze = !P.Freeze; usr.Freeze = !usr.Freeze
P.invisibility = !P.invisibility; usr.invisibility = !usr.invisibility
return
Problem description:
Ok so I'm trying to make this teleport verb that teleports the usr and anyone withing range(2) of usr. So the problem I'm having is trying to get the icon over the mobs. I've tried using flick(), overlays, flicking the icon over an invisible obj ontop of the usr. When I use overlays it rushes the icon for some reason so I've been using flick, but it still rushes when use on the mob so I use the flick on an obj that's over that mob for my other teleports, except now adding more people idk... confuses it? And only does one at a time idk. There's probably many WAY more efficient ways of doing this lol but this is what I have so far.