Exit Game aka Game Over

Blitz3D Forums/Blitz3D Beginners Area/Exit Game aka Game Over

I'm having a brain block.

All I want to do is if the player score reaches -1
to exit the game.
Game Over.
Thanks for your time.

if score = -1 then end

Still doesn't work

But thanks a bunch
;<+++++++++++++++++++++++++++++++++++++++++++++++++++++++>
If CountCollisions(snake) Then Score#=Score#+1
If EntityCollided(HellSpawn,SC) Then Score#=Score#-2
If Score# =-1 then end
UpdateWorld
RenderWorld

Text 400,20,"Your Score: "+ Score# ,True ,True




Flip
Wend
End

It's entirely possible that the score could reach - 2 if you hit a hellspawn entity so,

If Score <=-1 end

Stevie

Or use Exit instead of End, so the program will still execute what is after the While..Wend loop (highscore, gameover titles)

He's floating score, does that matter?

no

I got it to work. Thanks alot Every one

if Score# < 0 then
Cls
Print "Game Over! " + name$ + "your Score: "+ Score#
Delay(8000)
end
Else
Endif

Tip: You should be able to get rid of the "Else" command.

Thanks

I have finished one of my games.

Does any one know of a free Website
that can handle it. I tryed using my homepage
and it exceeded the file size.
the Game size is 12.1 MB (12,759,040 bytes)
After Zipp it is 3.89 MB (4,087,808 bytes)

Thanks always
Rabies