Light 4 torches, gain acces to the boss room
#1
Posted 18 August 2008 - 11:35 PM
Everytime you light a torch in a room, the corresponding torch near the boss room lights up, and the boss door doesn't open until all the torches are lit. How would I go about doing this? Hopefully a simple script would help tremendously compared to wasting maps and dmaps with warps and whatnot. But assuming the script would be longer than anyone would care to write for me, how would I go about doing this the 'old fashioned' way?
Help me out here D:
#2
Posted 19 August 2008 - 12:53 AM
#3
Posted 19 August 2008 - 09:04 AM
"Are the torches in OTHER rooms, or in the room just before the Boss Room?"
I think I know how you could do it with just the room before the Boss Room. You could probably even get it to where they stop burning if you don't get them all lit in time as well. Kind of like the regrowing bushes, or the disappearing step switches, but with fire! But if you get all 4 burned in time, the door opens instead and they stay burning. Tada!... maybe.
#4
Posted 19 August 2008 - 03:51 PM
#5
Posted 19 August 2008 - 10:57 PM
//D0 flame number
//D1 flame combo
int flm[4];
bool Chk_Poe(){
if(Screen->NumNPCs==0)return true;
else return false;
}
ffc script Poe_flame{
void run(int fnum, int tdat){
Waitframes(30);
while(flm[fnum]==0){
Waitframes(20);
if(Chk_Poe){
this->Data=tdat;
flm[fnum]=1;
Game->PlaySound(27);
break;
}
}
}
}
// Use 4 of these ffcs for each flame now in the final room
ffc script Chk_flame{
void run(int fnum){
if(flm[fnum]==0)this->Data=0;
}
}
// and if they are all active we open a door and play a secret sfx
ffc script Secret{
void run(){
Waitframes(30);
int i;int p;
while(i++<=4){ if(flm[i]==1)p++; }
if(p==4){
Screen->Door[0]==1;
Game->PlaySound(27);
}
}
much better than making a maze of dupe screens with tons of warps.
Should work fine, lemme know if there's any problems.
#6
Posted 21 August 2008 - 04:23 PM
Edited by Majora, 21 August 2008 - 04:40 PM.
#7
Posted 24 August 2008 - 03:02 PM
How do I set it up? The Chk_Poe script goes in the final torch room (4 FFC's with this script attatched to them). And Poe_Flame goes in the other 4 rooms?
Edited by Majora, 25 August 2008 - 10:04 AM.
#8
Posted 01 September 2008 - 11:59 AM
If it matters, the DMap I'm using it on is marked as "interior", while the final torch room is "NES Dungeon"
#9
Posted 01 September 2008 - 03:56 PM
It could be one of few things;
I made a large logic mistake, I made some typos, zc bug, or cheese hat.
//D0 flame number
//D1 flame combo
int flm[4];
//bool Chk_Poe(){
// if(Screen->NumNPCs()==0)return true;
// else return false;
//}
ffc script Poe_flame{
void run(int fnum, int tdat){
Waitframes(30);
while(flm[fnum]==0){
Waitframes(20);
if(Screen->NumNPCs()==0){
this->Data=tdat;
flm[fnum]=1;
Game->PlaySound(27);
break;
}
}
}
}
// Use 4 of these ffcs for each flame now in the final room
ffc script Chk_flame{
void run(int fnum){
if(flm[fnum]==0)this->Data=0;
}
}
// and if they are all active we open a door and play a secret sfx
ffc script Secret{
void run(){
for(int t; t<4;t++)Trace(flm[t]);
Waitframes(30);
int i;int p;
while(i++<=4){ if(flm[i]==1)p++; }
if(p==4){
Screen->Door[0]==1;
Game->PlaySound(27);
}
}
Also, we can't put an int in front of a boolean function Chk_Poe, which wasn't really needed, so I got rid of it.
Try that. If it works fine you can delete the Trace() statements.
Edited by Gleeok, 01 September 2008 - 03:58 PM.
#10
Posted 01 September 2008 - 04:03 PM
EDIT_1: It compiled, now to test it.
Edited by Majora, 01 September 2008 - 04:08 PM.
#11
Posted 12 September 2008 - 11:14 PM
1) The four rooms (comparison: each individual Poe room in OoT/Forest Temple) need an FFC with the Poe_Flame script each right?
2) Each FFC that has Chk_flame on it, must there be 4 per flame, or just 4 total?
3) The Secret FFC/script is also in the final room?
4) Are the "Chk_Flame" FFCs combos that have secret flags on them that turn into the lit torch combos?
5) The Poe Rooms should be interior, or NES Dungeon? (or does it matter.)
6) Same as 5, except about the final room.
7) The poe rooms need enemies right? Any specific screen flags that would affect the Poe_flame script? Or the Chk_Flame one?
Finally, if answering each question is tedious, would it be simpler to tell me what scripts go in what rooms, what flags (if any) and room types (if it matters), and stuff? >_<
Edited by Majora, 12 September 2008 - 11:18 PM.
#12
Posted 12 September 2008 - 11:35 PM
At the risk of being a pain, I has some questions, which should HOPEFULLY make everything work right:
1) The four rooms (comparison: each individual Poe room in OoT/Forest Temple) need an FFC with the Poe_Flame script each right?
Yeah, I named them almost randomly, but yeah.
It's like this; any D[] variable you need to set is;
-fnum - (flame number)..each boss room must be a different flame number...obviosly. ...1,2,3,4.
-dat - combo of the flame.
2) Each FFC that has Chk_flame on it, must there be 4 per flame, or just 4 total?
total.
3) The Secret FFC/script is also in the final room?
only in the final room...along with the flame ffc scripts. 5 ffcs total in that room.
4) Are the "Chk_Flame" FFCs combos that have secret flags on them that turn into the lit torch combos?
No, I scripted this backwards. By that I mean they ARE flame combos untill the code sees that you haven't actually killed the corresponding Poe in order for it to appear, so it vanishes....like I said, backwards.
5) The Poe Rooms should be interior, or NES Dungeon? (or does it matter.)
doesn't matter.
7) The poe rooms need enemies right? Any specific screen flags that would affect the Poe_flame script? Or the Chk_Flame one?
Yes, maybe, no.
by maybe I mean; DONT EVER SET THE ENTER FROM SIDES FLAG WITH ENEMY SCRIPTS.
Give it a go.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users