make object box 1,4000,5,4000 color object 1,RGB(00,00,00) make object sphere 2,25 color object 2,RGB(100,100,100) randomize timer() set ambient light 0 : make light 1 position light 1,1000,1000,1000 point light 1,1000,0,1000 set light range 1,1500 sync on : sync rate 1000 color ambient light RGB (250,250,250) do if upkey() = 1 then move object 2,7 if leftkey()=1 then ya = wrapvalue(ya-1) if rightkey()=1 then ya = wrapvalue(ya+1) yrotate object 2,ya x#=object position x(2) y#=object position y(2) z#=object position z(2) a#=object angle y(2) d#=250 h#=185 s#=40 set camera to follow x#,y#,z#,a#,d#,h#,s#,1 set ambient light 0 hide light 1 light = rnd(400) color backdrop RGB(50,50,50) if light = 5 then : lightning = 1 : count = 30 if lightning = 1 and count > 0 then set ambient light 100 : color backdrop RGB(150,150,150) dec count sync loop