This is a tutorial for a mechanism that requires all braziers on screen to be lit to activate, but the braziers will burn out after a while unless the player is able to light all of them (in which case they'll all burn indefinitely).
On your combo page you'll need:
- An unlit brazier.
- A sequence of several identical combos (same speed/anim. frames) of a lit brazier, each cycling to the next in the series with the last cycling back to the unlit brazier. The number of combos you need in this series depends on three things: 1) the animation speed of the flame, 2) the length of the burn before it reverts to unlit, and 3) the precision of the burn time (e.g. is a burn time anywhere between 2.5 and 3.5 seconds going to be ok, or does it need to be as close to 3 seconds as possible?). The faster, longer and more precise, the more combos needed. I've gone with six.
- A permanently lit brazier.
(alternatively, rather than having a series of identical looking combos you could have the flame peter out over the length of the combo sequence. Keep the speed/anim. frames the same but use different tiles)
Set them up in your combo table as shown below. The picture on the right shows what inherent flags each combo needs assigned.
This section deals with the middle series of combos and how they relate to each other.
When you look at the 'Edit Combo' screen you'll see a little checkbox at the bottom that says "Restart Animation when Cycled To". This box was implemented because in earlier releases of ZC combos would animate in the table even if they weren't on screen, meaning that unless you had two combos with the same number of frames and animation speed you couldn't really know what frame of animation a combo would be in when it was cycled to. If for example you wanted to cycle to an animation of a statue crumbling, it could be half or even fully through the animation at the point the combo becomes visible on screen, leading to a less than impressive effect. The work around for this was to have a separate combo for every 1-2 frames of animation and have the first cycle to the second, the second to the third, etc., so that you could cycle to the first combo in the animation sequence and be sure that it would begin on the first (or second) frame. This gave a far better effect at the expense of combo table space and complexity. The "Restart Animation when Cycled To" option fixes this problem. You can have a single combo with a long animation and not have to worry about it starting half way through.
HOWEVER, as I discovered when designing this mechanism, the "Restart Animation when Cycled To" option affects all instances of that combo. So when I was lighting up a second brazier and cycling to a single combo of an animated flame, it would restart that flame's animation in addition to every other lit brazier on screen. This would reset the burn time for all lit braziers and have all of them go out simultaneously if you failed to light another one quick enough (this could definitely have utility, but not exactly what we're looking for right now). Because we don't want all the braziers to restart their countdown we need to leave "Restart Animation when Cycled To" unchecked and set up our combo cycling the old-school way.
So, we need a number of combos, each representing a frame or two of animation. Since the first combo could appear at any time throughout its animation we need to make the amount of time each combo is visible on screen brief if we want the burn time of the lit braziers to be fairly consistent (alternatively, if you want a more random burn time you can use fewer combos with longer animations). I've gone with two frames at a speed of 10, cycled over six combos. Not a very long burn time, but you can tweak this to your own specs.
If you have no idea what I'm talking about, here's an example that might help you visualise it. If you're with me, skip this spoiler:
My test screen is pretty simple: just three "braziers" (i.e. big triforces... I was lazy ok?) on a plain background.
Each brazier has an inherent flag 4 (burn trigger any), but we're also going to put screen flag 95 (trigger -> self, secret) on our braziers. We're using a trigger -> self flag so that only the brazier hit with a flame triggers, but since we also need secrets to activate we're using flag 95 instead of 94.
Quick section this time; just make sure 'Hit All Triggers-> 16-31' is checked. This makes secrets activate when all the burn triggers are activated (i.e. all the braziers are lit). If the dmap is set to Overworld or Interior and you want the secret to be temporary (it's permanent by default) just check 'Secrets are Temporary'. Secrets are always temporary in NES Dungeons and checking 'Hit All Triggers->Perm secret' doesn't change this.
Here's where things get a little tricky because we have to use a little known (and hidden) feature: tiered secrets. This allows you assign screen flags to secret combos and is necessary for more complex puzzles.
First of all, set all the 'Burn' secret combos to the first combo in our 'lit brazier' sequence. You also need to assign flag 95 to each of the secret combos (hold ctrl and click the secret combo). Without this, relighting a previously burned out brazier would trigger all the secrets, causing all braziers to ignite.
For our last step, we need to set our secret combos. Since we have given our lit brazier sequence the inherent flag 16, we need to set secret combo 16 to our permanently burning brazier.
Once all the burn triggers have been triggered, our screen data tells us to activate secret combos 16-31. Secret combo 16 is set as our permaburn brazier combo and all our lit brazier combos have flag 16 on them, causing them all to become permaburn braziers. Simple, right?
You would also use secret combos 17-31 to make some other change to the screen, for example a chest appearing. Otherwise the mechanism would be pretty useless.