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
ConstantDescription
lighttype_dirThe light is a directional light
lighttype_pointThe light is a point light

 

Syntax:

draw_light_get(ind);

ArgumentTypeDescription
indRealThe 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 indexed as "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.