Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
Loading...
Searching...
No Matches
scriptlight.c
Go to the documentation of this file.
1
#ifdef GAME_TEMPLATE
2
3
[
EditorAttribute
(
"box"
,
"GameLib/Scripted"
,
"Script light"
,
"-0.25 -0.25 -0.25"
,
"0.25 0.25 0.25"
,
"255 0 0 255"
)]
4
class
ScriptLightClass
5
{
6
7
}
8
9
ScriptLightClass ScriptLightSource;
10
11
class
ScriptLight: GenericEntity
12
{
13
[Attribute(
"1"
,
"flags"
,
"Flags"
,
""
, {
ParamEnum
(
"Point"
,
"1"
),
ParamEnum
(
"Spot"
,
"2"
),
ParamEnum
(
"Directional"
,
"4"
) } )]
14
int
Flags;
15
[Attribute(
"1"
,
"combobox"
,
"Type"
,
""
, {
ParamEnum
(
"Point"
,
"1"
),
ParamEnum
(
"Spot"
,
"2"
),
ParamEnum
(
"Directional"
,
"3"
) } )]
16
int
Type
;
17
[Attribute(
"1"
,
"editbox"
,
"Radius"
,
""
, NULL )]
18
float
Radius
;
19
[Attribute(
"1 1 1"
,
"color"
,
"Color"
,
""
, NULL )]
20
vector Color;
21
[Attribute(
"1"
,
"editbox"
,
"Intensity"
,
""
, NULL )]
22
float
Intensity;
23
HLIGHT
m_light;
24
25
void
ScriptLight(
IEntitySource
src, IEntity parent)
26
{
27
//SetFlags(this, EntityFlags.ACTIVE | EntityFlags.SOLID | EntityFlags.VISIBLE);
28
m_light =
AddLight
(
this
,
LightType
.POINT,
LightFlags
.DYNAMIC|
LightFlags
.CASTSHADOW,
Radius
, Color * Intensity);
29
}
30
31
void
~ScriptLight()
32
{
33
if
(m_light)
34
{
35
RemoveLight
(m_light);
36
}
37
}
38
}
39
40
#endif
IEntitySource
int[] IEntitySource
Definition
enentity.c:2
ParamEnum
void ParamEnum(string key, string value, string desc="")
Definition
enentity.c:811
EditorAttribute
void EditorAttribute(string style, string category, string description, vector sizeMin, vector sizeMax, string color, string color2="0 0 0 0", bool visible=true, bool insertable=true, bool dynamicBox=false)
Definition
enentity.c:856
RemoveLight
proto native bool RemoveLight(HLIGHT light)
removes light
HLIGHT
int[] HLIGHT
Light handle.
Definition
enworld.c:122
LightFlags
LightFlags
Definition
enworld.c:133
AddLight
proto HLIGHT AddLight(IEntity owner, LightType type, LightFlags flags, float radius, vector color)
creates light
LightType
LightType
Definition
enworld.c:125
Type
string Type
Definition
jsondatacontaminatedarea.c:11
Radius
float Radius
Definition
undergroundarealoader.c:46
Games
Dayz
scripts
2_gamelib
entities
scriptlight.c
Generated by
1.17.0