Skip to content

KAI_Headlight

inkoalawetrust edited this page Jul 20, 2023 · 3 revisions

KAI_Headlight

Parent class: DynamicLight

Note: Technically this shouldn't be under KAI_BaseVehicle on the sidebar, since it's not a child class of it. But it's only purpose is to be used by vehicles so.

Description

The class used for the headlights of vehicles. It's mostly a normal dynamic light actor with some added code to keep it attached to its' vehicle, which is stored in its' Target pointer. Headlights are white by default.

Variables

Active

Type: Boolean

Marks the headlight as active when the Activate() and Deactivate() virtuals are called on it by the headlight control functions. Required because FDynamicLight's m_Active variable is not exposed to ZScript.

Offset

Type: Vector3

The offsets of the dynamic light itself, relative to the KAI_Headlight dynamic light. Unlike m_Active above, the function that allows for this IS exposed to ZScript.

IsBacklight

Type: Boolean

Marks the headlight as being a backlight for the vehicle, if that's the case, then the headlights' angle is rotated 180 degrees.

UseSpriteRotation

Type: Boolean

Makes the headlight additionally take its targets' SpriteRotation into account when warping to it.

UseCardinalAngles

Type: Boolean

Snaps the headlights' angle to the nearest sprite angle out of 8 cardinal angles. So that the headlights take the limited amount of visual rotations into account.

SixteenAngles

Type: Boolean

Used in conjunction with UseCardinalAngles to snap to the nearest of 16 cardinal angles instead of 8. Used for 16 angle sprites, like the ones that could be ideal for large vehicles like tanks.

See also

Clone this wiki locally