draw_light_get

This function will get the specified light parameters as an array with the following 6 elements:

The light type (element [1]) can be one of the following two constants:

Light Type Constant
Constant Description
lighttype_dir The light is a directional light
lighttype_point The light is a point light

NOTE The x, y and z values store the light's position in case of a point light and the light's direction vector in case of a directional light.

 

Syntax:

draw_light_get(ind)

Argument Type Description
ind Real The index number of the light (from 0 to 7)

 

Returns:

Array

 

Example:

light_a = draw_light_get(1);
if (light_a[5] < 200)
{
    light_a[5] += 5;
    draw_light_define_point(1, 200, 123, 50, light_a[5], c_white);
}

The above code will get the values used to define the light at index 1, then check the radius and if it is less than 200 it will be increased and the light radius set to the new value.