ID:145210
 
Code:
obj
Kunailog
icon = 'Objects.dmi'
icon_state = "kunailog"
density = 1
verb
Kunai_Throw()
set name = "Kunai Throw"
set category = "Training"
set src in oview(1)
if(usr.resting == 1)
usr<<"Not while resting."
if(usr.resting == 0)
if(usr.loghits >= 350)
usr.stamina -= rand(1,8)
usr.exp += rand(5,20)
usr.loghits = 0
var/obj/kunai/K = new
K.loc = usr.loc
walk(K,src,1)
del(K)
usr << "The kunai log has been targeted too many times and has broken."
usr.Levelup()
else
if(usr.loghits <=350)
if(usr.stamina >= 0)
usr.stamina -= rand(1,8)
usr.exp += rand(5,20)
usr.loghits += 1
var/obj/kunai/K = new
K.loc = usr.loc
walk(K,src,1)
del(K)
usr.Levelup()
else
if(usr.stamina <= 0)
usr << "You are out of stamina."
return


Problem description:
okay, I'm trying to make the kunai appear and go towards the kunai log right. I have the icons, just that I don't know how to make it appear on screen and go towards the kunai log. I know there is something wrong here, but I don't know what is. Any added suggestion or anything else would be great. Thanks.

Define the object sumwhere else maybe..like for example


obj
thingy
icon = ///ok
icon_state = //ok
name = ""
density = 1
Bump(mob/M,turf/T,area/A)
if(istype(M,/mob/))
del(src)
else
if(istype(T,/turf/log))
//sum stuff here i guess
del(src)
else
if(istype(A,/area/))
del(src)

del(src)

mob/verb
Kunai_Throw()
set category = "lol"
var/obj/thingy/O = new /obj/thingy(usr.loc)
walk(O,usr.dir)
O.dir = src.dir
sleep(3)


I am just giving an example, put it in your code how you want

In response to Evidence
obj
kunailog
icon = 'Objects.dmi'
icon_state = "kunailog"
density = 1
verb/Kunai_Throw()
set name = "Kunai Throw"
set category = "Training"
set src in oview(5)
if(usr.resting)
usr << "Not while resting."
else
if(!usr.resting)
if(usr.loghits >= 350)
usr.stamina -= rand(1,8)
usr.exp += rand(5,20)
usr.loghits = 0
var/obj/Kunai/K = new(usr.loc)
K.Owner = usr
walk_towards(K,src)
usr << "The kunai log has been targeted too many times and has broken."
usr.Levelup()
return
else
if(usr.loghits <= 350)
if(usr.stamina >= 0)
usr.stamina -= rand(1,8)
usr.exp += rand(5,20)
usr.loghits ++
var/obj/Kunai/K = new(usr.loc)
K.Owner = usr
walk_towards(K,src)
usr.Levelup()
return
else
if(usr.stamina <= 0)
usr << "You are out of stamina."
return


Kunai
//icon = ''
icon_state = "Kunai"
var/mob/Owner = null
density = 1

Bump(atom/A)
if(istype(A, /obj/kunailog))
src.Owner.loghits ++
src.Owner << "You hit [A]!"
del(src)
In response to Psychotik
thanks I'll try that.