The forum has been archived
While the forum may not be active, the community still lives on Discord! Click here to join us.

Specific Order?

Working on a new level? Have Tutorials to share? Post your work in progress here!
Post Reply
User avatar
ElectroYoshi
Well-Known Member
Posts: 11061
Joined: October 18th, 2012, 8:27 pm
Design Competitions Voted: 1

Specific Order?

Post 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?
I need a shot again, that sweet adrenaline.
User avatar
kroltan
Developer
Posts: 285
Joined: October 8th, 2012, 6:57 pm
Design Competitions Voted: 1

Post 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.
User avatar
ElectroYoshi
Well-Known Member
Posts: 11061
Joined: October 18th, 2012, 8:27 pm
Design Competitions Voted: 1

Post by ElectroYoshi »

OK, it was tricky, but I think I've figured it out. Thanks.
I need a shot again, that sweet adrenaline.
User avatar
Entity
Editorial Staff
Posts: 3097
Joined: November 29th, 2012, 9:41 pm
Design Competitions Voted: 1

Post by Entity »

If you've ever messed with redstone in minecraft then what you want is a bunch of RS-NOR latches chained together :)
:crate: :crate: :crate: :crate: :crate: :crate:
User avatar
ElectroYoshi
Well-Known Member
Posts: 11061
Joined: October 18th, 2012, 8:27 pm
Design Competitions Voted: 1

Post 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.
I need a shot again, that sweet adrenaline.
User avatar
kroltan
Developer
Posts: 285
Joined: October 8th, 2012, 6:57 pm
Design Competitions Voted: 1

Post 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
User avatar
Entity
Editorial Staff
Posts: 3097
Joined: November 29th, 2012, 9:41 pm
Design Competitions Voted: 1

Post 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.
:crate: :crate: :crate: :crate: :crate: :crate:
User avatar
kroltan
Developer
Posts: 285
Joined: October 8th, 2012, 6:57 pm
Design Competitions Voted: 1

Post by kroltan »

Did you get it to work, EY and Entity?

(Also, everyone in this thread has the same avatar!)
User avatar
ElectroYoshi
Well-Known Member
Posts: 11061
Joined: October 18th, 2012, 8:27 pm
Design Competitions Voted: 1

Post by ElectroYoshi »

Got it working. Thanks Kroltan!! :3
I need a shot again, that sweet adrenaline.
Post Reply