ID:1425944
 
(See the best response by Phat T.)

I have 500 of life but each time the npc kills me ..... but life is 0 ment every time you want to kill me life I stay at 500 and not 0 as ago I'm creadno this game is for the byond
Can you show us your code for NPCs attacking you?
Best response
mob/var/tmp/Attacking = 0//setting basic variables
mob/var/health = 10


mob
verb
Attack()
if(usr.Attacking == 0)//if the person is not attacking
//flick("attack",src) if you want the character to flick an icon, use this
for(var/mob/M in get_step(src,usr.dir)) //this is hardest part of the code lol, basically, if their is a mob in the persons next step and in the persons direction
var/damage = 10//varible damage equal to the value of 10
M.health -= damage//the person infront of you looses the variable damage(10)
world <<" [M] got hit by [src] for [damage] damage!"//outputs to the world what happend
usr.Attacking = 1//the persons attacking variable goes to 1, disabling it from attacking again
spawn(7)//waits 7 milliseconds in the background
usr.Attacking = 0//allows the person to attack again


A simple attack verb.
Have you looked at the guide? If not, here is the link.

http://www.byond.com/forum/?post=326846

Honestly, they practically have everything you need and after you're done going through a few guides, problems like the one you stated would be child's play.