Page 1 of 1

Problems...

PostPosted: Fri Apr 22, 2005 7:43 pm
by Editor
I got a few problems using Game Editor. I want to make it so that the game can be restarted if my main player gets destroyed, and the game stops if I say "You win!".

So I decide to use a code like this. The game is meant to stop if the player actor touches a certain gem (the "Ruby"). So I've put on a collision command for when it does this, and in Script Editor I wrote:

SuspendGame;

But I get the following error (in this exact wording):

Code: Select all
Warning: Line 1: Please try use a function without arguments. This function will not execute.

There are some errors in this Script but are not fatal. Proceed anyway?


Any help?

PostPosted: Sat Apr 23, 2005 3:34 am
by Just4Fun
SuspendGame is a function so try using the parenthesis.
Like this: SuspendGame();

Remember too, that this function is used to pause a game (recieve no events) not to end it.

HTHs...

PostPosted: Sat Apr 23, 2005 1:33 pm
by Editor
...Which, I believe, is the same as PauseGameOn, except that there is no pause menu...

Oh so its one of THOSE Commands. I should've realised, being quite familiar to C. Ill test this out.

I am familiar to C thanks to training in programs similar to it. In fact here's part of a program I've been doing in C:

{
#define LEFT OUT_A
#define RIGHT OUT_C
Wait (SENSOR_B);
Wait (250);
On (LEFT+RIGHT);
FOLLOWLINE();
}

But even with this knoledge I can get a bit mixed up so I'm glad there are people here who are happy to help.

PostPosted: Sat Apr 23, 2005 3:48 pm
by ingsan
Hello Editor !

To Reset game after collision to RUBY :
On Event "Collision" > Script :

    LoadGame("yourGame.ged");

To End game after YOU_WIN :
Create a Timer so that it doesn't immediately ends.
On Event "Timer" > Script :
    ExitGame();


:)