CREATING A CUSTOM STARTUP MENU (FULL
EDITION ONLY, WINDOWS ONLY)
Advanced tutorial to help
you create a custom Startup menu to completely replace the default "Initial
Screen".
This tutorial will guide you
through the creation of a custom full-screen startup screen, to completely replace the
default "Initial Screen" that contains the "Start", "Load"
and "Exit" buttons.
Note: If you only want to
customize the Initial Screen (without completely redesigning it), instead of following
this tutorial, simply go to the "Initial Screen" tab of the "Project
Properties" window and change the appropriate options.
First Steps
1. Create a new frame called for example "MAIN_MENU".
2. Go to the Project Properties and change the "Initial Frame" to
"MAIN_MENU" (at the bottom of the "General" tab).
3. Go to the "Options" tab of the Project Properties and make sure that the
option named "Run in a window" is disabled.
4. Go to the "Advanced" tab of the Project Properties and check the option named
"Bypass the initial screen".
5. Open the frame named "MAIN_MENU" and customize its appearance to give it the
look of a splash screen (for example, add the title of the game, and the credits).
I. Adding a "Start New Game" button
1. Add a text object labeled "Start New Game" by right-clicking on the frame
background.
2. Create a new hotspot overlaid on the text that you have just created. Link the hotspot
to the first frame of your game.
II. Adding a "Load Game" button
1. Add a text object labeled "Load Game" by right-clicking on the frame
background.
2. Create a new hotspot overlaid on the text that you have just created. Go to the
"Advanced" tab of the Hotspot Properties, and enter the following code into the
VBScript text field:
Action.PopupLoadGame
III. Adding an "Exit" button
1. Add a text object labeled "Exit" by right-clicking on the frame background.
2. Create a new hotspot overlaid on the text that you have just created. Go to the
"Action" tab of the Hotspot Properties, and check the option named "Close
the program".
IV. Adding a "Visit Website" button
1. Add a text object labeled "Click here to visit the game website" by
right-clicking on the frame background.
2. Create a new hotspot overlaid on the text that you have just created. Go to the
"Advanced" tab of the Hotspot Properties, and enter the following code into the
VBScript text field:
Action.OpenURL "ENTER_URL_HERE"
(you must of course replace ENTER_URL_HERE with the URL of your website)
V. Adding a "Contact Author" button
1. Add a text object labeled "Click here to send email to the author" by
right-clicking on the frame background.
2. Create a new hotspot overlaid on the text that you have just created. Go to the
"Advanced" tab of the Hotspot Properties, and enter the following code into the
VBScript text field:
Action.SendEmail
"ENTER_EMAIL_ADDRESS_HERE"
(you must of course replace ENTER_EMAIL_ADDRESS_HERE with your email address)
OPTIONAL (FOR ADVANCED USERS):
How to create a "Change display resolution to 640x480" check-box
First you need to create two small pictures, named for example "PIC_CHECKED" and
"PIC_UNCHECKED". The first picture must represent a check-box that is CHECKED,
and the second picture must represent a check-box that is UNCHECKED. You can create these
two pictures with a drawing program (for example with MS Paint), or with an icon editor
(for example the one that is included in the Adventure Maker package).
1. Create a new integer variable named for example "VAR1" (to do so, click
"Project Variables" from the menu on the left, then click "New Integer
Variable", then enter "VAR1", and then click OK to save the changes).
Note: What we want to do is
to change the display resolution if VAR1=0 (which is the default value), and NOT to change
it if VAR1=1.
2. Add a text object labeled "Change display resolution to 640x480" by
right-clicking on the frame background.
3. Create two new hotspots. Place the two hotspots next to the text that you have just
created (at step 1), and place the two hotspots one on top of the other (they must be
"stacked"). The first one must have the appearance of the CHECKED check-box (use
the picture "PIC_CHECKED") and the second one must have the appearance of the
UNCHECKED check-box (use the picture "PIC_UNCHECKED").
4. Use the options that are under the "Variables" tab of the Hotspot
Properties" window to make the first hotspot be visible only if VAR1=0, and the
second one be visible only if VAR1=1.
5. Create a large transparent hotspot overlaid on both the two small hotspots that you
have just created (at step 3) and the text that you have created at Step1.
6. Go to the "Advanced" tab of the Hotspot Properties of that large hotspot and
add the following code the VBScript text field:
VAR1 = 1 - VAR1
If VAR1=0 Then Action.ChangeDisplayResolutionOnLoadGame 1
If VAR1=1 Then Action.ChangeDisplayResolutionOnLoadGame 0
Note: the first line will invert the value of VAR1 when the hotspot is clicked,
whereas the second and third lines are there to make sure that the screen resolution will
(or will not) be changed when the player loads a saved game.
7. Go to the Hotspot Properties of the "Start New Game" button, and add the
following code to the VBScript text field that is under the "Advanced" tab:
If VAR1=0 Then Action.ChangeDisplayResolution
1
Note: If you want to change the display resolution to 800x600 instead of 640x480,
replace "1" with "2" at the very end of the code above.
That's all! If everything works fine, you should be able to check/uncheck the "Change
display resolution" option by clicking on either the label "Change display
resolution to 640x480", or on the check-box picture itself. The behavior should be
exactly the same as that of the Windows standard check-boxes.
OPTIONAL (FOR ADVANCED USERS):
How to create the "Disable Transitions" and "Disable Real-time
Effects" options?
To create such options, you can
use the following VBScript commands:
GetTransitionsStatus
GetEffectsStatus
InvertTransitionsStatus
InvertEffectsStatus
For more help on how to use those
functions, refer to the "Language Reference"
page.
Note that you can save the status
of those options (enabled or disabled) to an INI file thanks to the WriteINI and ReadINI functions, or to
the Windows Registry thanks to the SaveParameter and LoadParameter functions. Refer to the "Language
Reference" page for details. |