• Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/

Code Variables on multiplayer

jeremweb

Active member
Jan 1, 2011
31
3
Hello, today i've a new probleme ^^ !

I try to create a mutator who use ScoreKill(Controller Killer, Controller Killed) function. When player kill a zed, i increment a counter. The probleme is when i've test online, the counter is increment for all the players. So, I want that the counter will be individual.

Code:
class KillsZed extends GameRules;
var localized int total;

function PostBeginPlay()
{
	NextGameRules = Level.Game.GameRulesModifiers;
	Level.Game.GameRulesModifiers = Self;
        SetTimer(1, true);
	total=0;
}

function ScoreKill(Controller Killer, Controller Killed)
{
total++;
}

function Timer()  
{

...
...Very long ^^
...
..
}




defaultproperties
{
     total=0
}


Some ideas?

Thx
 
Last edited: