OK, here's the ffc version. Use "carry over ffc" with this, and just set the screen flag "No carry-over ffc's" if Link gets there on time.
Code:
//=========================================================
//D0 - amount of time, in seconds, before time expires
//D1 - hours combo
//D2 - minutes combo. (+59 * IT WILL +1 FOR EVERY MINUTE)
//D2 - seconds combos. -again, +59!
//D3 - destination Dmap for warp if time is up!
//=========================================================
ffc script Timebomb{
void run(int time_clock, int hour_combo, int min_combo, int sec_combo, int dest){
int doom = time_clock;
int sec_count = 0;
int min_count = 0;
int hour_count = 0;
ffc hour = Screen->LoadFFC(30);
ffc minutes = Screen->LoadFFC(31);
ffc seconds = Screen->LoadFFC(32);
minutes->Data = min_combo;
hour->Data = hour_combo;
while(true){
if (doom >=1){
Waitframes(60);
doom--;
sec_count++;
sec_combo++;
seconds->Data = sec_combo;
if (sec_count == 60){
sec_count = 0;
sec_combo = 9000;
min_combo++;
min_count++;
minutes->Data = min_combo;
}
if (min_count == 60){
min_count = 0;
min_combo = 9080;
hour_count++;
hour_combo++;
hour->Data = hour_combo;
}
} else {
Link->Pitwarp(dest,00); // change destination here
Game->PlaySound(n); // insert sfx here
Waitframes(600);
Link->HP = 0; // kills link :0
Quit();
}
}
}
}
*IMPORTANT*
There are now variables, meaning you can use this script for different things, and each is unique.
D0 - time in seconds
D1 - combos used for hours
D2 - minutes
D3 - seconds.....
Whatever combos you wish to use be aware that it will use that combo plus 1 for every change in hour, minute, second respectively.
D4 - Dmap to warp to. self explanitory.
(2) Make it more clear (with comments?) where the player needs to put what happens when the timer counts out.
Yes well there was some problems with the site earlier, and it's a miracle this was even posted, but look....there they are.
The only problem with this script (and it's only a problem if you're using FFC scripts on every screen!) is that it will eat up three of your FFCs for the whole quest. And we only get 32 per screen. This is already a huge problem for large custom bosses with alot of projectiles.
Well it's gonna be a problem for any script-heavy quest but it's not a big one. Especially if you plan out what ffc is going to be used for what. For example: 30-32 used for global. 1-19 used for misc + custom enemies, bosses, and projectiles(that's actually plenty), and 25-29 for Link or items. That still leaves me with slots 20-24 unused at any given time. I'd say it's plenty.
*EDIT* Forgot to mention that this will NOT carry over saves, quits, or continues...Have fun!