Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_BaseLightComponent.c
Go to the documentation of this file.
1 [EntityEditorProps(category: "GameScripted/BaseLightComponent", description: "Basic light component to spawn a light")]
2 class SCR_BaseLightComponentClass : ScriptComponentClass
3 {
4 }
5 
6 class SCR_BaseLightComponent : ScriptComponent
7 {
8  // DEBUG
9 // Shape shape;
10 // Shape shape1;
11 
12  //------------------------------------------------------------------------------------------------
19  //LightEntity CreateLight(LightType lightType, LightFlags flags, float effectRadius, vector color, float emissivity, vector position, vector direction = vector.Zero, LightLensFlareType flareType, float lensFlareScale, vector lensFlareOffset)
20  LightEntity CreateLight(SCR_BaseLightData lightData, vector position, vector direction, float emissivity)
21  {
22  if (!lightData)
23  return null;
24 
25  LightEntity light = LightEntity.CreateLight(lightData.GetLightType(), lightData.GetLightFlag(), lightData.GetEffectRadius(), Color.FromVector(lightData.GetLightColor()), emissivity, position, direction);
26  if (!light)
27  return null;
28 
29  GetOwner().AddChild(light, -1);
30  light.SetOrigin(position);
31  light.SetLensFlareType(lightData.GetFlareType());
32  light.SetLensFlareScale(lightData.GetLensFlareScale());
33  light.SetLensFlareOffset(lightData.GetLensFlareOffset());
34  light.SetConeAngle(lightData.GetLightConeAngle());
35  light.SetIntensityEVClip(lightData.GetIntensityClipEV());
36 
37  // DEBUG POSITION OF THE LIGHT
38  //shape = Shape.CreateCylinder(ARGB(255, 255, 0, 0), ShapeFlags.VISIBLE, position, 0.008, 0.008);
39  //shape1 = Shape.CreateArrow(lightOffset.Multiply4(mat), componentData.m_aLightData[i].GetLightConeDirection().Multiply4(mat), 1.5, ARGB(255, 0, 255, 0), ShapeFlags.VISIBLE);*/
40 
41  return light;
42  }
43 }
direction
vector direction
Definition: SCR_DestructibleTreeV2.c:31
EntityEditorProps
enum EQueryType EntityEditorProps(category:"GameScripted/Sound", description:"THIS IS THE SCRIPT DESCRIPTION.", color:"0 0 255 255")
Definition: SCR_AmbientSoundsComponent.c:12
ScriptComponent
SCR_SiteSlotEntityClass ScriptComponent
SCR_BaseLightData
Light parameters.
Definition: SCR_BaseLightData.c:5
SCR_BaseLightComponentClass
Definition: SCR_BaseLightComponent.c:2
GetOwner
IEntity GetOwner()
Owner entity of the fuel tank.
Definition: SCR_FuelNode.c:128
CreateLight
SCR_BaseLightComponentClass ScriptComponentClass CreateLight(SCR_BaseLightData lightData, vector position, vector direction, float emissivity)
Definition: SCR_BaseLightComponent.c:20
position
vector position
Definition: SCR_DestructibleTreeV2.c:30
category
params category
Definition: SCR_VehicleDamageManagerComponent.c:180