• How do I make a DImage use an animated VTF texture?
    2 replies, posted
Hello there. I have an animated texture that is confirmed to be working; it is a VTF file. I would like this VTF to be used as a VGUI DImage in Garry's Mod Lua. I tried doing vgui.Create and setting it as the image; however, the image was static and not animated. Any help would be appreciated. Thank You.
local example = vgui.Create( "DImage" ) example:SetPos( 10, 20 ) example:SetSize( 380, 130 ) example:SetImage( "blabla.png" ) example.Paint = function(self, w, h) surface.SetDrawColor(255, 255, 255, 255) surface.SetMaterial(Material("overlays/fbi_openup")) --your vtf file surface.DrawTexturedRect(0, 0, w, h) end
Can you show us the VMT file? My guess is that you're not setting it proxy...
Sorry, you need to Log In to post a reply to this thread.