ID:168952
 
mob
obj
katon
icon = 'housenka.dmi'
Katon_Housenka
icon_state = ""
density = 1
Bump(mob/M)
if(istype(M,/mob/))
var/damage = src.stamina/2.5
src << "You hit [M] with Katon Housenka for [damage] damage"
M << "[usr] hit you with Katon Housenka for [damage] damage"
M.stamina -= damage
move++
death(M)
del(src)


Here is my katon code,I was wondering how to check the number of spaces it has moved, once it's reached the spaces I want it to move I want to delete any ideas?
Try using the Move() proc to add to a variable, and once it reaches the max of a variable (you'll have to produce a check for it, most likely an 'if' statement), delete it. Just make sure you include ..() somewhere in there.
So, uh, why is it a /mob/obj/ , again?

Anyways, in simple terms of what CaptFalcon said,
obj/katon
var/mySteps = 0
Move()
. = ..()
if(.)
mySteps++
if(mySteps == 10)
del src


Hiead