Quote: "However, it seems that in order to get the cubes to fly at the camera (aka the player) they stop rotating (since the only way I know how to do it is the "point object" command)."
You need to have control of each astroid each with its own data.
UDT's and arrays are best. Here's a quick example of your program using a user defined type and an array to control all astroids
sync on
sync rate 30
set display mode 640,480,32
color backdrop rgb(0,40,0)
randomize timer()
hide mouse
`position the camera
position camera 0,0,-1000
point camera 0,0,500
`necessary variables
type astroidinfo
obj
alive
x#
y#
z#
xangle#
yangle#
zangle#
speed#
endtype
dim astroid(100) as astroidinfo
countdown=timer()
`make astroids
for x=1 to 100
astroid(x).alive=0
astroid(x).obj=x
make object cube x,25
color object x,rgb(255,0,0)
hide object x
next x
`the loop
do
`check cube countdown
if timer()>countdown
makeastroid()
countdown=timer()+1000 `milliseconds until next astroid (could make this random)
endif
moveastroids()
`close the loop
sync
loop
function makeastroid()
`find an unused astroid
found=0
for x=1 to 100
if astroid(x).alive=0
found=x
exit `exits the for next loop - we found what we need
endif
next x
if found=0
exitfunction
else
`show object and give it co-ordinates
show object astroid(found).obj
astroid(found).x#=rnd(400)-200
astroid(found).y#=rnd(400)-200
astroid(found).z#=500
`position astroid and point at camera to get angles
position object astroid(found).obj,astroid(found).x#,astroid(found).y#,astroid(found).z#
point object astroid(found).obj,camera position x(),camera position y(),camera position z()
`get the angles
astroid(found).xangle#=object angle x(astroid(found).obj)
astroid(found).yangle#=object angle y(astroid(found).obj)
astroid(found).zangle#=object angle z(astroid(found).obj)
astroid(found).speed#=rnd(50)/10.0+1
`to make sure it dosen't get used until dead and also it gets updated
`in the moveastroids() function
astroid(found).alive=1
endif
endfunction
function moveastroids()
`spin and fly the test cubes
for x=1 to 100
if astroid(x).alive=1
`store angles
xtemp#=object angle x(astroid(x).obj)
ytemp#=object angle y(astroid(x).obj)
ztemp#=object angle z(astroid(x).obj)
`rotate object to point on correct vector and move it
rotate object astroid(x).obj,astroid(x).xangle#,astroid(x).yangle#,astroid(x).zangle#
move object astroid(x).obj,astroid(x).speed#
`restore rotation values plus speed#
rotate object astroid(x).obj,xtemp#-astroid(x).speed#,ytemp#-astroid(x).speed#,ztemp#
endif
next x
endfunction
That code is just to demonstrate how to control many different objects each with their own data.
The code cheats by using the point object and move object. Instead you are best in the function makeastroid() determing the x,y,z velocities from the x,y,z angles and speed variables. These can then be stored in the udt and used to move astroid. eg:
In the makeastroid() function:
position astroid
point astroid
use either trig or 3d vector maths to calculate velocities.
Now in moveastrroids() function add velocities to x,y,z and position object.
This method will be better in controling the astroids, eg like when two astroids collide you can calculate new velocities so they bounce away from each other.
I also altered your countdown code slightly - the method you were using would be different on deifferent speed computers.
The word "Gullible" cannot be found in any English Dictionary.