Hello facepunch! Need some help with overlays, so erm, where do i begin?
The Problem: The problem is that the texture doesn't seem to want to load properly, and throws random lines on the screen, etc. It is animated, but the .vmt seems to be okay.
Screenshot: [url]http://steamcommunity.com/sharedfiles/filedetails/?id=721150514[/url]
The code:
LUA code to load in the texture every time the game loads up:
[CODE]list.Set( "OverlayMaterials", "Rust Near Death", { Material = "blacksnow/rustneardeath", Icon = "blacksnow/rustneardeath" } )[/CODE]
The .vmt file:
[CODE]"LightMappedGeneric"
{
"$baseTexture" "blacksnow/rustneardeath"
"$surfaceprop" "Default"
"Proxies"
{
"AnimatedTexture"
{
"animatedTextureVar" "$basetexture"
"animatedTextureFrameNumVar" "$frame"
"animatedTextureFrameRate" "1"
}
}
}[/CODE]
Hope someone can help me with this :)
Try using "UnlitGeneric" as the shader - if it's lightmapped I think the lighting calculation screws up since it's flat
[QUOTE=MPan1;50682693]Try using "UnlitGeneric" as the shader - if it's lightmapped I think the lighting calculation screws up since it's flat[/QUOTE]
Seems to be working, but now i want to make it translucent, so i could see through it, how do i do that?
[CODE]$translucent 1 -- only works if the VTF has transparency already[/CODE]
Unless you mean you want to be able to change the transparency ingame to any number
[QUOTE=MPan1;50684584][CODE]$translucent 1 -- only works if the VTF has transparency already[/CODE]
Unless you mean you want to be able to change the transparency ingame to any number[/QUOTE]
"Error: Expected open brace on line 6"
[url]http://www.mediafire.com/download/n64v2qonjw4m979/rustneardeath.vtf[/url] heres the .vtf file if you want to take a look at it yourself.
Where'd you put the $translucent thing in the VMT?
[QUOTE=MPan1;50684655]Where'd you put the $translucent thing in the VMT?[/QUOTE]
"UnlitGeneric"
{
"$baseTexture" "blacksnow/rustneardeath"
"$surfaceprop" "Default"
"Proxies"
"$translucent" 1
{
"AnimatedTexture"
{
"animatedTextureVar" "$basetexture"
"animatedTextureFrameNumVar" "$frame"
"animatedTextureFrameRate" "1"
}
}
}
Try moving it to be below the baseTexture line instead- it's not a proxy
Also, that texture should work since the alpha channel looks good
[QUOTE=MPan1;50684669]Try moving it to be below the baseTexture line instead- it's not a proxy[/QUOTE]
It works now, but it's not animated when i activate the overlay:
[url]http://steamcommunity.com/sharedfiles/filedetails/?id=721602625[/url]
EDIT:Oh it actually does but it's slow as hell, how do i change the speed of it?
Change the 1 in "animatedTextureFrameRate" "1" to be a bigger number - the 1 means the amount of times it cycles in 1 second
[QUOTE=MPan1;50684689]Change the 1 in "animatedTextureFrameRate" "1" to be a bigger number - the 1 means the amount of times it cycles in 1 second[/QUOTE]
Perfect! Thanks a lot!
Sorry, you need to Log In to post a reply to this thread.