Skip to content

SpawnDecal

Puts a decal of a material on whatever is at a point.

A mark on the ground under a spawn, a stain on a wall: material is one of the game’s decal materials (the decal materials: Materials/decals/decal_blood_a, decal_burned_ash, chalk_cross …), size metres across, seconds how long it stays (0 = the engine’s own default). normal is which way the decal faces - {x, y, z} or three numbers; a floor (0, 0, 1) without it. The same reach and return as SpawnEffect.

SpawnDecal(material, x, y, z [, size, seconds, normal, world])
Parameter Type
material string the decal material
x number metres
y number metres
z number metres
size number metres across (1) (optional)
seconds number how long it stays; 0 = the engine’s default (optional)
normal table | number which way it faces as {x=, y=, z=} (or three numbers nx, ny, nz); a floor without (optional)
world number the virtual world (0) (optional)

number - how many players got it

-- a mark on the arena floor where the loser fell
local x, y, z = GetPlayerPos(loser)
SpawnDecal("Materials/decals/decal_blood_a", x, y, z, 1.5, 120)

SpawnEffect · PlaySound · the Effects and sounds group of the index