CreateLight()

Syntax

CreateLight(#Light, Color [, x, y, z])
Description
Creates a new #Light of the given Color in the current world. Valids colors can be easily created with the RGB() command. The new light is created at the 0,0,0 location unless the optionals 'x,y,z' paremeters are specified. If the #Light was already created, it is automatically freed and replaced by the new one.

Example:
  CreateLight(0, RGB(255,0,0)) ; Creates a red light
  
  CreateLight(1, RGB(0,255,0),  0, 100.7, 50) ; Creates a green light, the position (0, 100.7, 50)

Supported OS

Windows, Linux

<- CopyLight() - Light Index - FreeLight() ->