ID:156180
 
well i did some lloking about and change some of the coding to suit mine so far but for some reson this does naothing where have i gone wrong ???
mob
proc
death(mob/M)
src << "You kill [src]!"
M << "You have been killed!"
M.loc = locate(rand(1,world.maxx),rand(1,world.maxy),rand(1,world.ma xz))
M.Health = initial(Health)
if(M.Health <= 0)
src.death(M)
Not only are you handling your "death" proc all wrong, but you're also calling it recursively, which you NEVER want to do. You should check to see if the person dying's health is at or below 0 BEFORE going any further into such a proc.
mob
proc
death(mob/M)
if(M.Health <= 0)
src << "You kill [src]!"
M << "You have been killed!"
M.loc = locate(rand(1,world.maxx),rand(1,world.maxy),rand(1,world.ma xz))
M.Health = initial(Health)

You call the proc after each attack
In response to BHill
thxs i work it out a different way i relized that i had a bit of coding saying if health <= 0 Death then del src so it kept disconnecting me not but i got it all sorted

mob
proc
HurtMe(D)
Health = Health - D
if(Health <= 0)
oview() << "[src] dies!"
view() << "You died!"
Health = MaxHealth/2 // one thing how do i stop this from going into decimals??????
src.loc=locate(1,-1,-1)
sleep(30)
src.loc = locate(/turf/Respawns/N1)
In response to Jamesy577
I had no idea we could do negative coordinates >_>

Look up the round proc in the reference.
In response to Spunky_Girl
oh right i used negtive one because i want to go on a balck screen for a coplue of second before they respawn
In response to Jamesy577
Negative numbers are not necessary to achieve this effect. You can use the coordinates: 0,0,0 or simply set their loc variable to null.
object.loc = null

object.Move(locate(0,0,0))