How to end a game

Started by Remco, Thu 18/03/2004 18:22:29

Previous topic - Next topic

Remco

I have a question. I am a bit testing ags. I am making a short room and stuff but how can you end a game? I have maked a room, and if you take a key then you can unlock the door, but how can i and the game then?
There is only 1 entertainer, the Q entertainer!

Darth Mandarb

Quit(VAL);

:)

Seriously, it depends on how you want the game to end.

You can program a new room with ending credits:
You can have the game simply quit:
You can have it go back to the start screen:

So how do you want it to end?

~ d

Remco

Well, first there stands in the screen: You have completed the game, GREAT!  and then it returns to the main screen.
There is only 1 entertainer, the Q entertainer!

Ben

#3
Select "Run Script" from the interactions editor..

Type this:

Display("You have completed the game, GREAT!");
RestarrtGame();
--------
Edit* there are only 2 'r's in Restart, teh silly!1

Remco

if i do this the game is restarting to the beginning. But i want that the game returns to the menu.
There is only 1 entertainer, the Q entertainer!

Radiant

I'm not sure what menu you mean but you could use SetRestartPoint() when it's on screen, then a future RestartGame() will warp you to that point.

Remco

if you start a game, you can choose between: New Game Load or Quit. I want my game to return to that screen when you complete a game.
There is only 1 entertainer, the Q entertainer!

Scummbuddy

The just use the NewRoom() command, and type whatever room that was, such as intro referring to intro.crm, or 1
- Oh great, I'm stuck in colonial times, tentacles are taking over the world, and now the toilets backing up.
- No, I mean it's really STUCK. Like adventure-game stuck.
-Hoagie from DOTT

Alynn

#8
Out of curiosity, do you have intro.crm as your title screen?

Because in my tests by default RestartGame() takes you to room1.crm.... What you should do is in your "First time Player enters  screen" For intro.crm is call SetRestartPoint ()
That should set that to the place the game is restarted too...

Test it out... I believe it will work...

EDIT: And scummbuddy, the problem with new rooming back to the title screen is that nothing is reset back to the defaults, so you would have to manually do it, restartgame does it for you.

Remco

where can i see what my starters menu room is?
There is only 1 entertainer, the Q entertainer!

Scummbuddy

well, if you havent made an intro.crm room file, then i suppose its room1.crm for you.
- Oh great, I'm stuck in colonial times, tentacles are taking over the world, and now the toilets backing up.
- No, I mean it's really STUCK. Like adventure-game stuck.
-Hoagie from DOTT

Remco

room 1 is the room where the caracter starts
There is only 1 entertainer, the Q entertainer!

Ben

#12
So, what is the problem, exactly? If you put RestartGame(); at the part when the player finishes, it should reset everything and take you back to room 1. You don't even need to bother with NewRoom(); in this case. Do you want the game to restart at some place other than room 1? That's what SetRestartPoint(); is for. If the game already starts at the point you want it to return to at the end, you don't even need SetRestartPoint. Or are you having trouble figuring out where to put the RestartGame(); command?


Remco

Well, if you start a new game, then you start in the main screen right. Where you can start a new game, load or quit. If my character has finished the game, then i want him to return to the main screen so he can choose if he wants to play the game again or if he want`s to quit.
There is only 1 entertainer, the Q entertainer!

SSH

By default, RestartGame() take you to the same screen as double-clicking the EXE. If that is your menu, then thats where restart game will take you. Have you actually tried doing this, Remco?

Alynn: that's not my experience, becuase in my game "Alba the Explorer" I just use a RestartGame call and it takes me back to the intro.crm. I didn't use any SetRestartPoint calls.
12

Alynn

SSH:

HRm.... odd... with mine when calling RestartGame it bypasses intro.crm and goes straight to room1 which is my title screen.  Haven't used SetRestartPoint either.

Maybe it's because it automaticly switches from intro to room1...

Maybe because room1.crm is the first room with a gui on it...

Maybe Pumaman should interject with his infinite knowlage of how this damn thing works :P

SMF spam blocked by CleanTalk