- Current Location:
- PureZC
- » PureZC Forums
- » Scripts
- » Start/Title Screen
Start/Title Screen
Overview
Creator:
Timelord
Updated: 24 May 2014
Tags:
FFC
Downloads: 94
|
View Script
Download Package (14.36 MB) |
Information
This FFC script allows you to make a title screen, that will start your game, when the player presses the 'START' button, and has options to play sound effects, and control settings for initial screen destinations.
Description Setup Reviews Comments
Like it says on the tin, this script, when attached to an FFC, generates a functional start screen, that by default, uses the 'START' button to begin a game, rather than 'Down'. As does have a 'START'; button, that is used to emulate the original Zelda engine, for subscreen access, I find this appropriate, but it isn't exactly fun to force ZC to avoid using the subscreen, which this script manages to do, through various forms of trickery. .
Thus, I've worked out an FFC script, that you can place on title screens, as a piece of live code, that will start the game. I suggest constructing your start screen entirely using FFCs, with 'Draw Over' set, to avoid seeing the player, or set 'Link is Invisible' in Screen->Screen Data. (If not, simply place one FFC over the player, to match the start screen tile that would appear there., with 'Draw Over' set in FFC flags.
The FFC uses arguments to set SFX, delay duration (needed to use SFX), warp type (direct, or via Screen->Secrets), and warp coordinates, if using direct warps.
The download package includes several example .qst files, and two versions of the FFC script. The first is the same version as you see here, whereas the second uses two FFCs, and some arrays, to allow for more complex functions.
Thus, I've worked out an FFC script, that you can place on title screens, as a piece of live code, that will start the game. I suggest constructing your start screen entirely using FFCs, with 'Draw Over' set, to avoid seeing the player, or set 'Link is Invisible' in Screen->Screen Data. (If not, simply place one FFC over the player, to match the start screen tile that would appear there., with 'Draw Over' set in FFC flags.
The FFC uses arguments to set SFX, delay duration (needed to use SFX), warp type (direct, or via Screen->Secrets), and warp coordinates, if using direct warps.
The download package includes several example .qst files, and two versions of the FFC script. The first is the same version as you see here, whereas the second uses two FFCs, and some arrays, to allow for more complex functions.
Last Updated: 24th May, 2014
Initial Set-Up
Important: Set the FFC running this script to 'Run at Screen Init'.
Assign values to the FFC Script Arguments, as follows:
D0: This is the SFX file to play, when the player presses 'START'. Set this from Quest->Audio->SFX Data, and pay attention to the length of the SFX file, as you will need to match or exceed that time, for the next setting.
D1: This is the delay time to use, if you are generating sound effect when the player presses the 'START' button. For every 1-second of play-length, you will need to add +60 to this timer.
Examples:
You may also wish to pad some time, after the SFX plays, to avoid a sharp cut, directly into other music.
D2: If you are using the 'Direct Warp' method (see below), enter the DMAP number of your destination here. (Note: use the DMAP number, from Quest-DMAPS, not the 'MAP' number. DMAP values start at 0, and end at 511.)
D3: If you are using the 'Direct Warp' method (see below), enter the Screen number of your destination here. (Note: This uses Warp-Return A.)
D4: Set this to a value of 1, or greater, if you wish to use Screen->Secrets, instead of Direct Warps.
Direct Warps
If using direct warps, the player will be warped to the initial 'play' screen of the game, with no special transition. I've tried to add transitions, but doing this, causes a variety of problems, due to how any Wait() operation works, in conjunction with the subscreen. (Thank you, MasterManiac, for this information.)
Direct Warps will place the player at Warp Return A, on the DMAP, and Screen that you set in Arguments D2, and D3, respectively.
Screen Secret Warps
In place of direct warps, you may use a Screen->Secrets Warp, by following these instructions.
Select (or create) a combo, with the type 'Sensitive Warp'. You can use any type (A, B, C, or D) for this, and will need to know the type.
You're done! The majority of work associated with using this script, is in designing your title (or other transition) screens, and effects.
Initial Set-Up
- Import this FFC script, into your other script files; or otherwise append it to your normal script files, and compile it.
- Assign the FFC 'titleScreen' to an FFC slot.
- Design a title screen; preferrably using FFCs, set to draw over the player. (You may animate, or script moving FFCs, if you wish to go through that effort, and retain compatibility with this FFC script.)
- Place one FFC on the screen, that runs this script, and be sure to set 'Run at screen init.' in the FFC Flags, for this script. I find it best to attach this to an invisible FFC, using 'Combo 1', but you can technically attach it to any FFCs on your title screen.
- Go to Screen->Screen Data, then select the S.Flags 1 tab, and enable the option 'Link is Invisible'.
Important: Set the FFC running this script to 'Run at Screen Init'.
Assign values to the FFC Script Arguments, as follows:
D0: This is the SFX file to play, when the player presses 'START'. Set this from Quest->Audio->SFX Data, and pay attention to the length of the SFX file, as you will need to match or exceed that time, for the next setting.
D1: This is the delay time to use, if you are generating sound effect when the player presses the 'START' button. For every 1-second of play-length, you will need to add +60 to this timer.
Examples:
- For a 1-second SFX file, would set this value to 60;
- for a 1.5-second SFX file, you would set this value to 90;
- for a 4-second SFX file, you would set this value to 240.
You may also wish to pad some time, after the SFX plays, to avoid a sharp cut, directly into other music.
D2: If you are using the 'Direct Warp' method (see below), enter the DMAP number of your destination here. (Note: use the DMAP number, from Quest-DMAPS, not the 'MAP' number. DMAP values start at 0, and end at 511.)
D3: If you are using the 'Direct Warp' method (see below), enter the Screen number of your destination here. (Note: This uses Warp-Return A.)
D4: Set this to a value of 1, or greater, if you wish to use Screen->Secrets, instead of Direct Warps.
Direct Warps
If using direct warps, the player will be warped to the initial 'play' screen of the game, with no special transition. I've tried to add transitions, but doing this, causes a variety of problems, due to how any Wait() operation works, in conjunction with the subscreen. (Thank you, MasterManiac, for this information.)
Direct Warps will place the player at Warp Return A, on the DMAP, and Screen that you set in Arguments D2, and D3, respectively.
Screen Secret Warps
In place of direct warps, you may use a Screen->Secrets Warp, by following these instructions.
Select (or create) a combo, with the type 'Sensitive Warp'. You can use any type (A, B, C, or D) for this, and will need to know the type.
- Set D4, in FFC Script Arguments, of your titleScreen FFC, to a value of '1', or higher.
- In Screen->Secret Combos, go to the 'Misc.' tab, and set Secret-0 (Flag 16), to the combo you selected, or created, above.
- In Screen->Screen Data, go to the 'S.Data 2' tab, and change the value of 'Secret Sound;, to '): None'.
- Find the spot, where the player will initially stand on your start screen. If you are using arrival squares, this will be the position of the arrival square; otherwise, it will normally be Warp Return Point A, on the initial screen.
- Cage the player to one tile, using solid combos.
- Flag the centre of that cage, where the player is standing, with Flag-16.
- In Screen->Tile Warp, set the type of animation that you desire, for the warp transition, and set the coordinates, directing this warp, to the destination screen where you want the player to begin the game.
You're done! The majority of work associated with using this script, is in designing your title (or other transition) screens, and effects.
Timelord
Posted 13 May 2014 - 03:15 AM
I probably should mention that in the section on Direct Warps, as some people won't know to do this.
Screens start at 0 (00), and end at 128 (7F) on overworld DMAPs, which is the most critical thing to remember.
(Screens above 128, (DMAP 80, to 87) are reserved for room functions. I don;t know if you can use them for warping into (directly), but I'd advise against it.
Screens start at 0 (00), and end at 128 (7F) on overworld DMAPs, which is the most critical thing to remember.
(Screens above 128, (DMAP 80, to 87) are reserved for room functions. I don;t know if you can use them for warping into (directly), but I'd advise against it.
Master Maniac
Posted 13 May 2014 - 02:19 AM
One note, be sure to translate the D2 value from hexadecimal to decimal before entering it in the FFC attributes.
For example, if the desired screen to warp toward is 0f, then the D2 value you'll enter will be 16. For those who have trouble with hex to dec conversions, I believe google will translate it for you if you simply type "convert xx from hexadecimal to decimal".
For example, if the desired screen to warp toward is 0f, then the D2 value you'll enter will be 16. For those who have trouble with hex to dec conversions, I believe google will translate it for you if you simply type "convert xx from hexadecimal to decimal".




