I made a quick test collision program in DB to see if it was my fault but it worked, but I cant work out why this code is not working. Its doing my head in. All I want at this stage is the collision to print something on screen. Here is the full code of my program
rem world creation
sync on
hide mouse
Randomize timer()
Set global collision on
set text to bold : Set text font "arial" : Set text size 16
REMSTART
Pretty much a joke loading screen
Although it does need a few seconds to load without it
REMEND
sync : center text screen width()/2,screen height()/2,"LOADING" : sync
wait 3000
gosub _Load_Game_Media
gosub _Setup_Game
DO
gosub _Player_Control
gosub _Hoop_Collision
sync
LOOP
_Setup_Game:
' Matrix----------------------
make matrix 1,500,3000,100,200
randomize matrix 1,3
prepare matrix texture 1,1,60,60
' -------------------------------------
' -----------------Setup the ship------------
scale object 1,2,2,2
position object 1,50,50,15
' ---------------------
' ----------------Setup the hoops------------(cubes atm)
REMSTART Cube_No generates an object number so the command "make object" can be run multiple
times with one line of code (or three) (Did it like this for the sake of practice)
REMEND
FOR Cube_No=2 to 10
make object cube Cube_No,10
Next Cube_No
FOR Obj_Pos=2 to 5
position object Obj_Pos,RND(400),RND(200),RND(2500)+50
Next Obj_Pos
' -------------------------------------------
update matrix 1
make camera 1
return
_Player_Control:
position camera 1,object position x(1),object position y(1),object position z(1)-40
if upkey() then xrotate object (1), object angle x(1)-0.4
if downkey() then xrotate object (1), object angle x(1)+0.4
if object position y(1)