Detect player kill (area)

Avaray

L2: Junior Member
Oct 14, 2011
72
4
Im making map similar to MGE Mod (you know - few separated 1vs1 Arenas).
At this moment im using math_counters and trigger_multiples with team filters and OnEndTouchAll outputs (when player ends touching that trigger, one point is given to enemy player).
The problem is - player can Suicide (by Kill/Explode console command). And that is counted as score for enemy.

I need to give score for players when they are Killing / are Killed (something like game_playerkill).
So my question is - Is that possible to make area that will detect player Kills (not deaths)?
area = trigger or something
 
Last edited:

Hipster_Duck

L2: Junior Member
Dec 20, 2015
99
71
Would you not want someone to get points for the other person suiciding? If not then there's going to be some tryhards suiciding when they get low on health. That's unfortunately the extent of my help and I have no idea how to take score the way you want to take the score.
 

Avaray

L2: Junior Member
Oct 14, 2011
72
4
Exactly. And I see your point. It might be a little problem, but im not affraid of that :p

I got an idea.... but I cant make it to work.
I made trigger_multiple with Output:
OnStartTouch > !activator > SetDamageFilter > filter_tf_damaged_by_weapon_in_slot
And that filter will allow damage only from Primary weapon.
Then I can make OnPass / OnFail Output in that filter...
BUT! With this method OnPass and OnFail are not working.
And suicide by console command is not counted as Damage. Its not filtering.

Edit: I tried with filter_damage_type (Generic) and also doesnt work.
 
Last edited:

Pocket

Half a Lambert is better than one.
aa
Nov 14, 2009
4,694
2,579
There must be some way to straight-up disable the Kill command, because I know it doesn't work during humiliation.
 

Pocket

Half a Lambert is better than one.
aa
Nov 14, 2009
4,694
2,579
ha ha no seriously
 

Egan

aa
Feb 14, 2010
1,375
1,721
If you are trying to filter each player in each area you can use a filter_activator_name based on the targetname you give entities with the command:
OnTrigger - !activator - AddOutput - targetname player1

for player1, player2, or like area1_p_blue, area1_p_red
and then have the game_playerkill hit all the filter_activator_name entities with a TestActivator and see which lines up - who got the kill.


I do like Hipster_Duck's idea better though because it's simpler / easier to set up.
 

Avaray

L2: Junior Member
Oct 14, 2011
72
4
If you are trying to filter each player in each area you can use a filter_activator_name based on the targetname you give entities with the command:
OnTrigger - !activator - AddOutput - targetname player1

for player1, player2, or like area1_p_blue, area1_p_red
and then have the game_playerkill hit all the filter_activator_name entities with a TestActivator and see which lines up - who got the kill.


I do like Hipster_Duck's idea better though because it's simpler / easier to set up.
I did it with your way. It works pretty neat :)
But, haha, there is one issue. If player was hitted by enemy and then he used "kill" in console, its counted as "Finishing off" (as kill).
Anyway... I like this method. Its better than my previous method. And also I can delete some huge triggers from map, thats big plus :)

Big thanks for tips :)