Page 1 of 1

Specific Order?

Posted: June 19th, 2014, 7:27 pm
by ElectroYoshi
For my latest level, I'm incorporating a puzzle in which you have to activate things in a certain order in order to progress. I want it to be so that you absolutely HAVE to activate them in that one order, and if you get it wrong, it's reset and you have to try again. How would I go about doing this in Atmosphir?

Posted: June 20th, 2014, 3:50 am
by kroltan
You would need a trigger that is activated and remains such when the previous "thing" has been activated (e.g. a counter that activates on greater than or equal to 1), and use an AND conditional of this information with something else.

Posted: June 21st, 2014, 2:02 pm
by ElectroYoshi
OK, it was tricky, but I think I've figured it out. Thanks.

Posted: June 21st, 2014, 2:58 pm
by Entity
If you've ever messed with redstone in minecraft then what you want is a bunch of RS-NOR latches chained together :)

Posted: June 21st, 2014, 3:35 pm
by ElectroYoshi
Would either of you mind being more specific? I've been sitting here trying to pull it off for the last hour and a half or so, and I just can't seem to do it with that information alone.

Here's a little more information if it helps: I'm trying to make it so that you have to step on 4 colored tiles in a certain order. Each tile is distinguished by color and encompassed by an area condition item, and I want it so that players have to visit those boundaries in that one order.

Posted: June 21st, 2014, 4:24 pm
by kroltan
It's super simple if you don't mind about resetting, and becomes very complex if you want to invalidate the "code" if the player does it incorrectly. I've built the resettable version using counters and area triggers.
  1. Place an area trigger on each tile
  2. Place a Count trigger next to each area trigger (set Active Trigger to All Conditions and Count Value to 1, make sure it's on "Greater Than or Equal" mode)
  3. Add a Active Trigger condition to each counter to its respective area trigger (On Stay Area)
  4. For each count trigger, add each other tile's On Stay Area to the Reset Trigger, except the previous step and itself (e.g. if the sequence is ABDC, counter D will reset when area A or C is entered)
  5. Add the previous step's Count Condition to each counter (e.g. if the sequence is ABDC, place B's count condition on D)
  6. Place a Trigger interactive somewhere, and hook it to the last step's Count Condition (C, in my examples. This is so you may change the actual code without having to retrigger the target machinery)
  7. Use the recently created Trigger to activate anything you want.
A example draft can be downloaded here: https://dl.dropboxusercontent.com/u/171 ... _test.atmo

Posted: June 21st, 2014, 4:55 pm
by Entity
I'm assuming that you don't care if someone reactivates a trigger that's already been activated?

Here's how I would do it:

Lets say you have three triggers, 1, 2 and 3. You have to keep track of one thing for each of them: is it active?

When player enters trigger 1:
  • Mark trigger 1 as activated
When player enters trigger 2:
  • IF trigger 1 is activated, activate trigger 2
  • IF trigger 1 is not activated, reset everything.
When player enters trigger 3:
  • IF trigger 2 is activated, activate trigger 3
  • IF trigger 2 is not activated, reset everything.
I actually just got a new laptop so lemme download Atmosphir and I'll check out your demo kroltan.

Posted: June 23rd, 2014, 6:24 pm
by kroltan
Did you get it to work, EY and Entity?

(Also, everyone in this thread has the same avatar!)

Posted: June 26th, 2014, 2:25 pm
by ElectroYoshi
Got it working. Thanks Kroltan!! :3