x


Game Character manager

Hello, I'm creating a FPS game, and I've got the basics done. I'm wondering how I can use a manager in the scene to keep track of a players K/D, headshots, and score with one script for something like multiplayer. I have a script on the character that keeps track of K/D, headshots, and score, but it gets deleted with the character when they die, and everything gets reset(I want the character to get deleted). I want to store and continually update these stats for every player in one script so I can re-update them on the character when they respawn. How could I do this?

more ▼

asked Dec 22 '11 at 10:35 AM

DeathByWarrior gravatar image

DeathByWarrior
29 6 6 8

Put that script on another GameObject, then? One that doesn't get destroyed when the player dies.

Dec 22 '11 at 02:23 PM asafsitner

I can't because the character that gets killed by the player sends a message to the weapon used, which then sends a message upwards to the manager to record the kill and other info. I don't really want to use a different method because the one I currently use works perfectly. I need something that could store the player's stats in a class or something, update them, and set those variables back when the player dies.

Dec 29 '11 at 12:41 PM DeathByWarrior
(comments are locked)
10|3000 characters needed characters left

0 answers: sort voted first

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x1952
x1174
x274
x60
x40

asked: Dec 22 '11 at 10:35 AM

Seen: 727 times

Last Updated: Dec 29 '11 at 12:41 PM