
Originally Posted by
NkEnNy
In your init.sqf
player addEventHandler ["killed", {(_this select 0) addscore -1}]; ?
untested, but I would expect it to work.
-k
That is exactly the same what Myke suggested. Got it already the first time (no offense, thank you for the hint
)
But as I stated meanwhile, this single line in the file init.sqs attaches that EH only the local player and not to playable/respawning AI units.
This method does NOT work for JIP'ing players playing a unit that has not been present as AI before:
Code:
in init-LINE: this addEventHandler ["Killed", {(_this select 0) addscore -1}];
Those methods don't count -score at all or add to many -score at once:
Code:
in init-LINE: this addMPEventHandler ["MPKilled", {(_this select 0) addscore -1}];
in init-LINE: this addMPEventHandler ["MPKilled", {if (isServer) then {(_this select 0) addscore -1}}];
in init-LINE: this addMPEventHandler ["MPKilled", {if (local (_this select 0)) then {(_this select 0) addscore -1}}];
The only method I found so far that works reliably under ALL circumstances as desired is to create x different
triggers for x playable units with
Code:
repeatable
condition !(alive playerX)
activation playerX addscore -1;
This works for
* playable (i.e. respawing) AI
* hosting player
* client player who already joined in lobby before map runs
* JIP'ing client player
OK, even creating 64 triggers with slightly different content takes only about three minutes with copy and paste (triggers and content).
I just thought a simple description-definition would just be fine, such as "CountDeaths = 1" (or 0)