another way to skin the cat:
autocam off : sync on : sync rate 60
randomize timer()
rem player object and set camera to top-down view
make object cube 1,10.0
xrotate camera 90.0
rem make some obstacles/somethings to hit
for x = 2 to 10
make object cube x,20.0
repeat
position object x,-50 + rnd(100),0.0,-50 + rnd(100)
until object collision(x,0) = 0
next x
do
rem move the camera and player object
camx# = camera position x() + rightkey() - leftkey()
camz# = camera position z() + upkey() - downkey()
position camera camx#,75.0,camz#
position object 1, camx#, 0.0, camz#
rem check for collision
this = object collision(1,0)
rem compare this collision to the last
if this <> 0 and this <> that `if there is a collision and it's the first time it collided with that object (compare)
color object this,rnd(16777215) `trigger whatever effect(s)
msg$ = str$(this)+"/"+str$(that) `show the comparison which resulted in the effect
endif
that = this `record the last thing the player hit (or not)
set cursor 0,0
print msg$
sync
loop
'use cursor keys to move
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