-
Couldn't load subscription status.
- Fork 19
Meta Template 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
}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.
AngleOffset = -90 -- default = 0The 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)).
To make the light rotate (along the yaw axis), you can set AngleOffset = "R".
EmitArray = {
Vector(-1, 0, 0),
Vector(0, 0, 0),
Vector(1, 0, 0)
} -- default = nilEXAMPLE 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.
W = 2.1Defines the width of the source Sprite.
H = 1.4Defines the height of the source 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.
Scale = 1.0Accepts 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.
WMult = 1.0Accepts 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.
SourceOnly = falseDraws 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.
Speed = 10Only applies to rotating lights (when AngleOffset = "R"). Affects how fast the lights rotate. The actual number is arbitrary has no defined unit-of-measure.
SubmatID = 27Sets the submaterial to be changed.
SubmatMaterial = "sentry/13fpis/lights_on"The path to the new material