Quote: "if mouseclick() = 1 then thisOb = pick object (mousex(),mousey(),firstOb,lastOb)"
...will "record" the last object picked by setting the variable
thisOb to whatever object (if any) is found via
pick object.
try the following code:
sync on : sync rate 60
randomize timer() : autocam off
firstOb = 1 : lastOb = 50
for x = firstOb to lastOb
make object sphere x, 20.0
yrotate object x, rnd(359)
move object x,100+rnd(100)
color object x, rnd(16777216)
next x
do
yrot# = mousemovex()
yrotate camera wrapvalue(camera angle y() + yrot#)
mx = mousex() : my = mousey() : mc = mouseclick()
if mc = 1 then thisOb = pick object (mx,my,firstOb,lastOb)
set cursor 0,0
print screen fps()
print "LastPick: ",thisOb
sync
loop
if that doesn't help understand its use, you'd better provide an example of your code that
doesn't work.
Virtual Nomad @ California, USA . DBPro V7.7 . Matrix1Utils 05.27.12
AMD Phenomâ„¢ X4 9750 Quad-Core @ 2.4 GHz . 8 GB PC2-6400 RAM
ATI Radeon HD 3650 @ 512 MB . Vista Home Premium 64 Bit