Bump(atom/M)
if(isturf(M)) // If whatever the head bumps is a turf..
owner.fired = 0 // Allow the owner to fire another beam
owner.move = 1 // Allow them to move
for(var/obj/O in src.Beam) // Checks for objects in the Head's Beam list...
del(O) // Deletes any objects found
del(src) // Deletes the head
else if(ismob(M))
var/mob/A = M
var/damage = rand(src.owner.Reip/3)
A.Health -= damage
if(A.Health <= 0)
A.Death(A)//Here is where you would want to add damage or such ect..
// If whatever the head bumps is a mob...
view(src.owner) << "[src.owner]'s sword hits [M] for [damage] damage!" // For all in the owner's view, gives a message
owner.fired = 0 // Allows the owner to fire another beam
owner.move = 1 // Allows them to move
for(var/obj/O in src.Beam) //For all objects in the Head's Beam list...
del(O) //Delete any objects found
del(src) // Delete the head
else
if(!ismob(M) && !isturf(M) && !isobj(M) && !isarea(M))
owner.fired = 0 // Allow the owner to fire another beam
owner.move = 1 // Allow them to move
for(var/obj/O in src.Beam) // Checks for objects in the Head's Beam list...
del(O) // Deletes any objects found
del(src) // Deletes the head
============death check proc============
proc
Death(mob/M)
if(src.inko==1)
return
if(istype(src,/mob/monster/Weak_Hollow ))
usr<<"You have defeated a Weak Hollow!, Your Hollow Killing Rank has been raised"
usr.Weakhollowkills+=1
usr.Exp+=src.expgive
usr.Expover()
del(src)
return
if(istype(src,/mob/monster/Medium_Hollow))
usr<<"You have defeated a Snake Hollow!, Your Hollow Killing Rank has been raised"
usr.Snakehollowkills+=1
usr.Exp+=M.expgive
usr.Expover()
del(src)
return
if(istype(src,/mob/monster/Spider_Hollow))
usr<<"You have defeated a Spider Hollow!, Your Hollow Killing Rank has been raised"
usr.Spiderhollowkills+=1
usr.Exp+=src.expgive
usr.Expover()
del(src)
return
if(src.client&&src.Health<=0)
src<<"You got knocked out"
src.overlays+='ko.dmi'
src.move=0
src.Spirit+=40
src.inko=1
sleep(100)
src.inko=0
src.overlays-='ko.dmi'
src.Health=src.Mhealth
src.move=1
src<<"You gained concious" //death proc with M as usr or as the creature you killed
if(src.client&&src.Spirit>=99)
src<<"Good job, You got owned"
src.loc = locate(32,24,4) //sends M to 1,1,1 on map
src.Spirit=0
src.Health = src.Mhealth
src.Rei=src.Mrei
==========run time ========
runtime error: Cannot read 0.Snakehollowkills
proc name: Death (/mob/proc/Death)
usr: 0
src: Snake Hollow (/mob/monster/Medium_Hollow)
call stack:
Snake Hollow (/mob/monster/Medium_Hollow): Death(Snake Hollow (/mob/monster/Medium_Hollow))
Head (/obj/Beams/Head): Bump(Snake Hollow (/mob/monster/Medium_Hollow))
Head (/obj/Beams/Head): Move(Grass (49,35,1) (/turf/Grass), 2)
Head (/obj/Beams/Head): Move(Grass (49,35,1) (/turf/Grass), 2)
Head (/obj/Beams/Head): Move(Grass (49,35,1) (/turf/Grass), 2)
Problem description:
So the problem is that whenever my beam attacks the mob it doesnt die and it gives me a runtime, can anyone help?
Lummox JR