Jump to content

Photo

Light 4 torches, gain acces to the boss room


  • Please log in to reply
11 replies to this topic

#1 Majora

Majora

    Unironic Marxist-Leninist

  • Members

Posted 18 August 2008 - 11:35 PM

In Ocarina of Time, the Forest Temple, how you had to kill the 4 poe sisters to get back the flames. I wanna do that, pretty much exactly:

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 Alestance

Alestance

    Saint Alestance - Eliminator of the ZGP format

  • Members
  • Real Name:Lonk
  • Location:Pennsylvania

Posted 19 August 2008 - 12:53 AM

Actually, you may not need scripts, but, your torches, and the room before the Boss Room should exist on a non-dungeon D-map so secrets could Carry Over. However, the downside is that, no matter what, the same torch in the boss room will light first. If you can deal with that, this is a solution you can go by.

#3 jerome

jerome

    "Ducks eat for free at Subway"

  • Members
  • Real Name:Jerome
  • Location:Cocoa, FL

Posted 19 August 2008 - 09:04 AM

OK, so I haven't made it very far in Ocarina of Time, but my question to you is:
"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 Mitchfork

Mitchfork

    no fun. not ever.

  • Members
  • Real Name:Mitch
  • Location:Alabama

Posted 19 August 2008 - 03:51 PM

Yeah, room state carry overs are the obvious solution, but if the flames were different colors, you'd have to control the order that they were lit in some way.

#5 Gleeok

Gleeok

    It's dangerous to dough alone, bake this.

  • Members
  • Real Name:Pillsbury
  • Location:Magical Land of Dough

Posted 19 August 2008 - 10:57 PM

Way easier if you just script it.



CODE

//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 Majora

Majora

    Unironic Marxist-Leninist

  • Members

Posted 21 August 2008 - 04:23 PM

Hot damn, thanks Gleeok icon_biggrin.gif


Edited by Majora, 21 August 2008 - 04:40 PM.


#7 Majora

Majora

    Unironic Marxist-Leninist

  • Members

Posted 24 August 2008 - 03:02 PM

EDIT: Never mind, I fixed it. Turns out the int Chk_Poe; was needed under int flm[4], and Screen->NumNPCs==0 needed () after NumNPCs.

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 Majora

Majora

    Unironic Marxist-Leninist

  • Members

Posted 01 September 2008 - 11:59 AM

Triple posting = BAD, I know. But it's important... I can't get the script to work.

If it matters, the DMap I'm using it on is marked as "interior", while the final torch room is "NES Dungeon"

#9 Gleeok

Gleeok

    It's dangerous to dough alone, bake this.

  • Members
  • Real Name:Pillsbury
  • Location:Magical Land of Dough

Posted 01 September 2008 - 03:56 PM

Oh, sorry.

It could be one of few things;
I made a large logic mistake, I made some typos, zc bug, or cheese hat.

CODE

//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 Majora

Majora

    Unironic Marxist-Leninist

  • Members

Posted 01 September 2008 - 04:03 PM

It didn't compile before without that int Chk_Poe, but I'll try again with this update.

EDIT_1: It compiled, now to test it.

Edited by Majora, 01 September 2008 - 04:08 PM.


#11 Majora

Majora

    Unironic Marxist-Leninist

  • Members

Posted 12 September 2008 - 11:14 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?

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 Gleeok

Gleeok

    It's dangerous to dough alone, bake this.

  • Members
  • Real Name:Pillsbury
  • Location:Magical Land of Dough

Posted 12 September 2008 - 11:35 PM

QUOTE(Majora @ Sep 12 2008, 09:14 PM) View Post

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. icon_smile.gif

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