Problems by starting game room (Play/Load/Exit) (Solved)

Started by , Tue 21/02/2006 23:33:27

Previous topic - Next topic

Juangrejo

I just want to have an "menu" room in my game but don't know how to make that if you push the LOAD hotspot load a game and the same by Quitting.

(sorry about my english, I'm not very good at it :-X)

SilverWizard_OTF

Look, i don't know which version of AGS you have, but i can give you information only for version 2.6..
  You can do these things:
To hotspot load game, to the interaction editor, select run script. To runscript-screen, use the script command LoadGame ( i think that's the command, see help ags's program for more information).
  To Quit game, use the script command QuitGame(0).
I hope i helped
"All we have to decide is what to do, with the time that is given to us"

Ashen

#2
Those commands hold good in any version - well, except it's RestoreGameDialog() not LoadGame. (Assuming you're using the default AGS Save/Load GUIs.)
To start a new game, just going to a new room - the first of the actual game - would work.

QuitGame(0) will just quit the game - if you want a 'Do you really want to quit?' message first, use QuitGame(1), or make your own GUI.
I know what you're thinking ... Don't think that.

Juangrejo

I'm very thankfull for your help but I'm a very newbie and have real problems understanding technical words in English, cause I'm from Spain.
I don't know wich words to type in the script, I explain what a did: I did a hostpot in the room which was "load" (in bmp made by a paint pragram) and choosed in the "Interaction Editor>Any click on hotspot>Run script" and by editing it y wrote this   

// script for Hotspot 2 (load): Any click on hotspot
RestoreGameDialog()   


I know I'm doing it wrong but I don't understand how it works so don't know were the failure is.

Thanks a lot for your daily work by helping us all.

DoorKnobHandle

What you did should be correct, just add a ";" to your line like this:

Code: ags

// script for Hotspot 2 (load): Any click on hotspot
RestoreGameDialog(); // <- ; is important


This should do the trick!

Ashen

Beaten to it, but I'll post anyway:
You're missing a semicolon - ; - from the end of the line (see dkh's post). All lines of AGS script need one - sorry I didn't include them in my post. Other than that, it looks like you've got it right. Try it with the ;, and see if it works. If not post any error messages you get, or describe what's happening.

(And don't worry, your English is fine - I just hope I'm as easy to understand.)
I know what you're thinking ... Don't think that.

Juangrejo


SMF spam blocked by CleanTalk