ID:150186
 
how can i make it so Pbags dont die?
What's a pee bag? And you should look up the client var and note that all NPC's clients are null.
Just return where it says damage -= (whatever here)
replace that with

return

It will not do anything to whatever.

LJR
obj/pbag
Click()
var/combatrecord = "Newbie"
usr << "you attack the pbag!"
pbag.health++
ifnot(pbag.health>=#INF) pbag(del)
else
usr << "The pbag is too strong for you!"
spawn() usr.Rerout(src)
usr.health--
ifnot(usr.health--) usr << "You're are destroyed!"
var/mob/usr/U = new(null)
usr = U
usr(del)
else
usr<< "You resist the pbags assault"
usr.combatrecord++
new(pbag)
pbag = new()
if(pbag.health++)
pbag.health = #INF

mob/proc/Rerout(zmax)
if(zmax.combatrecord>=10)
zmax.recurse_rate=2
else return 0

//regenerates the pbag
//don't forget to assign a health variable to the
//pbag and the usr, or else it won't work.


But, you're still probably better off waiting until you understand the code better before you try making things as complicated as immortal pbags. Some new coders just skip them and try some other alternative instead.