How to make a kill counter?

Czebosak

L1: Registered
Dec 22, 2021
1
0
Is it possible to make a kill counter?

I want to track kills because I want to make a team deathmatch gamemode.
Can anyone help me?
 

Tiftid

the Embodiment of Scarlet Devil
aa
Sep 10, 2016
535
400
OPTION A - No HUD indicators

-Make a trigger_brush entity and name it game_playerdie

-Give this entity an OnUse output, targeting your filter_red_team, with the output being TestActivator

-Create a math_counter entity, name it counter_kills_blu and give it a maximum value you like the sound of

-Give your filter_red_team an OnPass output, targeting counter_kills_blu, with the output being Add 1

-Create a math_counter entity, name it counter_kills_red and give it a maximum value you like the sound of

-Give your filter_red_team an OnFail output, targeting counter_kills_red, with the output being Add

-Create a game_round_win entity and name it round_win_red

-Give your counter_kills_red an OnHitMax output, targeting round_win_red, with the output being RoundWin

-Create a game_round_win entity and name it round_win_blu

-Give your counter_kills_blu an OnHitMax output, targeting round_win_blu, with the output being RoundWin

OPTION B - Player Destruction HUD

-Make a tf_logic_player_destruction entity, name it logic_pd and set Heal Distance and Finale Length to 0 (make sure to spend some time customising Minimum Points to Win, Maximum Points to Win and Maximum Points Per Player)

-Make a logic_auto and give it three OnMultiNewRound outputs, all targeting logic_pd - one output should be EnableMaxScoreUpdating, one output should be SetPointsOnPlayerDeath 0 and one output should be DisableMaxScoreUpdating (with a slight delay)

-Make a trigger_brush entity and name it game_playerdie

-Give this entity an OnUse output, targeting your filter_red_team, with the output being TestActivator

-Give your filter_red_team an OnPass output, targeting logic_pd, with the output being ScoreBluePoints

-Give your filter_red_team an OnFail output, targeting logic_pd, with the output being ScoreRedPoints

Hope this helps!