Item teamflag: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
(Updated with data from tf-abs.fgd)
Line 1: Line 1:
{{wrongtitle|title=item_teamflag}}
[[File:Item Flag tf.JPG|thumb|right|200px|A team flag. Don't worry; it's supposed to look like that.]]
{{Tf2 point}}
{{TOC|left}}
[[Image:Item Flag tf.JPG|thumb|right|200px|A team flag. Don't worry; it's supposed to look like that.]]{{clr}}


== Entity description ==
{{tf2 point|item_teamflag}}
Team Fortress 2 flag entity.


== Keywords ==
==Entity description==
* {{KV Targetname}}
Team Fortress flag entity.
* {{KV Angles}}
* '''GameType'''
: <choices> Type of game this flag will be used for.
:{| class=standard-table
| Literal Value || Description
|-
| 0 || CTF
|-
| 1 || Attack/Defend
|-
| 2 || Territory Control
|-
| 3 || Invade
|-
| 4 || King of the Hill
|}
* {{KV TFTeam}}
* {{KV EnableDisable}}
<!--
== Flags ==
This entity doesn't have any flags.
-->
== Inputs ==
* {{I Targetname}}
* {{I EnableDisable}}
* '''Skin''' (not in fdg)
: <integer> Sets the skin of the entity. (0 = red, 1 = blue, 2 = gray)
* '''SetTeam'''
: <integer> Sets the team of the entity. (0 = any, 2 = red, 3 = blue)


== Outputs ==
==Keyvalues==
* {{O Targetname}}
{{KV Targetname}}
* '''OnReturn'''
{{KV Parentname}}
: Sent when the flag is returned via timer.
{{KV Angles}}
* '''OnPickUp'''
{{KV EnableDisable}}
: Sent when the flag is picked up.
{{KV TFTeam}}
* '''OnDrop'''
{{KV TFGameType}}
: Sent when the flag is dropped.
{{KV|Return time (in seconds)|integer|Length of time (in seconds) before dropped flag/intelligence returns to base.}}
* '''OnCapture'''
{{KV|Trail effects|choices|Trail effect to use when play is carrying the flag.}}
: Sent when the flag is captured.
:* 0 : None
:* 1 : Both
:* 2 : Paper trail only
:* 3 : Color trail only
{{KV|Neutral flag (Invade)|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.
{{KV|Scoring style (Invade)|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
 
==Flags==
{{I TFTeam}}
 
==Inputs==
{{I Targetname}}
{{I Parentname}}
{{I Angles}}
{{I EnableDisable}}
{{IO|ForceDrop|Force the flag to be dropped if it's being carried by a player.}}
{{IO|ForceReset|Force the flag to be dropped if it's being carried by a player, then reset the flag to its original location.}}
{{IO|SetReturnTime|Set the length of time (in seconds) before a dropped flag returns to base|param=integer}}
{{IO|TurnOff|Hides the model.}}
{{IO|TurnOn|Shows the model.}}
{{IO|skin|Set the skin to be used|param=integer}}
 
==Outputs==
{{O Targetname}}
{{IO|OnReturn|Sent when the flag is returned via timer.}}
{{IO|OnPickup|Sent when the flag is picked up.}}
{{IO|OnPickupTeam1|Sent when the flag is picked up by RED.}}
{{IO|OnPickupTeam2|Sent when the flag is picked up by BLU.}}
{{IO|OnDrop|Sent when the flag is dropped.}}
{{IO|OnCapture|Sent when the flag is captured.}}
{{IO|OnCapTeam1|Sent when the flag is captured by RED.}}
{{IO|OnCapTeam2|Sent when the flag is captured by BLU.}}
{{IO|OnTouchSameTeam|Sent when the flag is touched by a player on the same team.}}


== See also ==
== See also ==
* [[func_capturezone]]
* [[func_capturezone]]
* [[TF2/Flag Game Types|List of flag game types]]
* [[TF2/Flag Game Types|List of flag game types]]
[[Category:Team Fortress 2 Entities]]

Revision as of 21:57, 9 May 2011

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.

Entity description

Team Fortress flag entity.

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

Parentname:
Parent (parentname) <targetname>
Specifies a movement parent. An entity will maintain its initial offset from its parent. An attachment point can be added to the end of the name, separated by a comma.
Pitch Yaw Roll (Y Z X) (angles) <QAngle>
This entity's orientation in the world. Pitch is rotation around the Y axis, yaw is the rotation around the Z axis, roll is the rotation around the X axis.
Start Disabled (StartDisabled) <boolean>
Stay dormant until activated (with theEnableinput).
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
Return time (in seconds) ([todo internal name (i)]) <integer>
Length of time (in seconds) before dropped flag/intelligence returns to base.
Trail effects ([todo internal name (i)]) <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) ([todo internal name (i)]) <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) ([todo internal name (i)]) <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

Flags

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

Inputs

Parentname:
SetParent <stringRedirectInput/string>
Move with this entity. See Entity Hierarchy (parenting).
SetParentAttachment <stringRedirectInput/string>
Change this entity to attach to a specific attachment point on its parent. The entity will teleport so that the position of its root bone matches that of the attachment. Entities must be parented before being sent this input.
SetParentAttachmentMaintainOffset <stringRedirectInput/string>
As above, but without teleporting. The entity retains its position relative to the attachment at the time of the input being received.
ClearParent
Removes this entity from the the movement hierarchy, leaving it free to move independently.

Template:I Angles EnableDisable:

Enable / Disable
Enable/disable this entity from performing its task. It might also disappear from view.
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
TurnOff
Hides the model.
TurnOn
Shows the model.
skin <integerRedirectInput/integer>
Set the skin to be used

Outputs

OnReturn
Sent when the flag is returned via timer.
OnPickup
Sent when the flag is picked up.
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.
OnCapture
Sent when the flag is captured.
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