draw_light_get


Description

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

The light type can be one of the following two constants:

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


Syntax:

draw_light_get(ind)


Arguments:

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


Returns:

Real


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.


Back: Drawing And The Display
Next: draw_get_lighting
© Copyright YoYo Games Ltd. 2018 All Rights Reserved