Question| Kill System, who killed who

I succeed to make the health and damage system, but now, i want to make kill system (example:“[playername] killed by [playerothername]”)

and i don’t know how to do that, it’s will be very helpull, if somebody will do help me and exmplain me, i even more-give me an example :slight_smile:
TNX.

Come on guys please help me!!

WTF why you just can’t help me, i didn’t say that i want the hole script, i just want to know how to do that, that’s it -_-, i can see that you helping to other peoples exept me, WHY!?

I have a Date that i need to publish the game to my testers, and i really need to make that killing system!

if you have successfully made your damage system ,normally it would be easy for you to know how to do that.
In your damage system normally you know who have fired the bullet and if he have hit someone and if he was death or not.
At this step you can easily find in your players list who have killed who.

lol that’s what i’m asking…
how do you find the person who kill me in the game?

well someone shoots the bullet that kills you…
so just save the gameObject in a var on the bullet then if it kills you, you check the var and you have it :). hope it helps

What the var should contain?

are you trolling?

no… -_-
what “gameObject” in to save in a var?

i sayed

and you ask what to save in the var.

the var will be filled with the player who shoots it.

i asked!, what “gameObject” do i need to save in a var?
what’s the meaning (what’s the target) on the gameObject? just simple gameObject?
how is he heloing my to find who kill me in the game?

A player shoots a bullet.
The bullet has a gameobject var and it is filled with the player who shoots it.
If someone is killed by this bullet just check the gameObject then you know who it was.

Maybe it’s better to just store the name of the player who shot the bullet.

So, if a player called Bob shoots a bullet, Instantiate the bullet and set the string stored in the bullet to “Bob” ( from the player name, depending on where you store it ), then if it hits someone, check the string variable. Simple. Although if you store the gameobject, you could give the player points for hitting someone etc.

okay so how do i set the variable of the player name, to the name of the one that shoot the bullet?

i can’t take this guy serious

realy whitout knowing how to set a var?

i asking a lot of people cause i don’t really know good english, so if you don’t have time, just stop spamming, and don’t help, that’s okay.

Yeah funny ^^

your not asking for help your asking eather for them to learn you how to program or to write you some code… please follow some tuts.

1 Like

nevermind, i did that by myself…