DImage | Directory

Hey guys.

Im creating a gamemode, and im too stupid to figure out where to put the Image I want to disply on my HUD… as Watermark for the gamemode.

The code with hook.Add( “HUDPaint” … )

	DermaImage:SetSize( 250, 100 )
	DermaImage:SetImage( "stunts/materials/hud/stunts.vtf" )

I have my image .vtf file here:


Its inside the gamemode, stunts folder.

Im doing something wrong, and I suppose im just too dumb to get it right.
(Please dont give me a link to this: http://wiki.garrysmod.com/page/VGUI/Elements/DImage)

[editline]21st May 2014[/editline]


[editline]21st May 2014[/editline]

Of course its in a function and the rest of the HUD is working! I just see the Pink and Black squares!

[editline]21st May 2014[/editline]

I feel so idiotic for asking this :confused:

[editline]21st May 2014[/editline]

Thanks for actually having a look at this:

(1 guest)

SetImage() is relative to the materials folder. You should be doing this instead

DermaImage:SetImage( "hud/stunts.vtf" )

Doest work. Thats the problem. :confused:

[editline]22nd May 2014[/editline]

I have the VTF file, I have the correct directory.

Do you have the .vmt file?

try without adding the .vtf to the end

You don’t have a vmt, ofcourse it isn’t going to work.

Create the same named file as the vtf, but make it a vmt and put this in it.

 "$basetexture" "path/to/icon.vtf"
 "$vertexcolor" 1
 "$vertexalpha" 1
 "$translucent" 1

Okay, alright. I will do that. Thank you very much @Rayz @Rejax @Aj for your help!