The Game Modding Community - Since 2001

TF2 Console Commands, Part 3

A Tutorial for Team Fortress 2

Updates

Version 12
  • Addition Added game_text_tf explanation.
  • Addition Added trigger_stun explanation.
Lukaswbrr avatar
Lukaswbrr username pic Joined 3y ago
Offline
103 points Ranked 29911th
Lukaswbrr avatar
Lukaswbrr
3mo
Version 11
  • Addition Added trigger_add_or_remove_tf_player_attributes explanation, the suprise entity.
Maybe i will add more examples for that trigger entity.
Lukaswbrr avatar
Lukaswbrr username pic Joined 3y ago
Offline
103 points Ranked 29911th
Lukaswbrr avatar
Lukaswbrr
3mo

Welcome To the Third Part of TF2 Console Commands!

Well..

Here's The First Part And Second Part of this tutorial:

  1. TF2 Console Commands
  2. TF2 Console Commands, Part 2

Now,

Let's Continue!

Now, info_observer_point.

info_observer_point?, Lemme Explain.

Marks a camera location for Team Fortress 2 players. Any spectating players (due to selecting the Spectator team or being unable to respawn at the time) have the ability to select this camera location to observe.
 Note: used for payloads, will also count as observer cameras.Certain game entities, such as the func_tracktrain used for payloads, will also count as observer cameras.
 Bug:
Failure to include spectator cameras will lead to dedicated servers crashing if all players on a team die at the same time.

 Bug:
Spectator cameras with a roll will taint the view of other spectatable objects (like players) that doesn't set the roll.

For Example:

  1. ent_create info_observer_point fov 70 targetname observer01 - Creates a info_observer_point with FOV 70.

Here how it looks like in-game.


A info_observer_point in action. I attached it to a prop_ragdoll's Eyes.

info_observer_point's Keyvalues:

Associated Team Entity (associated_team_entity) <targetname>
An entity associated with this point that can be owned by a team (such as a flag or control point). Players will only be able to use this observer point if their team owns the associated team entity.
Welcome Point (defaultwelcome) <boolean>
Set whether this camera is among the ones players may see when they first join the server. If no cameras have this set to "No", the game will pick from all cameras that are not team-bound.
FOV (fov) <integer>
Specifies the field-of-view angle. Larger numbers allow the camera to see more of the playing field. Default is 70.

Now, func_regenerate.

func_regenerate?, Lemme Explain.

Designates a resupply area for a team. This is the functional part of a resupply cabinet; it restores full health and ammunition to all players on its team who cross into its bounds.

 Note:Does not function in Arena mode.

For Example:

  1. ent_create func_regenerate model *1 targetname regenerate01 - Creates a func_regenerate with model *1.

Here how it looks like in-game.


A func_regenerate in action. If any player touches it, their health and ammo will be refiled.

func_regenerate's Keyvalues:

Team (teamnum) <choices>
Team
  • 0 : Any
  • 2 : Red
  • 3 : Blue
Start Disabled (start_disabled) <boolean>
If set, entity spawns disabled.
Associated Model (associatedmodel) <targetname>
The prop_dynamic that represents this zone in the world. The associated model should have appropriate open and close animations for when players interact with the zone.

Now, func_upgradestation.

func_upgradestation?, Lemme Explain.

An upgrade station for the Mann vs. Machine gamemode.

For Example:

  1. ent_create func_upgradestation model *1 targetname upgrade01 - Creates a func_upgradestation with model *1

Here how it looks like in-game.


A func_upgrastation in action. If a player touches it, the upgrade station menu will appear.

Now, func_capturezone.

func_capturezone?, Lemme Explain.

This entity is used in conjunction with item_teamflag for Capture the Flag maps. (For capture points in CP maps, use a trigger_capture_area)

It should be placed where it can be touched by the player so that when they are carrying the enemy intelligence, it can be captured. You only need to specify which team the capture zone belongs to (set Team to 'any' for Territory Control maps).

For Example:

  1. ent_create func_capturezone model *1 targetname capturezone01 - Creates a func_capturezone with model *1

Here how it looks like in-game.


A func_capturezone in action. If any player that is carrying a item_teamflag and touch that func entity, The item_teamflag will be captured and score the player and the team.

