TF2 HUD Editing Guide
In-Depth: Removing Controls
Removing a control, or, hiding a control, is to stop it from being displayed on your HUD. It wont be visisble in TF2.
top
Removing a Control
There are three methods to remove a control, all of them involve changing properties of the control.
- Change visible and enabled to 0 to hide the control.
- Change wide and tall to 0 so the control has no dimensions.
- Change xpos and ypos to 9999 so the control is off the screen.
Certain properties for certain controls are animated, so not every method will work for every control.
If you're sure you want to remove the control from your HUD, you can just replace the controls properties with all three methods:
"StupidControl" { "ControlName" "CExButton" "fieldName" "StupidControl" "xpos" "9999" "ypos" "9999" "wide" "0" "tall" "0" "visible" "0" "enabled" "0" }
top
Stubborn Controls
Some controls have all 3 sets of properties animated, and wont go away. There is one example I know of:
hudplayerclass.res > PlayerStatusSpyOutlineImage
The Spy Disguise Outline Image flashes onto your screen when you change disguise as spy. It has animated visibility, size and location. So the only way to get rid of it is to change its animation. Fortunately its animation is defined in HudAnimations_tf.txt and changable.
- Open up HudAnimations_tf.txt
- Locate the Spy Disguise events, specifically:
event HudSpyDisguiseChanged
- Change the alpha value from 255 to 0
// Spy Disguise event HudSpyDisguiseChanged { Animate PlayerStatusSpyOutlineImage Alpha "0" Linear 0.0 0.2 // this line right here Animate PlayerStatusSpyOutlineImage Position "c-200 c-200" Linear 0.0 0.2 Animate PlayerStatusSpyOutlineImage Size "400 400" Linear 0.0 0.2 RunEvent HudSpyDisguiseHide 0.7 }
- Save the file, and you're done
top
Stubborn Properties
Sometimes you want to change the properties of a control, but they are either animated or locked in a scheme somewhere, so we can't.
Replacing the Control
Removing the control (using the method above) and adding in a replica control can unlock properties. The duplicated control will be editable because animations specific to the fieldName property.
Hide the original control:
"StubbornControl" { "ControlName" "CExButton" "fieldName" "StubbornControl" "xpos" "9999" "ypos" "9999" "wide" "0" "tall" "0" "visible" "0" "enabled" "0" }
Add a duplicate:
"StubbornControlDuplicate" { "ControlName" "CExButton" "fieldName" "StubbornControlDuplicate" "xpos" "c120" "ypos" "c90" "wide" "100" "tall" "50" "visible" "1" "enabled" "1" }