Game round win: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(activator/caller)
 
(29 intermediate revisions by 15 users not shown)
Line 1: Line 1:
{{wrongtitle|title=game_round_win}}
{{LanguageBar}}
==Entity Description==
{{CD|CTeamplayRoundWin|file1=entity_roundwin.cpp}}
Tells the game rules that the round has either been won (if a team is assigned) or enter Sudden Death mode (if no team is assigned).
[[File:game_round_win.png|frame|right|Entity icon by [https://developer.valvesoftware.com/wiki/Category:Ficool2_tools ficool2].]]
{{this is a|point entity|name=game_round_win|game=Team Fortress 2}} It is also available in {{bms|4}}. In {{tf2|4}} it tells the game rules that the round either has been won (if a team is assigned) or should enter Sudden Death mode (if no team is assigned). In {{bms|4}} triggers victory for either of the teams; if in deathmatch, regular end of round is triggered.
{{bug|hidetested=1|It doesn't triggers victory in {{bms|1}} if warm up time and warm up intermission time is not finished.}}


==Availability==
== Keyvalues ==
This point [[entity]] is exclusive to Team Fortress 2.
{{KV Targetname}}
 
{{KV|Force map reset|intn=force_map_reset|boolean|Force the map to reset during the force respawn after the round is over. {{bug|hidetested=1|If this is set to <code>False</code> and <code>TeamNum</code> is nonzero, the <code>RoundWin</code> input often causes crashes. It is best practice to have this set to <code>True</code> unless you have a reason not to.}}
==Keyvalues==
{{KV|Switch teams on map win?|intn=switch_teams|boolean|Switch the teams when the game is going to be reset. {{note|This overrides the setting in any {{ent|team_control_point_master}} entity.}}}}}}
* {{kv targetname}}
{{KV TeamNum}}
* {{kv tfteam}}
* '''force_map_reset'''
: <[[boolean]]> Force the map to reset during the force respawn after the round is over
* '''switch_teams'''
: <[[boolean]]> Switch the teams when the game is going to be reset.
<!--==Flags==
This entity doesn't have any flags.
-->


==Inputs==
==Inputs==
* {{i targetname}}
{{I|RoundWin|Tell the game rules the round is over.}}
* '''SetTeam'''
{{I TFTeam}}
: <integer> Changes the entity's team (this is used to determine which team has won the round (0 = none, 2 = red, 3 = blu).
* '''RoundWin'''
: Tell the game rules the round is over.


==Outputs==
==Outputs==
* {{o targetname}}
{{O|OnRoundWin|ac-is-this=1|Sent when the entity tells the game rules the round is over.}}
* '''OnRoundWin'''
: Sent when the entity tells the game rules the round is over.


[[Category:Team Fortress 2 Entities]]
== See also ==
* {{ent|game_end}}
* {{csgo}} {{ent|game_round_end}} - analogous entity

Latest revision as of 11:34, 28 May 2025

English (en)Translate (Translate)
C++ Class hierarchy
CTeamplayRoundWin
CPointEntity
CBaseEntity
C++ entity_roundwin.cpp
Entity icon by ficool2.

game_round_win is a point entity available in Team Fortress 2 Team Fortress 2. It is also available in Black Mesa Black Mesa. In Team Fortress 2 Team Fortress 2 it tells the game rules that the round either has been won (if a team is assigned) or should enter Sudden Death mode (if no team is assigned). In Black Mesa Black Mesa triggers victory for either of the teams; if in deathmatch, regular end of round is triggered.

Icon-Bug.pngBug:It doesn't triggers victory in Black Mesa if warm up time and warm up intermission time is not finished.

Keyvalues

Name (targetname) <string>[ Edit ]
The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. parentname or target).
Also displayed in Hammer's 2D views and Entity Report.
See also:  Generic Keyvalues, Inputs and Outputs available to all entities

Force map reset (force_map_reset) <boolean>
Force the map to reset during the force respawn after the round is over.
Icon-Bug.pngBug:If this is set to False and TeamNum is nonzero, the RoundWin input often causes crashes. It is best practice to have this set to True unless you have a reason not to.
Switch teams on map win? (switch_teams) <boolean>
Switch the teams when the game is going to be reset.
Note.pngNote:This overrides the setting in any team_control_point_master entity.
TeamNum:
Initial Team (TeamNum, or teamnumber Counter-Strike: Global Offensive) <choices>
Which Team the entity belongs / is assigned to on spawn
  • 0: None
  • 1: Spectator, Spectator/Halloween Souls Team Fortress 2
  • 2: RED Team Fortress 2, Survivors Left 4 Dead seriesLeft 4 Dead series, Terrorists Counter-Strike: Source Counter-Strike: Global Offensive, Marines (Team-based game modes only) Black Mesa
  • 3: BLU/Robots Team Fortress 2, Infected Left 4 Dead seriesLeft 4 Dead series, Counter-Terrorists Counter-Strike: Source Counter-Strike: Global Offensive, Scientists (Team-based game modes only) Black Mesa
  • 5: Halloween Bosses (only in Team Fortress 2) !FGD

Inputs

RoundWin
Tell the game rules the round is over.
SetTeam <integerRedirectInput/integer>
Changes the entity's team.

Outputs

OnRoundWin
!activator = !caller = this entity
Sent when the entity tells the game rules the round is over.

See also