func_capturezone's Keyvalues:

TFTeam:

Team <choices>
Team
  • 0 : Any
  • 2 : Red
  • 3 : Blue
Capture Point <integer>
Used for Attack/Defend and Territory Control maps ONLY. This is ignored for CTF maps. Set this value to the Capture Point number for this entity.

Now... (finally)

trigger_add_or_remove_tf_player_attributes.

trigger_add_or_remove_tf_player_attributes?, Lemme Explain..

Adds/Removes attributes to/from players.

For Example:

  1. ent_create trigger_add_or_remove_tf_player_attributes spawnflags 1 add_or_remove 0 model *1 targetname attr1 attribute_name "turn to gold" value 1.0 duration 999999 - Creates a trigger_add_or_remove_tf_player_attributes that gives the player who touches the trigger the attribute "Imbued with an ancient power (turn to gold)"

More Examples Might come soon!

Here how it looks like in-game.


A trigger_add_or_remove_tf_player_attributes in action. In this screenshot, I created more trigger_add_or_remove_tf_player_attributes at the same place with different attributes so it could give me more attributes at the same time. (yes the killstreak is also a attribute)

trigger_add_or_remove_tf_player_attributes's Keyvalues:

Add or Remove (add_or_remove) <boolean>
Sets whether this entity should add or remove attributes from a player.
 Note:Adding or Removing attributes may or may not work without resorting to:
  • Respawning players inside the trigger(s) with the desired effect
  • Removing players weapons using the kill input and refreshing their loadout using Func_Regenerate entity after they have touched the trigger(s)

Attribute (attribute) <choices>
The attribute to add or remove.
Duration (duration) <integer>
How long the chosen condition lasts. -1 makes it last until the player get out of the trigger.

trigger_add_or_remove_tf_player_attributes's Reminders:

  1. It is recommended to draw your melee and then touch the trigger to give the attribute correctly. (kinda)
  2. Sometimes the entity doesnt give the player attributes for some weapons.
  3. You will have to switch classes if you want that your attribute that you got by this trigger entity be gone.
  4. The entity doesnt give the attribute at the weapon that the player is holding, it gives to the class itself (like blast resistance, health regen and stuff, you know.)
  5. Remember, that the entity has duration so you might use duration 999999 or even more higher.

List of attributes


Now, game_text_tf.

game_text_tf?, Lemme Explain.

An entity that displays text on players' screens. This text can be defined directly in the Hammer editor (unlike the similar env_message entity). This entity is suitable for stand alone bsp maps, if they are not to be localized.

 Warning: Don't use quotation characters (") in the Text Message field (not even \" characters). It will cause fatal errors with opening and/or compiling your map and may need to be fixed by manually editing the VMF in a text editor. Instead, you use detailed quotes (i.e.  and ).

 Note: This entity will not display when using the TF2 minimal HUD.

For Example:

  1. ent_create game_text_tf message Demo background 2 targetname texttf01 icon ammo_c4 - Creates a game_text_tf with message "Demo".
  2. ent_fire game_text_tf Display - Forces the entity to display the message.

Here how it looks like in-game.


A game_text_tf in action. It might don't work on MvM if the wave didn't started.

game_text_tf's Keyvalues and Inputs:

Message Text (message) <string>
Message to display onscreen.
Icon (icon) <string>
Hud icon ( from mod_textures.res ) to display.
Audience (display_to_team) <choices>
Filters which team(s) will see this message.
  • 0 : Everyone
  • 2 : Red Team Only
  • 3 : Blue Team Only
Background Panel Color (background) <choices>
Color of the text panel.
  • 0 : Grey
  • 2 : Red
  • 3 : Blue
Display
Display the message text.

Now, trigger_stun.

trigger_stun?, Lemme Explain.

A trigger volume that induces a stun effect on players.

For Example:

  1. ent_create trigger_stun stun_type 1 stun_effects 1 stun_duration 2 model *1 targetname stun01 spawnflags 1 - Creates a trigger_stun that affects player's Controls and Movement.

Here how it looks like in-game.


A trigger_stun in action. If any player touches that trigger, them will be stunned and I changed stun_effects value to 0, so that's why it didnt do the effects.


A trigger_stun in action. I changed the stun_type value to 2, so it will make the player in loser state.

