Kategorie: Objekte
Ab Engineversion: 6.0 OC
SetLightRange
Beschreibung
Sets the light reach of the object. When a clonk is added to the crew via MakeCrewMember, a light is added automatically with the default range of 300 and a fadeout of 80.
Syntax
void SetLightRange(int range, int fadeout);
Parameter
- range:
- Light reach in pixels. In this range, the light has 100% intensity.
- fadeout:
- [opt] Light fadeout reach in pixels. Default is 80. If the range is set to 0 and this parameter is not defined, the fadeout will also be 0.
Anmerkung
A local offset for the light center can be defined by setting the object property LightOffset to an array with two elements for X- and Y-offset respectively.
Beispiele
func ControlUse(object clonk) { clonk->SetLightRange(0); Sound("Scream"); return true; }
Mit Augentropfen verwechseltes Säureglas.
func Construction() { SetLightRange(100, 100); this.LightOffset = [0,-100]; return true; }
Script for a lamp post. A light coming from 100 pixel above the object center is enabled when the object is created.