I have a problem using spot lights. On my laptop the code below works fine - if you left mouse click the spot light comes on and if you right click it goes out. However on my desktop there is no spot light at all. I have tried this on several machines (some of them brand new) but none of them work - except the laptop.
I would say this is maybe to do with the graphics card except that if I use a primitive instead of the .x model then it works fine. I have tried this with models from Dark Matter (as attached), and models exported from treemagik and the result is the same.
Does anyone know why this is? Presumably something in the .x models means that the spot light only works on a graphics card with certain features?
backdrop on : color backdrop 0
`load object "mediatree1.x",1
load object "H-Babe-Static.x",1
`set object transparency 1,4
position object 1,0,0,0
make light 1
set spot light 1, 45,90
point light 1,0,0,0
hide light 1
do
if leftkey() = 1 then yrotate object 1, wrapvalue(object angle y(1) + 0.5)
if rightkey() = 1 then yrotate object 1, wrapvalue(object angle y(1) - 0.5)
rotate camera varXRotation,varYRotation,0
if mouseclick() = 1 then show light 1
if mouseclick() = 2 then hide light 1
sync
loop
[EDIT]
I have now got this working for all objects other than those from treemagik. Strangely the spotlight settings seems to make a difference. On machines with an nvidia 5200 card the above code works for all objects - treemagik trees included. On a machine with a Radeon x300, it works if I change the spot light angle settings to 90,180 - but it still doesn't work for treemagik trees.
I am going to see if there is some configuration setting for the radeon card causing this, alternatively maybe it's just not as good a graphics card.