[EDIT} I am sorry, this is written for Dark Basic Professional (DBP) and will not work with Dark Basic Classic. I tried to re-write it for DBC, but I can't get the collision to work. If you are using DBP and just posted in the wrong forum, it should work for you.
Typically, you will only delete an object if you are not going to use it anymore. In the quick example below, I made a sphere to represent the enemy and a cube to represent the player. You can use the arrow keys to rotate and move. The 'player' is right in front of the camera and moves with the camera. You collide with the enemy and it hides the enemy object for two seconds and re-positions it. The score and FPS are printed at the top of the screen, using the Debug function. Hope this is helpful.
sync on : sync rate 60
global score
player = 1 : enemy = 2 : flor = 3 : score = 0
make object sphere enemy,20
position object enemy,rnd(1000),0,rnd(1000)
color object enemy,rgb(255,0,0)
make object cube player,20
color object player,rgb(0,255,0)
make object plane flor,2000.0,2000.0
color object flor,rgb(96,96,96)
xrotate object flor,270.0
position object flor,0.0,-10.0,0.0
position camera 0.0,30.0,0.0
Edelay = 0 : Estatus = 1
repeat
control camera using arrowkeys 0,2.0,2.0
position object player,camera position x(),0.0,camera position z()
set object to camera orientation player
move object player, 65
if Estatus > 0
rem enemy is active
If object collision (player,enemy) > 0
hide object enemy : Estatus = 0
inc score,500
Edelay = timer() + 2000 : rem wait two seconds to reappear
endif
else
if timer() > Edelay
Estatus = 1
position object enemy,rnd(1000),0,rnd(1000)
show object enemy
endif
endif
Debug()
sync
until spacekey() = 1
for i = 1 to 3 : delete object i : next i
end
LB
So many games to code.....so little time.