Skip to content

HeadLight (in Truck)

Overview

The <HeadLight> tag in the <Truck> section describes the main light of the headlights. This light is used to light up the earth and the objects on it.

There can be only one such light source for the truck.

Unlike the light sources described in the <ModelAttachments> section, this light source can illuminate much further. And, this light is not clipped based on terrain blocks, unlike the light specified in <ModelAttachments>.

All attributes of this <HeadLight> tag are the same as attributes of the ordinary <Light> tag. See the desription of the <Light> tag for details.

NOTE: Headlights are turned on when the player presses the corresponding button in the game. In the case of the Keyboard, L is the default button for enabling Headlights.

Two <HeadLight> tags

Please note that the light of headlights is described in the XML model of the truck in the two different places:

  • The <HeadLight> tag in the <Truck> section – here the main light of the headlights is described.

  • The <HeadLight> tag in the <ModelAttachments> section – here the light rays simulation of the headlights (see <Model>) and a flare of the headlights (see <Flare>) are described, the same way they are described in the <StopSignals>.