when u die i had it so u would log out.... but it changed it to this
mob
attack(mob/M as mob in oview(1))
usr << "You attack [M]!"
oview() << "[usr] attacks [M]!"
var/damage = rand(1,10)
world << "[damage] damage!"
M.HP =- damage
M.DeathCheck()
mob/proc
DeathCheck()
if (HP <= 0)
usr.loc = locate(14,2,1)
world << "[src] dies!"
where would i put the usr.loc thing (if thats even right...)
because right now the person who attacked goes to those coordinates
ID:178546
Apr 28 2002, 9:39 am
|
|
Aleis wrote:
when u die i had it so u would log out.... but it changed it to this Edit: forgot to add mob/M at the top. |
mob/proc Thats what the DeathCheck() proc should be,then you should be fine.Also,look at my Attack System -Kappa the Imp |
In response to Kappa the Imp
|
|
it says that it has an indentation error when i do this.....
mob/proc DeathCheck(mob/M as mob) if (M.HP <= 0) // the error is here M.loc = locate(14,2,1) world << "[M] dies!" about that |
In response to Aleis
|
|
mob/proc/DeathCheck(mob/M)
if (M.HP <= 0) M.loc = locate(14,2,1) world << "[M] dies!" |
In response to Aleis
|
|
Aleis wrote:
it says that it has an indentation error when i do this.....mob/proc/DeathCheck(mob/M as mob) if(M.HP <= 0) // the error is here M.loc = locate(14,2,1) world << "[M] dies!" |
src.loc = locate(coords)