Item teamflag: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (SD is special delivery, not special defense)
(→‎Outputs: Updated with outputs added in November 15, 2021 update. https://www.teamfortress.com/post.php?id=101361)
Line 46: Line 46:
{{IO|OnReturn|Sent when the flag is returned via timer.}}
{{IO|OnReturn|Sent when the flag is returned via timer.}}
{{IO|OnPickup|Sent when the flag is picked up.}}
{{IO|OnPickup|Sent when the flag is picked up.}}
{{IO|OnPickup1|Sent when the flag is picked up. Passes the player as activator.}}
{{IO|OnPickupTeam1|Sent when the flag is picked up by RED.}}
{{IO|OnPickupTeam1|Sent when the flag is picked up by RED.}}
{{IO|OnPickupTeam2|Sent when the flag is picked up by BLU.}}
{{IO|OnPickupTeam2|Sent when the flag is picked up by BLU.}}
{{IO|OnDrop|Sent when the flag is dropped.}}
{{IO|OnDrop|Sent when the flag is dropped.}}
{{IO|OnDrop1|Sent when the flag is dropped. Passes the player as activator.}}
{{IO|OnCapture|Sent when the flag is captured.}}
{{IO|OnCapture|Sent when the flag is captured.}}
{{IO|OnCapture1|Sent when the flag is captured. Passes the player as activator.}}
{{IO|OnCapTeam1|Sent when the flag is captured by RED.}}
{{IO|OnCapTeam1|Sent when the flag is captured by RED.}}
{{IO|OnCapTeam2|Sent when the flag is captured by BLU.}}
{{IO|OnCapTeam2|Sent when the flag is captured by BLU.}}
Line 55: Line 58:


{{O BaseEntity|base=1}}
{{O BaseEntity|base=1}}
==See Also==
==See Also==
*<code>[[func_flagdetectionzone]]</code>
*<code>[[func_flagdetectionzone]]</code>
*<code>[[func_capturezone]]</code>, the entity normally used for marking the goal zone of a flag.
*<code>[[func_capturezone]]</code>, the entity normally used for marking the goal zone of a flag.
*[[TF2/Flag Game Types|List of gamemodes using this entity.]]
*[[TF2/Flag Game Types|List of gamemodes using this entity.]]

Revision as of 08:20, 7 March 2022

English (en)Translate (Translate)
A team flag. Don't worry; it's supposed to look like that.

Team Fortress 2 item_teamflag is a point entity available in Team Fortress 2 Team Fortress 2. This is the "flag" in Team Fortress 2, it also called "intelligence". It is also used for the bomb in the Mann vs. Machine Gamemode, the australium in special delivery, the reactor core in robot destruction and the beer bottles in player destruction.

Keyvalues

Return time (in seconds) (ReturnTime) <integer>
Length of time (in seconds) before dropped flag/intelligence returns to base.
Trail effects (trail_effect) <choices>
Trail effect to use when play is carrying the flag.
  • 0 : None
  • 1 : Both
  • 2 : Paper trail only
  • 3 : Color trail only
Neutral flag (Invade) (NeutralType) <choices>
Only used for the Invade game type. When should a dropped Invade flag become neutral?
  • 0 : Never
  • 1 : Default (30 seconds)
  • 2 : Half of the Return Time.
Scoring style (Invade) (ScoringType) <choices>
Only used for the Invade game type. When the Invade flag is captured, how should the team be rewarded? 'Score' is the team score in the scoreboard. 'Capture count' is the team capture count used in the HUD.
  • 0 : Increment score
  • 1 : Increment capture count
Return Between Waves (ReturnBetweenWaves) <boolean>
Visible When Disabled (VisibleWhenDisabled) <boolean>
Makes the flag model show even if the flag is disabled.
Icon (flag_icon) <material>
The HUD icon to use for the flag.
Paper Particle (flag_paper) <string>
The particle effect to use for the paper trail.
Trail Effect (flag_trail) <string>
The particle effect to use for the color trail.
Model (flag_model) <studiomodel>
The model to use for the flag. Defaults to models/flag/briefcase.mdl
tags (tags) <string>
Tags used for the AI bomb carrier to avoid nav areas that have matching tags. Tags need to be separated by empty space.
TeamNum:
Initial Team (TeamNum) <choices>
Which Team the entity belongs / is assigned to on spawn
  • 0: None
  • 1: Spectator/Halloween Souls Team Fortress 2
  • 2: RED Team Fortress 2
  • 3: BLU/Robots Team Fortress 2
  • 5: Halloween Bosses (only in Team Fortress 2) !FGD


TFGameType:
Game Type (GameType) <choices>
Type of game this flag will be used for.
  • 0 : CTF
  • 1 : Attack/Defend
  • 2 : Territory Control
  • 3 : Invade
  • 4 : Resource Control
  • 5 : Robot Destruction
  • 6 : Player Destruction !FGD
Start Disabled (StartDisabled) <boolean>
Stay dormant until activated (with theEnableinput).


Inputs

ForceDrop
Force the flag to be dropped if it's being carried by a player.
ForceReset
Force the flag to be dropped if it's being carried by a player, then reset the flag to its original location.
SetReturnTime <integerRedirectInput/integer>
Set the length of time (in seconds) before a dropped flag returns to base
ShowTimer <integerRedirectInput/integer>
Shows the timer icon for the length of time specified
TurnOff
Hides the model.
TurnOn
Shows the model.
skin <integerRedirectInput/integer>
Set the skin to be used


SetTeam <integerRedirectInput/integer>
Changes the entity's team.

EnableDisable:

Enable / Disable
Enable/disable this entity from performing its task. It might also disappear from view.


Outputs

OnReturn
Sent when the flag is returned via timer.
OnPickup
Sent when the flag is picked up.
OnPickup1
Sent when the flag is picked up. Passes the player as activator.
OnPickupTeam1
Sent when the flag is picked up by RED.
OnPickupTeam2
Sent when the flag is picked up by BLU.
OnDrop
Sent when the flag is dropped.
OnDrop1
Sent when the flag is dropped. Passes the player as activator.
OnCapture
Sent when the flag is captured.
OnCapture1
Sent when the flag is captured. Passes the player as activator.
OnCapTeam1
Sent when the flag is captured by RED.
OnCapTeam2
Sent when the flag is captured by BLU.
OnTouchSameTeam
Sent when the flag is touched by a player on the same team.


See Also