Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: manny.p on Sat 26/07/2003 13:47:32

Title: Templates HELP!
Post by: manny.p on Sat 26/07/2003 13:47:32
With them templates that were made, you know the FOA, DOTT, and MI2 ones. How do you get the menu up, becuase when i press f1, it only says who it was created by. Also is there anyway to import the gui into to a game your currently making, then having to start a new one, and import all the sprites back in one by one.
Title: Re:Templates HELP!
Post by: MachineElf on Sat 26/07/2003 15:21:25
I can't answer your first question, you'll have to check out the global script (preferably the section on_key_press) for that.

However, to use a GUI in a game you've started, just export it from a template, using the export button on the GUI editor, and then import it using the import button on the same place. You will probably also have to copy some things from the scripts to get it to work properly. on_mouse_click and on_key_press probably.
Title: Re:Templates HELP!
Post by: manny.p on Sat 26/07/2003 17:30:06
thnx, i had dired exporting and importing, but had trouble with the script, well i'll try it again with a copy of the script and see if that works, but why do i get who it was created from, does help show that, because f1 on my com is also help
Title: Re:Templates HELP!
Post by: Scummbuddy on Sat 26/07/2003 17:31:44
pressing F5 will bring up the SaveLoadPlayQuit, if thats what you meant.
pressing F1 will bring up his tagline and copyright
Title: Re:Templates HELP!
Post by: juncmodule on Sat 26/07/2003 17:32:22
F5 should solve your problems with the other problem.

later,
-junc
Title: Re:Templates HELP!
Post by: Scummbuddy on Sat 26/07/2003 17:40:49
you get that because Proskrito wanted something in the game to show that he had some help in creating that template that you are using.  

To find it in the script, you scroll down to

OnKeyPress:

(might be line 519) if (keycode==359) Display("Adventure....blah");

change the keycode to something like 368 *F10* if you want to use F1 for your options panel.

The line right below it is also the code in question:

*may be line 520* if (keycode==363) GUIOn(OPTIONS);   // F5 - OPTIONS

so then we'll make a copy of the code.

So here is what you will want in your OnKeyPress section:

 if (keycode==368) Display("Adventure Game Studio v2 run-time engine[[Copyright (c) 1999-2003 Chris Jones[[SCUMM template by Proskrito :)");// F10
 if (keycode==359) GUIOn(OPTIONS);   // F1 - OPTIONS
 if (keycode==363) GUIOn(OPTIONS);   // F5 - OPTIONS
Title: Re:Templates HELP!
Post by: manny.p on Sat 26/07/2003 22:27:27
Thnx it works. I had tried f5 before but i didn't have f lock on (on one of these fancy microsoft keyboards).