ID:168601
 
can anyone plz make a death proc for me that makes it so that when you kill somone in my halo chao game, you gain 1 kill and the person you killed gained 1 death?
here are the vars:
mob
var
Kills = 0
hp = 25
maxhp = 25
Deaths = 0

and any other things might help me in the game plz post!
if you want to help, post it!
As I said before :

.Learn to make procs/ manipulate vars
. Check out a tutorial/demo/system on the hub

Most battle systems include death procs. They are also very simple to make if you do the first option that way you have to ask for less help..
In response to Mecha Destroyer JD
I tried to make a death proc from editing one but then it says invalid expression.
In response to Flame48
Then why don't you show us the code that you tried to edit yourself? Then we can help you fix it up.
Ok here it is.
mob
proc
Death(var/mob/killer,var/mob/victum)
killer.hp = killer.maxhp
killer.Kills += 1
victum.Deaths += 1
killer.loc = locate(1,1,1)//or whereever the spawn point is

When someone dies run this
Death(usr,src)//replace usr with the person who was the killer and replace the src with the person who got killed

I hope this helps you.
In response to ADT_CLONE
That wouldn't work I don't think..You didnt specify who the killer was...0_0
In response to ADT_CLONE
Get rid of the victim var, you don't need it, you can just do src.Death(). That would make the victim src inside of the proc. So if(src.health>=0) would mean the victim.
In response to Kalzar
no, the proc that you gave me doesn't work, it made the person who was killed and the person who killed the other person each gain 1 kill and 1 death and they were send to start, both of them.

Here's the proc that i made from editing:
mob
proc
Death(mob/M, mob/MM)
if(hp<=0)
MM.Kills+=1
M.Deaths+=1
world<<"[M.name] has been killed by [MM.name]!"
M.loc = locate(1,1,1)
else

here's the original proc:
mob
proc
Death(mob/M, mob/MM)
if(Health<=0)//If the health is less than 0.
Exp+=ExpGet
Gold+=GoldGet
oview()<<"[M] has died!"
MM<<"You gain [ExpGet]"
Levelup()
del M
else