You could try using a point light. Something like this:
` set up the display settings
set display mode desktop width(), desktop height(), 32
sync on : sync rate 60 : sync
` set up the camera
autocam off
position camera 0, 50, -800
point camera 0, 50, 0
color backdrop rgb(0,0,0)
`create a couple of objects in the scene
make object plain 1, 1000, 1000
xrotate object 1, 270
color object 1, rgb(255, 0, 255)
make object sphere 2, 40
position object 2, 0, 50, 300
color object 2, rgb(0, 255, 0)
` change the default directional light to a point light
set point light 0, 400, 50, -400
set light range 0, 800
` reduce ambient light to zero
set ambient light 0
angle# = 0.0
repeat
` move the sphere around the scene in a circular motion
inc angle#, 0.3
position object 2, 300*sin(angle#), 50, 300*cos(angle#)
sync
until spacekey()
end
The moving sphere fades as it moves to the far left of the scene - although it gets completely dark rather abruptly. This is a limitation of the built in light commands. You can get more controllable changes in lighting using a shader - but that's more complicated. Experiment with the DBPro lighting commands first.