Exit Game aka Game Over

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

Rabies(Posted 2006) [#1]
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.


stayne(Posted 2006) [#2]
if score = -1 then end


Rabies(Posted 2006) [#3]
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


Stevie G(Posted 2006) [#4]
It's entirely possible that the score could reach - 2 if you hit a hellspawn entity so,

If Score <=-1 end

Stevie


b32(Posted 2006) [#5]
Or use Exit instead of End, so the program will still execute what is after the While..Wend loop (highscore, gameover titles)


stayne(Posted 2006) [#6]
He's floating score, does that matter?


markcw(Posted 2006) [#7]
no


Rabies(Posted 2006) [#8]
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


Nathaniel(Posted 2006) [#9]
Tip: You should be able to get rid of the "Else" command.


Rabies(Posted 2006) [#10]
Thanks


Rabies(Posted 2006) [#11]
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