Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
LightCinematicTrack.c
Go to the documentation of this file.
1[CinematicTrackAttribute(name:"Light Track", description:"Track used for animating light entities")]
3{
4 [Attribute("true")]
5 bool m_bEnabled;
6
7 [Attribute("5.0", params:"0.2 200")]
8 float m_fRadius;
9
10 [Attribute("1 1 1 1", params:"srgb")]
11 ref Color m_Color;
12
13 [Attribute("5", params:"-10 20")]
14 float m_fLV;
15
16 private LightEntity m_LightEntity;
17 private World globalWorld;
18
19 override void OnInit(World world)
20 {
21 // Find light entity by using name of track
22 m_LightEntity = LightEntity.Cast(world.FindEntityByName(GetTrackName()));
23
24 globalWorld = world;
25 }
26
27 override void OnApply(float time)
28 {
29
30 if (globalWorld)
31 {
32 //Finding effect entity each frame for keep working in edit time
33 m_LightEntity = LightEntity.Cast(globalWorld.FindEntityByName(GetTrackName()));
34 }
35
36 if (m_LightEntity)
37 {
38
39 //Set Radius
40 m_LightEntity.SetRadius(m_fRadius);
41
42 //Set if enabled
43 m_LightEntity.SetEnabled(m_bEnabled);
44
45 //Set color and LV intensity
46 m_LightEntity.SetColor(m_Color, m_fLV);
47 }
48 }
49}
Definition Color.c:13
Definition World.c:16
SCR_FieldOfViewSettings Attribute