sync on:sync rate 100:hide mouse
playerx=300
playery=150
monsterx=0
monstery=0
tic=0:sc=0
score=0
a$="GAME OVER! you died"
do
circle playerx,playery,5
box monsterx,monstery,monsterx+10,monstery+10
if leftkey() then dec playerx
if rightkey() then inc playerx
if upkey() then dec playery
if downkey() then inc playery
if playerx<5 then playerx=5
if playerx>600 then playerx=600
if playery<5 then playery=5
if playery>450 then playery=450
if tic=0
if monsterx<playerx-5 then inc monsterx
if monsterx>playerx-5 then dec monsterx
if monstery<playery-5 then inc monstery
if monstery>playery-5 then dec monstery
tic=2
endif
b$="You have stayed alive for:"+str$(score)+" Seconds"
text 0,0,b$
if (monsterx=playerx-5) and (monstery=playery-5)
center text playerx,playery,a$
sync
wait 2000
end
endif
dec tic:inc sc:score=int(sc/100)
sync
cls
loop
this gets an object to chase you and you get a score based on how many seconds you stay alive, plus you get a message when you die, that any help?, cheers.
Mentor.