[IMG]http://s33.postimg.org/litumi4cv/Untit1led.png[/IMG]
[CODE]
local mat = Material("sprites/lgtning")
hook.Add("PreDrawTranslucentRenderables", "blah", function()
render.SetMaterial( mat )
render.DrawBeam( Entity(1):GetPos(), Entity(1):GetEyeTrace().HitPos, 2, 0, 12, Color( 255, 255, 255, 255 ))
end)
[/CODE]
How to make this material transparent?
try this
[code]local params = {}
params[ "$basetexture" ] = "sprites/lgtning"
params[ "$translucent" ] = 1
local mat = CreateMaterial("MyNewMaterial","UnlitGeneric",params)[/code]
[QUOTE=bitches;50409738]try this
[code]local params = {}
params[ "$basetexture" ] = "sprites/lgtning"
params[ "$translucent" ] = 1
local mat = CreateMaterial("MyNewMaterial","UnlitGeneric",params)[/code][/QUOTE]
Doesn't solve
Add params[ "$additive" ] = 1 as well.
You need to restart the map before materials update.
[QUOTE=Nak;50410281]Add params[ "$additive" ] = 1 as well.
You need to restart the map before materials update.[/QUOTE]
Restarting didn't help me, but changing font name in CreateMaterial did.
Sorry, you need to Log In to post a reply to this thread.