Start/Title Screen

SubmittedDecember 14, 2016

0.0 rating

Featured Screenshot



Download Script Package


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.

Script Setup Details

Last Updated: 24th May, 2014

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'.
Note: It's best to keep title screens, and other transition screens, on their own DMAPs, segregated from other game screens, to avoid any possible game bugs, with walkability of the combos, and FFCs, on those screens.

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.

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.
Mathematics:There are 60-frames per second when running a game in ZC, thus every single point of this timer, is 1/60th of one-second in time. If you wish to calculate an exact running time, you will want to remember this value.

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.
Note: Unlike, Direct Warps, Screen Secret Warps, do not automatically use Warp Return A. You must specify the warp returns, and establish them on your destination screens, using Screen->Tile Warp.

You're done! The majority of work associated with using this script, is in designing your title (or other transition) screens, and effects.

Script Contents

/// Title Screen FFC ///
/// By: ZoriaRPG ///
/// With Assistance ///
/// From: MasterManiac ///
/// This script is used to run a title screen, using FFCs, and uses one ///
/// FFC to establish the functions of the title screen, which begins the ///
/// game by pressing the START button, as one might expect to happen in ///
/// games that actually *have* a START button. ///
/// ///
/// You may change the button to suit your game, by replacing ImputStart ///
/// with the desired input, such as InputEx1, if you want a game to start ///
/// by pressing SELECT, such as a few Kusoge titles do, that I can recall. ///
/// ///
/// Set to 'Run at Screen init' in FFC Flags! ///
/// ............... ///
/// ............... ///
///---------------------------{ D0: Start SFX }----------------------------///
/// D0: SFX to play when the player presses 'START'. ///
/// Set from Quest->Audio->SFX Data. ///
///---------------------------{ D1: Delay Time }---------------------------///
/// D1: Length of time, between pressing start, and the game starting. ///
/// Time this to match your SFX, where 60 = 1-second. ///
/// (240, would therefore be four-seconds, and is my default value.) ///
///----------------------{ D2/D3: Warp Destinations }----------------------///
/// D2: If using a direct warp, set this to the DMAP number for the warp ///
/// (not the 'Map' number, but the 'DMAP' number), stating at 0. ///
/// D3: If using direct warps, set this to the screen number for the ///
/// warp destination. This will use WARP RETURN 'A'. ///
///------------------------{ D4: Secret Warp Mode }------------------------///
/// D4: If you are going to use a SENSITIVE WARP tile, placed under the ///
/// player, to control the warp (and thus, control fade effects), then ///
/// set this to a value of '1' (or greater). Set warp destinations from ///
/// Screen->Tilewarp, and set your tile warp combo in Screen->Secrets, as ///
/// SECRET TILE 0, then place Flag-16 over where the player is caged on ///
/// your title screen. ///

ffc script titleScreen {
void run(int SFX, int timeValue, int W_DMAP_NUMBER, int W_SREEN_NUMBER, int secrets) {
Link->InputStart = false; //present subscreen from falling.
bool waiting = true; //Establish main while loop.
bool pressed = false; //Establish timer requirements.
int timer = 0; //Set timer to exist.

while(waiting){ //The main while loop.

if (Link->InputStart) { //Is the player presses START
Link->InputStart = false; //Keep subscreen from falling.
pressed = true; //Initiate countdown timer.
Game->PlaySound(SFX); //Play SFX set in D0.
if(pressed){ //Run Timer
timer++; //Timer counts up, until it reaches amount set in D1.

if(timer >= timeValue){ //if timer is equal to, or greater than value of D1.
if ( secrets > 0 ) { //If D4 is set to 1 or higher...
Screen->TriggerSecrets(); //Trigger secret combos. Use this if using a warp combo.
else { //If D4 is set to 0, and we are using direct warps...
Link->Warp(W_DMAP_NUMBER, W_SREEN_NUMBER); //Warp Link to the DMAP set in D2, and the screen set in D3, using Warp Return A.
Waitframe(); //Pause, to cycle the loop.

This entry has no reviews.

Recent Resources