SET SPOT LIGHT This command will set an existing light to that of a spot light.
Syntax
    SET SPOT LIGHT Light Number, Inner Angle, Outer Angle
Parameters
    Light Number
Integer The light number
    Inner Angle
Float The inner cone is defined by an angle ranging from 0 to 360
    Outer Angle
Float The outer cones is defined by an angle ranging from 0 to 360
Returns
This command does not return a value.
Description
The spot light is defined by a constant cone of inner light and a gradual fading of light within an outer cone. The inner and outer cones are defined by an angle ranging from 0 to 360. The light number must be specified using an integer value. The angles must be specified using real values.
Example Code
    sync on

    autocam off

    color backdrop rgb(0,0,0)

    load image "ground.jpg",1

    make matrix 1,1000,1000,100,100

    prepare matrix texture 1,1,1,1

    position matrix 1,-500,0,-500

    position camera 0,100,0

    make object sphere 1,20

    position object 1,0,0,500

    set ambient light 20

    color ambient light rgb(64,64,128)

    hide light 0

    make light 1

    set spot light 1,45,90

    color light 1,512,100,100

    position light 1,0,50,400

    set light range 1,500

    result=make vector3(1)

    set vector3 1, 0, 50, 200

    position light 1, 1

    set vector3 1, 0, 45, 0

    rotate light 1,1

    set vector3 to light position 1,1

    set vector3 to light rotation 1,1

    a#=y vector3(1)

    result=delete vector3(1)

    while inkey$()<>"x"

    a#=a#+1

    if a#>359 then a#=a#-360

    rotate light 1,0,a#,0

    sync

    endwhile

    delete light 1

    delete object 1

    end
See also
LIGHT Commands Menu Index