mob
verb
Spirit_Gun() // Verb used for firing the beam
set category = "Techniques"
set name = "Spirit Gun"
if(usr.strength <= 5)
usr<<"You dont have enough power!"
return
else // If the firing var isn't 1...
if(usr.strength >= 6)
usr.strength -= 1
usr.hp -= 2
if(usr.hp<=0)
usr.death_check(usr)
if(usr.strength<=0)
usr.strength = 0
usr.firing = 1
usr.icon_state="spiritgun"
sleep(10)
usr.icon_state=""
var/obj/spiritgun/K = new /obj/spiritgun
K.loc = usr.loc
K.dir = usr.dir
usr.level_up()
K.name="[usr]"
walk(K,usr.dir)
sleep(600)
usr.firing = 0
del(K)
if (target == null)
del(K)
usr.random = rand(1,6)
if(random == 5||random==1)
usr.exp += rand(1,10)
usr.level_up()
else
return
else
usr.random = rand (1,4)
if(usr.random == 1||usr.random == 4)
usr.strength -= 1
usr.hp -= 2
if(usr.hp<=0)
usr.death_check(usr)
if(usr.strength<=0)
usr.strength=0
usr.firing = 1
usr.icon_state="spiritgun"
sleep(10)
usr.icon_state=""// Sets the firing var to 1, so he cant fire another beam // Disables the mob's movement
var/obj/spiritgun/K = new /obj/spiritgun
K.loc = usr.loc
usr.level_up()
K.dir = usr.dir
src.name="[usr]"
src.Gowner=usr
walk(K,usr.dir)
sleep(600)
usr.firing = 0
del(K)
if (target == null)
del(K)
usr.random = rand(1,6)
if(random == 5||random==1)
usr.exp += rand(1,10)
usr.level_up()
else
return
else
usr<<"You failed to use Spirit Gun."
obj
spiritgun
icon = 'spirit gun.dmi'
icon_state = ""
density = 1
Bump(A)
if(ismob(A))
var/mob/M = A
if(M.Kaiten||M.sphere)
return
var/damage = round(usr.strength*2)
if(damage >= 1)
M.hp -= damage
var/mob/O= usr.Gowner
view(M) << "[M] was hit by Spirit Gun for [damage] damage!!"
Blood(M.x,M.y,M.z)
M.death_check(O)
del(src)
if(istype(A,/turf/))
var/turf/T = A
if(T.density)
del(src)
if(istype(A,/obj/))
del(src)
Problem description:
i keep getting this problem no matter wut i do to fix it.
the porblem is:
The gfhxfghgfh (/obj/spiritgun): Bump(the gfhxfghgfh (/mob/charactermenu))
runtime error: Cannot read 0.strength
proc name: Bump (/obj/spiritgun/Bump)
usr: 0
src: The gfhxfghgfh (/obj/spiritgun)
call stack:
.............................................................
its suppose to shoot out the spirit gun. it works fine until the bump and then i get the runtime error. can someone plz help me.