Skip to content

Meta Template Properties

creator_2013 edited this page Oct 5, 2020 · 10 revisions

Meta Properties

The .Meta table defines and configures the behavior and appearance aspects of the lights that reference it.

meta_name = {
	AngleOffset = -90,
	W = 8.1,
	H = 7.5,
	Sprite = "sprites/emv/emv_whelen_src",
	Scale = 1.4
}

Index/Name

Each sub-table within the .Meta table must have a unique index/name. Examples of indexes could include front_primary, front_corner, rear_primary, etc.

In the example above, meta_name is the index.

Meta.AngleOffset


	AngleOffset = -90 -- default = 0

The angle offset adds its value to the yaw angle of all its lights. This is generally used to set the yaw of front and rear-facing lights so each actual light can simply be set to Angle(0, 0, 0).

A value of AngleOffset = -90 will face the lights forward while AngleOffset = 90 will face the lights backward (assuming each light is set to Angle(0, 0, 0)).

Rotating Lights

To make the light rotate (along the yaw axis), you can set AngleOffset = "R".

Meta.EmitArray


	EmitArray = {
		Vector(-1, 0, 0),
		Vector(0, 0, 0),
		Vector(1, 0, 0)
	} -- default = nil

EXAMPLE Renders a row of three lights, separated by 1 point.

On longer sprites, EmitArray renders multiple lights operated as one. This generally offers a better appearance than WMult without the complexity of defining more individual lights.

Meta.W


W = 2.1

Defines the width of the source Sprite.

Meta.H


H = 1.4

Defines the height of the source Sprite.

Meta.Sprite


Sprite = "sprites/emv/blank"

The path to the sprite texture. This is used as the base of the light.

For an invisible source sprite, use "sprites/emv/blank". Please note that lights without source sprites are discouraged because they generally don't look good/natural.

Meta.Scale


Scale = 1.0

Accepts a normal value (1.0 is the default). This affects the size and and therefore the brightness. Internally this scales the size of light effect sprites.

Meta.WMult


WMult = 1.0

Accepts a normal value (1.0 is the default). Very similar to the Scale property, but only affects the width. At larger values this can appear noticeably distorted. With very long sprites, consider using MultiEmit or breaking it down into multiple smaller lights.

Meta.SourceOnly


SourceOnly = false

Draws the light source sprite only without any additional effects. This makes the light slightly cheaper to render and can be utilized when working with complex shapes.

For example, multiple SourceOnly lights can be used for individual LEDs that overlap with a fully-rendered "parent" light.

Meta.Speed


Speed = 10

Only applies to rotating lights (when AngleOffset = "R"). Affects how fast the lights rotate. The actual number is arbitrary has no defined unit-of-measure.

Meta.SubmatID


SubmatID = 27

Sets the submaterial to be changed.

Meta.SubmatMaterial


SubmatMaterial = "sentry/13fpis/lights_on"

The path to the new material