init.sqs snippet:
WestScore = 0
EastScore = 0
(side player) exec "deathcount.sqs"
[] exec "showscore.sqs"
deathcount.sqs:
_pside = _this
#start
@!alive player
?(_pside == WEST): EastScore = EastScore + 1; publicVariable "EastScore"
?(_pside == EAST): WestScore = WestScore + 1; publicVariable "WestScore"
@alive player
goto "start"
showscore.sqs:
#start
~.1
_wscore = WestScore
_escore = EastScore
@WestScore != _wscore OR EastScore != _escore
titleText [format["West: %1 East: %2",WestScore,EastScore],"PLAIN DOWN"]
goto "start"
Properties of this system:
- Death is tracked by the player locally
- New score is reported by player to all clients on death
- Every time score is added, titleText shows new score
- AI will not count towards score
- No server intervention required
Disclaimer:
- I haven't tried any of the above code myself
- Simultaneous death of two or more players on same side could possibly stack publicVariables for unpredictable results (i.e. multi-crew vehicle death)