you will need to research using killed event handlers and how to publicvariable
basically you add a killed eventhandler to each unit.
When a unit is killed, the event handler will return 2 values
Who was killed and by who
You can then check the side of the killer and add a score to their side
you could also add an individual score to the name of the killer
and then during your closing outro, you can display this in titletext messages or a hint message
Probably hint message due to the amount of units you would be displaying info for
something like the following
MISSION EDITORfor the argument of this example, create 3 west and 3 east units
name then W1,W2,W3,E1,E2 and E3
INIT.sqs;; following variables are for side scoring
tx_Wkills = 0
tx_Ekills = 0
;; following variables are for individual unit scoring
tx_W1score
tx_W2score
tx_W3score
tx_E1score
tx_E2score
tx_E3score
;; following is a killed eventhandler, this runs the playerkilled.sqs when the unit is killed (much more efficient than a series of triggers
tx_kill = player addEventHandler ["killed", {_this exec "playerkilled.sqs"}]
Playerkilled.sqs_victim = _this select 0
_killer = _this select 1
_side = side _killer
player removeEventhandler ["Killed",tx_kill]
if(side _victim == _side)then{hint "teamkill occurred";exit}
goto (format ["%1",_side])
#EAST
if (name _killer == name E1)then {tx_E1score = tx_E1score + 1;tx_Ekills = tx_Ekills + 1; {Publicvariable _x}foreach ["tx_E1score","tx_Ekills"]}
if (name _killer == name E2)then {tx_E2score = tx_E2score + 1;tx_Ekills = tx_Ekills + 1; {Publicvariable _x}foreach ["tx_E2score","tx_Ekills"]}
if (name _killer == name E3)then {tx_E3score = tx_E3score + 1;tx_Ekills = tx_Ekills + 1; {Publicvariable _x}foreach ["tx_E3score","tx_Ekills"]}
goto "END"
#WEST
if (name _killer == name W1)then {tx_W1score = tx_W1score + 1;tx_Wkills = tx_Wkills + 1; {Publicvariable _x}foreach ["tx_W1score","tx_Wkills"]}
if (name _killer == name W2)then {tx_W2score = tx_W2score + 1;tx_Wkills = tx_Wkills + 1; {Publicvariable _x}foreach ["tx_W2score","tx_Wkills"]}
if (name _killer == name W3)then {tx_W3score = tx_W3score + 1;tx_Wkills = tx_Wkills + 1; {Publicvariable _x}foreach ["tx_W3score","tx_Wkills"]}
goto "END"
#END
;;; if respawn then add the following
@alive player
tx_kill = player addEventHandler ["killed", {_this exec "playerkilled.sqs"}]
exit
your outro script would then contain the following code
_message = ""
if(tx_Wkills > tx_Ekills}then{_message = "WEST WINS"}else{_message = "EAST WINS"}
if(tx_Wkills == tx_Ekills)then{_message = "Its A Draw"}
hint formaT [ "___ FINAL OUTCOME ___\n\n%1",_message]
~10
;; following are for the individual scoring screenprint
_w1 = format ["\n%1 had %2 kills",name W1, tx_W1score]
_w2 = format ["\n%1 had %2 kills",name W2, tx_W2score]
_w3 = format ["\n%1 had %2 kills",name W3, tx_W3score]
_E1 = format ["\n%1 had %2 kills",name E1, tx_E1score]
_E2 = format ["\n%1 had %2 kills",name E2, tx_E2score]
_E3 = format ["\n%1 had %2 kills",name E3, tx_E3score]
hint formaT [ "___ INDIVIDUAL SCORES ___\n%1%2%3%4%5%6",_w1,_w2,_w3,_E1,_E2,_E3]
the above system will add a point to the side of the _killer for each death, providing it isnt a teamkill and then add a score to the killer unit's personal score
NB>> I think the only way to maintain a check on who the _killer is for a respawning unit is to refer to it by
name _unit, this is the reason for the lines
if(name_killer == name W1)then{....... etcThe above system can be made much more efficient and requiring much less lines of code by using the format command and nested arrays, however, i tried to keep it very simple to allow you to follow its logic without ctreating something which you would find unreadable and therefore not be able to adapt it more to your requirements
No doubt somebody will still do that and confuse you more, just watch for the additional posts