• missing VGUI material for gamemode HUD
    4 replies, posted
  • Avatar of r0cky
  • [CODE]local hud = surface.GetTextureID( "VGUI/Hud" ) surface.SetDrawColor( 255, 255, 255, 255 ) surface.SetTexture( hud ) surface.DrawTexturedRect( 40, ScrH() -552, 512, 512 ) [/CODE]can anyone tell me why its not finding my texture in the engine it shows pink and black checkered the vtf is 512x512 and is DXT5 format the texture is located here "garrysmod\gamemodes\<my gamemode>\content\materials\VGUI\" my vmt file looks like this and is in the same folder [CODE]"unlitgeneric" { "$basetexture" "Hud" "$vertexalpha" "1" "$vertexcolor" "1" "$nolod" "1" "$translucent" "1" "$ignorez" "1" } [/CODE]
  • Avatar of disseminate
  • You're sure that the texture is Hud.vtf? Try capitalizing unlitgeneric in the vmt? Restart gmod if you haven't already?
  • Avatar of r0cky
  • [QUOTE=Disseminate;21266176]You're sure that the texture is Hud.vtf? Try capitalizing unlitgeneric in the vmt? Restart gmod if you haven't already?[/QUOTE] Unlitgeneric is now captalized restarted gmod several times i noticed most of the other .vtf textures used on vgui are in rgba8888 format so i changed it but still no luck ..im drawing this from a HUDPaint function in shared.lua i just dont know what else to try :/
  • Avatar of BastinkaLive
  • In the VMT the $basetexture must include the file path in the materials folder. In this case it would be: [code]"$basetexture" "VGUI/Hud"[/code] Also make sure capitalization is correct.
  • Avatar of r0cky
  • [QUOTE=BastinkaLive;21270271]In the VMT the $basetexture must include the file path in the materials folder. In this case it would be: [code]"$basetexture" "VGUI/Hud"[/code]Also make sure capitalization is correct.[/QUOTE] yeah how dumb of me not to notice that also had to change it to local hud = Material( "VGUI/Hud" ) for it to work which i tried b4 but it failed cos of that missed file path thanks :)