util.DecalMaterial fails to create a decal.

[lua]util.Decal( “PaintSplatPink”, Pos1, Pos2 )[/lua]

Works fine but,

[lua]util.DecalMaterial( “decals/decal_paintsplatterpink001”, Pos1, Pos2 )[/lua]

does not. I have also tried

[lua]util.DecalMaterial( “decals/decal_paintsplatterpink001.vmt”, Pos1, Pos2 )
util.DecalMaterial( “decal_paintsplatterpink001.vmt”, Pos1, Pos2 )
util.DecalMaterial( “decal_paintsplatterpink001”, Pos1, Pos2 )
util.DecalMaterial( “materials/decals/decal_paintsplatterpink001”, Pos1, Pos2 )
util.DecalMaterial( “materials/decals/decal_paintsplatterpink001.vmt”, Pos1, Pos2 )
[/lua]

[lua] decal = ents.Create(“infodecal”)
decal:SetKeyValue (“texture”, “decals/decal_paintsplatterpink001”)
decal:SetPos(Pos1)
decal:Spawn()
decal:Activate()
[/lua]
This one works but I cannot remove it. Both r_cleardecals and decal:Remove() fails.

The above is not the material I want to use but I am using it as an example because I know it works.

Define self.

Self is a term usually used to describe the speaker.

On topic
Anybody got an answer?

It’s possible util.DecalMaterial takes a Material object, not a texture path. Try calling it on the client with Material(“path/to/whatever”).

The Material function appears to non-existent on the server.

:

Sorry, my mistake.


 bad argument #1 to 'DecalMaterial' (string expected, got IMaterial)

Any other ideas?