trigger_stun's Keyvalues:

Stun type (stun_type) <choices>
To do: add description
  • 0 : None
  • 1 : Sandman stun
  • 2 : Humiliation/Fear mode
Scared effects (stun_effects) <boolean>
Enables the 'scared' particle effects. Does not work if stun type is none. Scream sound only plays if stun type is Fear.
Duration (stun_duration) <float>
Time in seconds that the player will remain under the effects of this trigger after leaving its area.
Move speed reduction (move_speed_reduction) <float>
Reduce maximum speed by this fraction of base max speed (450), this is not class dependent. 0 = no reduction. 1 = total reduction, no movement. Example: 0.3 = Reduction by 30% of 450 = 315 max speed = only scout and medic will notice a change.
Delay (trigger_delay) <float>
Time in seconds after entering the trigger before the player is affected. Will occur immediately if the player exits the trigger before this time. This also delays OnStunPlayer firing.


And That's it!

But Don't Worry..

I will put more Commands and Explanations on this Tutorial!

(If i have free time to put more commands and explanations..)

Bye!

Updates:

Version 12 (Minor Update)

  • -Added game_text_tf explanation.
  • -Added trigger_stun explanation.

Version 11 (Minor Update)

  • -Added trigger_add_or_remove_tf_player_attributes entity explanation, the suprise entity..

Version 11 BETA 3 (Minor Update)

  • -Added func_capturezone explanation.
  • -Added func_upgradestation explanation.
  • -Added a entity that the explanation might come soon on the tutorial.

Todos

Outputs explanation..

Posts

  • 3mo
    Will you add the command to spawn in an area where the intel goes back to after its timer runs out?

    8

    I fix things avatar
    Mantra
    I fix things
  • 3mo
    Help, I've only been able to get trigger_add_or_remove_tf_player_attributes to work only once.
     avatar
    Mantra
  • 3moEdited 3mo
    Mr.Panface avatar
    Mr.Panface Joined 5mo ago
    Offline
    Panfaced Faux Flag Affiliation: Panfaced Faux
    257 points Ranked 16093rd
    Really good! I would recommend changing your headers once in a while. also please add the thing that gives what seems to be gaben's powers.

    also! If I were to remove or teleport the func_capturezone to out of the map what would the bots do? and would the game crash?

    I mean it is possible to delete yourself (ent_remove_all player) and to crash the game by removing the timers on a KoTH map (ent_remove_all team_round_timer). so i'm just curious!

    9.3

    • Thanks x 1
    TF2 Hud & Script creator

Embed

Share banner
Image URL:
HTML embed code:
BB embed code:
Markdown embed code:

Credits

Creators
Lukaswbrr avatar
Lukaswbrr username pic Joined 3y ago
Offline
103 points Ranked 29911th
Creator of this Tutorial.
Special Thanks
Team Fortress 2 Wiki
For the console commands wiki.
Valve Developer Community
For the inputs, entities and outputs list.

Submitter

Lukaswbrr avatar
Lukaswbrr username pic Joined 3y ago
Offline
103 points Ranked 29911th

Lukaswbrr avatar
Lukaswbrr

Creator
Sign up to access this!
Sign up to access this!
Sign up to access this!
Sign up to access this!

Category

Details

Difficulty Level
Beginner Difficulty

Attributes

Share

  • Share on Reddit
  • Share on Twitter
  • Share on Facebook
  • Share on Google+

Stats

  • 1,661 Views
  • 14 Posts
  • 3mo Submitted
  • 2mo Modified
  • 3mo Updated

Scores

80 bScore
8.6 Rating

2 voters

Sign up to access this!

SEX! Ok, we got your attention. Mascot

GameBanana is one of the oldest mod sites on the net. Sign up and maximize your browsing experience.

  • Subscribe: Get notified of new submissions like this.
  • Say Thanks: Show your appreciation - send modders points.
  • Post: Give modders your thoughts on their work.
  • Vote: Help your favorite modders win monthly awards.
  • Rate: Rate mods and help them stand out.
  • Flag: Alert moderators and warn members of problems with mods.
  • Watch: Get notified when mods are updated.

Join the community! Sign up now!

Already a Bananite? Login

bcp.crwdcntrl.net tracking pixel