Jump to content

Photo

Something wrong with tiered secrets


  • Please log in to reply
9 replies to this topic

#1 Mr Silver

Mr Silver

    Initiate

  • Members
  • Location:Spain

Posted 11 December 2014 - 08:22 PM

Hi! I've been trying to learn how to use the program for a few days, and I'm doing a minidungeon to test all kind of things that I come up with. I have a problem with tiered secrets. I want that the door of the dungeon opens when you push 7 blocks in the correct order, so I have settled my secrets like this:

 

2ilc6km.png

 

Also, in the secret combo window:

 

nwmyo3.png

 

The thing is that, when I push any block, all the secrets in the screen trigger at the same time =(

 

What am I doing wrong?

 

 



#2 MoscowModder

MoscowModder

    Sometimes lurking. Rarely posting.

  • Members
  • Location:Wisconsin

Posted 11 December 2014 - 08:33 PM

What are you trying to do (exactly) with this set up? Tiered secrets don't care what order the triggers happen in.



#3 Mr Silver

Mr Silver

    Initiate

  • Members
  • Location:Spain

Posted 11 December 2014 - 08:50 PM

What are you trying to do (exactly) with this set up? Tiered secrets don't care what order the triggers happen in.

I didn't know that... Well, I'll try to explain what I'm trying to do.

 

My idea is that there are seven buttons on the screen, and you have to press this buttons in the correct order to make the door of a dungeon open. When you step in a button, a sfx is played. For this last part, I'm using the script of Moosh from the database of pureZC which follows (slightly adapted for my interest):

ffc script Soundwhenoncombo{
     void run(int sfx){
         while(true){
             if((Link->X == this->X) && (Link->Y == this->Y)){
             Game->PlaySound(sfx);         
             }
          Waitframe();
        }
   }
}

As I didn't know how to make this (I needed two flags in a single combo, one for the trigger thing, and another for the tiered secrets, but maybe I'm also wrong in this), I'm trying to make this puzzle with blocks right now, so you have to push them in the right order, and when you do that, the door of the dungeon opens.

 

I don't know how to explain myself better, so ask me anything that you don't understand and I'll try to make it clearer =)

 

Thank you!


Edited by Mr Silver, 11 December 2014 - 08:50 PM.


#4 MoscowModder

MoscowModder

    Sometimes lurking. Rarely posting.

  • Members
  • Location:Wisconsin

Posted 11 December 2014 - 09:09 PM

Well, like I said, tiered secrets won't help you make a puzzle requiring you to hit items in a certain order.

Well, they can, except that the wrong triggers won't be triggers at all. To make the wrong triggers reset the puzzle you'll need more.

 

So, for this kind of puzzle, you'll need a script. Also that script you posted will only play the SFX when you're exactly aligned with the combo, and will play it every frame. I could probably whip up a script that makes your puzzle work and played the SFX for you if you like.



#5 Mr Silver

Mr Silver

    Initiate

  • Members
  • Location:Spain

Posted 11 December 2014 - 09:14 PM

I'd love it, for sure! =)

 

I don't understand the trigger thing in the smaller size sentence, I guess it's ZQ advanced, or something like that XD

 

Thank you very very much!



#6 MoscowModder

MoscowModder

    Sometimes lurking. Rarely posting.

  • Members
  • Location:Wisconsin

Posted 11 December 2014 - 10:40 PM

One thing people used to do before scripts was make a bunch of triggers you had to hit in sequence, but hitting inactive triggers did nothing. They weren't triggers at all. Zelda Classic has doesn't have any way to have multiple triggers that do different things.*

 

I'll probably write that script later. Possibly tomorrow.

 

* It's possible to have a trigger only change itself when hit, or to have multiple triggers you need to hit all of, but again no "hit triggers in the right order".

 

Edit: I did it! If you like I can make the switches change to the next combo when stepped on, but this has all the basic functionality you want.

Script

 

 

Setup:

  1. Set the SFX_SWITCH_ constants to the sound effects you want. They can be the same if you want.
  2. Place each switch FFC and set the following parameters
    D0) Leave at 0 assuming you have no other FFC scripts on that screen
    D1) The number of this switch in the sequence (from 1 to the number of swiches)
    D2) The number of switches

That should do the trick. I even made sure to test it.


Edited by MoscowModder, 11 December 2014 - 11:26 PM.

  • Mr Silver likes this

#7 Mr Silver

Mr Silver

    Initiate

  • Members
  • Location:Spain

Posted 12 December 2014 - 11:41 AM

That was totally awesome. I edited it just a bit (I wanted different sounds when you step in a different tile) and it works totally perfect. Thank you so much! =)



#8 Mr Silver

Mr Silver

    Initiate

  • Members
  • Location:Spain

Posted 12 December 2014 - 09:59 PM

Well, I have a problem and I don't know if it's related with the script of this thread, with the headers (ffcscript, stdextra) that I included for this script to work or maybe it's totally unrelated and I broke a different thing.

 

Every warp in the quest that I had settled to some screen like 3C, 2A, etc., take me to 42, 30 instead. It's like the program translate the hexadecimal into decimal and then send Link there. I don't know how to fix it (I can move every screen to not hexadecimal places, if nothing more works, but I prefer to find the error and fix it, so it won't happen to me again in the future).

 

Can anybody help me? =)



#9 Lejes

Lejes

    Seeker of Runes

  • Members
  • Location:Flying High Above Monsteropolis

Posted 12 December 2014 - 10:31 PM

You probably moved that slider under the map in the Mechanics tab of the DMap options. It affects warp destinations, too. If you moved it forward 15, warps would also go 15 screens ahead of the given value.


  • Mr Silver likes this

#10 Mr Silver

Mr Silver

    Initiate

  • Members
  • Location:Spain

Posted 13 December 2014 - 06:45 AM

I thought that the slider was only to check your map XD

 

It works perfectly now, thank you!




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users