Dayz Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Loading...
Searching...
No Matches
Light API

Topics

 Trace&Visibility API

Typedefs

typedef int[] HLIGHT
 Light handle.

Enumerations

enum  LightFlags { DYNAMIC , CASTSHADOW , CHEAP }
enum  LightType { POINT , SPOT , DIRECTIONAL , AMBIENT }

Functions

proto HLIGHT AddLight (IEntity owner, LightType type, LightFlags flags, float radius, vector color)
 creates light
proto native int ClearLightFlags (HLIGHT light, LightFlags flags)
proto native float GetSceneHDRMul (int camera)
 scene light multiplier (based on measured scene light levels) - pre-exposure of light
proto native bool RemoveLight (HLIGHT light)
 removes light
proto native bool SetLightCone (HLIGHT light, float cone)
 Sets light cone in degrees (for LightType.SPOT).
proto native bool SetLightEx (HLIGHT light, float radius, vector color)
proto native int SetLightFlags (HLIGHT light, LightFlags flags)
proto native bool SetLightTexture (HLIGHT light, string cubemap)
 sets lookup texture for projection lights

Detailed Description

Typedef Documentation

◆ HLIGHT

typedef int [] HLIGHT

Light handle.

Definition at line 122 of file enworld.c.

Enumeration Type Documentation

◆ LightFlags

enum LightFlags
Enumerator
DYNAMIC 

Dynamic light.

Dynamic objects are included in the query.

There is limit 512 dynamic lights per world and 32 per camera view. They are faster when moving and changing shape. Also they are always attached to owner entity

CASTSHADOW 
CHEAP 

for cheaper dynamic lights, like muzzle flashes (might use cheaper rendering method)

Definition at line 132 of file enworld.c.

◆ LightType

enum LightType
Enumerator
POINT 
SPOT 
DIRECTIONAL 
AMBIENT 

Definition at line 124 of file enworld.c.

Function Documentation

◆ AddLight()

proto HLIGHT AddLight ( IEntity owner,
LightType type,
LightFlags flags,
float radius,
vector color )

creates light

◆ ClearLightFlags()

proto native int ClearLightFlags ( HLIGHT light,
LightFlags flags )

◆ GetSceneHDRMul()

proto native float GetSceneHDRMul ( int camera)

scene light multiplier (based on measured scene light levels) - pre-exposure of light

Referenced by GameplayEffectWidgets_base::CalculateBreathEffect().

◆ RemoveLight()

proto native bool RemoveLight ( HLIGHT light)

removes light

◆ SetLightCone()

proto native bool SetLightCone ( HLIGHT light,
float cone )

Sets light cone in degrees (for LightType.SPOT).

◆ SetLightEx()

proto native bool SetLightEx ( HLIGHT light,
float radius,
vector color )

◆ SetLightFlags()

proto native int SetLightFlags ( HLIGHT light,
LightFlags flags )

◆ SetLightTexture()

proto native bool SetLightTexture ( HLIGHT light,
string cubemap )

sets lookup texture for projection lights