ID:149169
 
It won't kill the player.
mob/proc/Death()
if(usr.HP == 0)
usr << "You die! Buh-bye!"
world << "[src] dies!"
usr.Experience += 100000000000
var/savefile/F = new("[usr.ckey].sav")
Write(F)
del(src)
Drafonis wrote:
It won't kill the player.
mob/proc/Death()
if(usr.HP == 0)
usr << "You die! Buh-bye!"
world << "[src] dies!"
M.Experience += 100000000000
var/savefile/F = new("[usr.ckey].sav")
Write(F)
del(src)
In response to Branks
Branks wrote:
Drafonis wrote:
It won't kill the player.
mob/proc/Death()
if(usr.HP == 0)
usr << "You die! Buh-bye!"
world << "[src] dies!"
M.Experience += 100000000000
var/savefile/F = new("[usr.ckey].sav")
Write(F)
del(src)

I Know what I wrote.
In response to Drafonis
Drafonis wrote:
Branks wrote:
Drafonis wrote:
It won't kill the player.
mob/proc/Death()
if(usr.HP == 0)
usr << "You die! Buh-bye!"
world << "[src] dies!"
M.Experience += 100000000000
var/savefile/F = new("[usr.ckey].sav")
Write(F)
del(src)

I Know what I wrote.
Maz also knows what you wrote, and is glad o see that you get Exp for killing ppl, but thats alot if its in ur city game
umm maybe its ur HP thing, it has to equal exact zero so if its 1.2 -1.3 then it wud not die alotta games do that u can have massive mi us numbers, see if u can make it lower or equal to zero ?
In response to mazarot
How would you syntax the lower?
Drafonis wrote:
mob/proc/Death()
if(usr.HP == 0)

It's probably because you're using usr and == here. You should never use usr outside of verbs, because you never know exactly what usr is. Except in verbs, of course.

usr = the last thing that called a proc

usr isn't always what you want it to be. Change it to src.

That out of the way, you probably shouldn't be using == here. That is checking if their hit points are exactly 0. What happens if their hit points go below 0? Change == to <= here.

var/savefile/F = new("[usr.ckey].sav")

Change usr.ckey to src.ckey, or just ckey.

Good luck =)

=V