Hi all,
Just as a start off warning, i am really new to this, so there is a possibility of alot of stupid questions…
I have a platformer game which i want to run for XX amount of time, and after that it goes to a game over screen and stops there.
Now i have almost everything i need, the game is running for XX seconds and then goes to the game over screen, BUT the game is still running in the background, and if it just so happens that i am able to enter a door AFTER the game over screen has popped up, it is removed and the player can continue to play the rest of the game as if nothing has happened…
how do i fix this?
what i have is this:
Main. fla code:
//executes the gamefile gameStart.as
var stressRun:gameStart = new gameStart(this);
//gameover screen timer
var timer:Timer = new Timer(10000);
timer.addEventListener(TimerEvent.TIMER, onTimer);
timer.start();
function onTimer(evt:TimerEvent):void
{
dieScreen();
timer.stop();
}
//game over screen
//gameOver is a MovieClip
var deadScreen:gameOver = new gameOver(); function dieScreen()
{
addChild(deadScreen);
}
how do i get this to stop the game at the same time as displaying the game over screen?
also the code does not have to be perfect in any way, this is for learning purposes (to be used for research, to test player reactions (Uni project)a) only, so a bit of sloppy code here and there does not matter at this point, it just has to work.
thanks in advance
//darknath