Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_BaseLightComponent.c
Go to the documentation of this file.
1[EntityEditorProps(category: "GameScripted/BaseLightComponent", description: "Basic light component to spawn a light")]
5
6class SCR_BaseLightComponent : ScriptComponent
7{
8 //------------------------------------------------------------------------------------------------
15 //LightEntity CreateLight(LightType lightType, LightFlags flags, float effectRadius, vector color, float emissivity, vector position, vector direction = vector.Zero, LightLensFlareType flareType, float lensFlareScale, vector lensFlareOffset)
16 LightEntity CreateLight(SCR_BaseLightData lightData, vector position, vector direction, float emissivity)
17 {
18 if (!lightData)
19 return null;
20
21 LightEntity light = LightEntity.CreateLight(lightData.GetLightType(), lightData.GetLightFlag(), lightData.GetEffectRadius(), Color.FromVector(lightData.GetLightColor()), emissivity, position, direction);
22 if (!light)
23 return null;
24
25 GetOwner().AddChild(light, -1, EAddChildFlags.AUTO_TRANSFORM | EAddChildFlags.RECALC_LOCAL_TRANSFORM);
26 light.SetLensFlareType(lightData.GetFlareType());
27 light.SetLensFlareScale(lightData.GetLensFlareScale());
28 light.SetLensFlareOffset(lightData.GetLensFlareOffset());
29 light.SetConeAngle(lightData.GetLightConeAngle());
30 light.SetIntensityEVClip(lightData.GetIntensityClipEV());
31
32 return light;
33 }
34}
SCR_BaseLightComponentClass ScriptComponentClass CreateLight(SCR_BaseLightData lightData, vector position, vector direction, float emissivity)
enum SCR_ECompassType EntityEditorProps(category:"GameScripted/Gadgets", description:"Compass", color:"0 0 255 255")
Prefab data class for compass component.
vector direction
vector position
Definition Color.c:13
proto external int AddChild(notnull IEntity child, TNodeId pivot, EAddChildFlags flags=EAddChildFlags.AUTO_TRANSFORM)
Add Entity to hierarchy. Pivot is pivot index, or -1 for center of parent.
Light parameters.
proto external GenericEntity GetOwner()
Get owner entity.
EAddChildFlags