Page 1 of 1

Creating Decals

Posted: Wed May 17, 2017 2:29 pm
by decompile
Hey Guys,

Im currently trying to create decals and use them for painting on walls (like paintball shots on wall) or maybe recreating a spray.

I read that you can use it by creating a infodecal entity, but how alone that is most likely not the only thing I guess.

Greetings

Re: Creating Decals

Posted: Wed May 17, 2017 2:42 pm
by L'In20Cible
CTEWorldDecal

Syntax: Select all

from effects.base import TempEntity
from engines.precache import Decal
from mathlib import Vector

te = TempEntity('World Decal')
te.decal = Decal('decal.vmt')
te.origin = Vector(0, 0, 0)
te.create()


EDIT: Example: viewtopic.php?f=7&t=502&p=8613

Re: Creating Decals

Posted: Thu May 18, 2017 3:16 am
by decompile
Thank you for the reply!

Just wondering if this viewtopic.php?p=9002#p9002 still relies on the TempEntity('World Decal') that you cant remove it after its 'created'?

Re: Creating Decals

Posted: Thu May 18, 2017 6:20 am
by L'In20Cible
Correct, you cannot remove it once it has been sent to clients. However, you cannot remove the one created by infodecal either. Once they are networked to clients, removing the entity server-side won't remove the decal displayed to them. The only way you have to remove decals, is to send the r_cleardecals (from memory) command which will remove all others as well. The only difference between the two, is that since client can configure the max amount of displayed decals, the temp entity will replace the oldest when creating a new one and the server-side entity won't be displayed at all if the limit has been exceeded. At least, this used to work like that on CS:S, things might have changed on CS:GO.

Re: Creating Decals

Posted: Thu May 18, 2017 10:59 am
by decompile
Thanks for the info, everything solved :)