Difference between revisions of "Lightpoint Tutorial"

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "{{SideTOC}}" to "{{TOC|side}}")
m (Text replacement - "\[\[Category: *Arma 2: *([a-zA-Z0-9 :-]+)\]\]" to "{{GameCategory|arma2|$1}}")
Line 120: Line 120:
[[Category:Arma 2: Tutorials]]
{{GameCategory|arma2| Tutorials}}
[[Category:Arma 3: Tutorials]]
[[Category:Arma 3: Tutorials]]

Revision as of 21:23, 29 December 2020


A lightpoint (glowing light source) is a non-physical object that shines a light. Unlike projectors or vehicle headlights, this light type cannot be directed into a beam and can only glow uniformously. The glowing does not cast shadows (only the sun or the moon can) and can go through walls.


A lightpoint is local to the computer where the script has been called; one player could see a light in the dark while another would not have such light "object" created.

Lightpoint with red colour, and blue ambient. Note how the red and blue hues mix to create purple.


Colour set via setLightColor determines the lens flare effect colour, as well as light's first colour.


Colour set via setLightAmbient determines the outer colour shone by the lightpoint. Important


The flare is the "colour point" centre that emits light. It can be visible or invisible (set by setLightUseFlare). Informative

How to

The list of all lightpoint commands can be found in the Lights command group category.

Create a lightpoint

private _lightpoint = "#lightpoint" createVehicleLocal player modelToWorld [0,2,1.5];


Set light colour


_lightpoint setLightColor [0.25, 1, 1]; // also defines Flare colour

Ambient Colour

_lightpoint setLightAmbient [1, 1, 1]; // sets the colour applied to the surroundings

Set flare



_lightpoint setLightUseFlare true;


_lightpoint setLightFlareSize 1; // in meter


_lightpoint setLightFlareMaxDistance 100; // in meter

Set light brightness

Set brightness

_lightpoint setLightBrightness 8;


_lightpoint setLightIntensity 3000;


_lightpoint setLightAttenuation [0, 2, 4, 4, 0, 9, 10]; // [start, constant, linear, quadratic, hardLimitStart, hardLimitEnd]



_lightpoint setLightDayLight true; // only for the light itself, not the flare

Delete lightpoint

deleteVehicle _lightpoint; // as simple as that

Full examples

Dark Souls

skipTime -daytime;

_lightpoint = "#lightpoint" createVehicleLocal [0,0,0];
_lightpoint attachTo [player, [0, 0, 1.5]];
_lightpoint setLightColor [0,0,0];
_lightpoint setLightAmbient [1,0.8, 0.25];
_lightpoint setLightBrightness 0.15;


skipTime -daytime;

private _position = player modelToWorld [0, 20, 1.5];
private _lightpoint = "#lightpoint" createVehicleLocal _position;
_lightpoint setLightColor [0,1,1];
_lightpoint setLightAmbient [0.2,0.0,0.3];
_lightpoint setLightUseFlare true;
_lightpoint setLightFlareSize 3;
_lightpoint setLightFlareMaxDistance 3.5;
_lightpoint setLightBrightness 4;
_lightpoint setLightDayLight true;

_lightpoint spawn {
	while { sleep 0.05; player distance _this > 2 } do
		_this setLightBrightness 4 max (40 / (player distance _this));
	deleteVehicle _this;

See also