The title sums it up - except that the same applies to
set object specular power. Both commands work fine for a positional light. They should both work for a directional light such as the default light as well. Here's some sample code based on a snippet by Math89:
Sync On
Sync Rate 60
`Set Point Light 0, -5,5,-5
set directional light 0, 0.57735, -0.57735, 0.57735
Make Object Sphere 1, 10, 48,72
Set Object Diffuse 1, rgb(255,0,0)
Set Object Specular 1, rgb(255,255,255)
Set Object Specular Power 1, 16
Do
Set Object Specular Power 1, 16+8*sin(timer()/10)
Sync
Loop
Edit Mr Bigger has pointed out that this is the same issue that was raised in a bug report four years ago and it still hasn't been resolved:
set object specular bug
Time it was confirmed perhaps so at least Lee can explain why it has to be this way?
A comment in the Help file would be one rather unsatisfactory solution.