Advertisement
Guest User

How to create HUD crosshair for TF2

a guest
Oct 6th, 2012
978
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.45 KB | None | 0 0
  1. 1) First you need a custom hud for the resources and scripts folders.
  2. 2) You need font files that contain fonts that you want to use as your crosshair components. I will list out some fonts and required font files at the end.
  3. 3) Navigate to the scripts folder and paste the following in the hudlayout file at the top. It will serve as the basic crosshair building block.
  4. CrossHairNormal
  5. {
  6. "controlName" "CExLabel"
  7. "fieldName" "CrossHairNormal"
  8. "visible" "1"
  9. "enabled" "1"
  10. "zpos" "1"
  11.  
  12. "xpos" "c-15" //change this
  13. "ypos" "c-25" //change this
  14. "wide" "30" //change this
  15. "tall" "41" //change this
  16.  
  17. "font" "CrossHairNormal"
  18. "labelText" "." //change this
  19. "fgcolor" "0 255 0 180"
  20. "textAlignment" "center"
  21. }
  22.  
  23. 4) The field name will be used in your clientscheme file to adjust font settings. fgcolor adjusts the color of your crosshair values go from 0 - 255. The first 3 are for Red Green Blue. The last one is for transparency 0 being transparent and 255 being opaque.
  24.  
  25. 5) Now open up resources folder and open the clientScheme file. Locate the Fonts section by scrolling down. Within the first { paste the following in.
  26. "CrossHairNormal"
  27. {
  28. "1"
  29. {
  30. "name" "symbol" //change this
  31. "tall" "18"
  32. "weight" "0"
  33. //"additive" "0"
  34. //"antialias" "1"
  35. "outline" "1"
  36. }
  37. }
  38.  
  39. 6) What this does is it enables you to choose the type of font denoted by "symbol" which is the font i am currently using. Also it allows you to adjust the size of your hud crosshair and whether you would like an outline which is basically a shadow.
  40.  
  41. 7) Next while still inside the clientscheme file scroll all the way to the bottom. There should be a section that says custom font files. Here is what you will be inputting in this format.
  42. "9"
  43. {
  44. "font" "resource/symbol.ttf"
  45. "name" "symbol"
  46. }
  47. 8) What you will do is look at the custom font files and add that in as the next custom font file. This allows your hud to go into theresources folder where you have pasted your font file to access it and use in as a custom crosshair in our case. So using my hud as an example, my previous custom font file was "8" ie I had 8 other custom font files in use by my hud. So I am adding this font file as number 9. My custom font file in the resources folder is called symbol.ttf therefore it is shown as symbol.ttf
  48. For example if your custom font file was called example.ttf I would enter "font" "resource/example.ttf"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement