Why do you want to place lights with cursor? are you making a 3D editor? .You can do that with
get pick vector x()
Quote: "The pick data is generated when the PICK OBJECT and PICK SCREEN commands are used. The vector is relative to the world position of the
camera, and so adding the camera position to this vector will result in the 3D world position.
"
you could do something like that with this code but you will have to make your own program to see your level and place lights.
ink rgb(255,255,255)
box 0,0,10,10
get image 1,0,0,10,10
autocam off
sync on
set ambient light 0
hide light 0
hide mouse
make matrix 1,100,100,100,100
prepare matrix texture 1,1,1,1
position matrix 1,-50,0,-50
position camera 0,150,0
point camera 0,0,0
make object sphere 2,2
set object emissive 2,rgb(255,255,255)
do
set cursor 0,0
print "move cursor until place point "
print "click mouse to make lights"
position object 2,mousex()-50,2,50-mousey()
if mouseclick() then gosub lights:sleep 500
sync
loop
lights:
inc lit
make light lit
position light lit,object position x(2),15,object position z(2)
color light lit,rgb(rnd(255),rnd(255),rnd(255))
set light range lit,50
return
I'm not a grumpy grandpa
