client
MouseDown(O)
var/mob/me = usr
if((istype(O,/obj/) || istype(O,/mob/)) && me.tkyes && !me.tkyes2)
if(istype(O,/obj/))
var/obj/is = O
if(!is.iobjmove)
return
me.tkobj = O
me.tkobjis = "obj"
if(istype(O,/mob/))
var/mob/is = O
if(!is.tkyes2)
return
me.tkobj = O
me.tkobjis = "mob"
if((istype(O,/obj/) || istype(O,/mob/)) && me.tkyes && me.tkyes2)
if(istype(O,/obj/))
var/obj/is = O
if(!is.iobjmove)
return
me.tkobj = O
me.tkobjis = "obj"
if(istype(O,/mob/))
var/mob/is = O
if(!is.tkyes2)
return
if(is==me)
return
me.tkobj = O
me.tkobjis = "mob"
MouseUp(O,loca)
var/mob/me = usr
var/r
var/e
if(me.tkobj)
if(me.class=="Half Whitelighter")
if(me.tkobjis=="obj")
for(var/I in loca)
if(!r)
r = I
else
e = I
if(r!=e)
return
var/obj/tkobjt = me.tkobj
tkobjt.tkin = 1
var/T = tkobjt.icon_state
tkobjt.icon_state = "orb out"
tkobjt.density=0
walk_towards(me.tkobj,loca,0)
if(tkobjt.icon_state)
tkobjt.icon_state = "orb in"
tkobjt.density=1
sleep(10)
tkobjt.icon_state = T
tkobjt.tkin = 0
if(tkobjt.fobj=="power")
sleep(20)
del(tkobjt)
me.tkobj = null
me.tkobjis = null
else
for(var/I in loca)
if(!r)
r = I
else
e = I
if(r!=e)
return
var/mob/tkobjt = me.tkobj
tkobjt.tkin = 1
var/T = tkobjt.icon_state
tkobjt.icon_state = "orb out"
tkobjt.density=0
walk_towards(me.tkobj,loca,0)
tkobjt.icon_state = "orb in"
tkobjt.density=1
sleep(10)
tkobjt.icon_state = T
tkobjt.tkin = 0
me.tkobj = null
me.tkobjis = null
else
for(var/I in loca)
if(!r)
r = I
else
e = I
if(r!=e)
return
walk_towards(me.tkobj,loca,0)
me.tkobj = null
Problem description: the problem is the code work completely but if i orb it to a place with density 1 it will appear a runtime error i wanted to put a protection against orb to density 1 but for same reason i cant make it find the turf to where im orbing it can anyone help me please