Game Development Community

GameOver Help

by Do Not Delete · in Torque X Platformer Kit · 07/12/2007 (8:38 pm) · 3 replies

I purposly kill myself to test the game over animation but it doesn't work. The code is this:

public void GameOver()
        {
            if (_gameIsOver)
                return;

            T2DAnimatedSprite gameOverImage = TorqueObjectDatabase.Instance.CloneObject<T2DAnimatedSprite>("GameOverAnimation");

            T2DSceneCamera camera = T2DSceneGraph.Instance.Camera as T2DSceneCamera;
            camera.Dismount();

            gameOverImage.Position = camera.Position;
            TorqueObjectDatabase.Instance.Register(gameOverImage);

            _gameIsOver = true;
        }

And I know that there is a object called GameOverAnimation.

Here is a picture of the error message:

img359.imageshack.us/img359/6303/untitledzh0.jpg

#1
07/12/2007 (9:51 pm)
Also can someone help me in creating those collapsible platform objects?

Thanks.
#2
07/22/2007 (7:25 pm)
Game over came up fine for me.
#3
07/25/2007 (8:45 am)
Dro are you riunning an un-modified version of the platformerdemo? If you are then the game over animation is set-up in the demo level. If you are using your own level, then this will not exist.