ID:145757
 
Code:
    DeathCheck()
if(src.hp <= 0)
src << "You have died!"
sleep(10)
src.loc=locate(7,7,1)
else
del(src)
Die()


Problem description:

ok this might not be it, but when i kill an enemy..he dies...but afterwards i cant move nor attack anymore. the game basically freezes..anyone know wtf happend?
ok your not realy being spcfic enough, are you geting any runtimes or any thing do you have somethig that is looping thats frezzeing the game.post the Die() code plese
In response to National Guardsmen
Die()
view() << "[usr] killed [src]"
if(enemy)
EndBattle_Player_Win(usr, src)
else
EndBattle_Player_Lose(usr, src)

you mean this?
In response to KamuraiKin
hmm is the battle system turnbased or something.because if its not u an get rid of the die proc.
In response to National Guardsmen
turnbased
When you delete an object, all procs that are running get stopped. You have to call Die() before you delete src.

~~> Unknown Person
In response to Unknown Person
ok i did that but not it just kills the mob, it doesnt go through the damage process, just says you hit whatever for whatever and then kills it and its below the mobs max hp
In response to KamuraiKin
No put usr in proc. Ungh.

Your Die() and DeathCheck() procs both need to receive an argument: the killer. Use that in place of usr.

Lummox JR
Wait, what the hell?

    DeathCheck()
if(src.hp <= 0) //So, I'm dead. =/
src << "You have died!"
sleep(10)
src.loc=locate(7,7,1)
else //Wait, I'm not dead! =O
del(src) //No! Don't delete me! I could be a player!
Die() //Hm, I've been booted, plus the proc stopped before this line because you deleted me, you jackass. =P


So, lemme fix it up a bit.

    DeathCheck()
if(src.hp <= 0) //So, anyway. Like I was saying. I'm dead. =/
src << "You have died!"
sleep(10)
src.loc=locate(7,7,1)


I'm also not taking into account that you don't pass an arg to DeathCheck()...

Fine, fine. I'll fix it too.

    DeathCheck(mob/killer)
if(src.hp <= 0)
src << "You have been killed by [killer]!"
oview(src) << "[killer] killed [src]!"
sleep(10)
src.loc=locate(7,7,1)

/*
if(enemy)
EndBattle_Player_Win(killer,src)
else
EndBattle_Player_Lose(killer,src)
I'm not quite sure what the hell you're trying to do here, but I'll leave it up to you to put it back into the code.*/


Now remember to call DeathCheck() with an arg. (That arg being the killer.)