Home LittleBigPlanet 2 - 3 - Vita - Karting LittleBigPlanet 2 [LBP2] Help!
#1
Switches in a certain order
Archive: 4 posts
Hey, guys. So here is my newest obstacle: I have two grabbable objects that serve as switches. A sensor registers when you grab them, and for the purpose of this explenation I'll call them "A" and "B". I'm trying to set them up in such a way that if you grab them in a certain sequence, you'll trigger an event (in this case, a door opens). Example, if I were to grab them in the order A, B, A, A, B, A - the door would open, but if I at one point hit the wrong swich, it the profess would be reset, and I'd have to start over. My first atempt was a buildup of selectors where if I grabbed the right switch, the selector would start to feed a signal to a new selector, but if you hit the wrong swich, it would go to a OR gate that reset every selector back to default. This crashed because when I grab the correct switch, the signal does indeed proceed to the next selecter, where the switch I grabbed is wrong - hence the reset commences. I dunno if that made sense, but basically what I need is to either delay the signal into the next selector, or make it so that when I grab switch A or B, it generates a single "pulse" signal that only goes through the inteded selector, instead of continuously feed while I'm hanging on to the switch. The second atempt was similar, but I tried to use counters instead of selectors. Every segment of the sequence had a single counter assossiated to it, and a "master-counter" counting up to through the 8 times you'd have to hit the two switches. Though I did some changes to the formula from my first atempt (I tried to use timers, but I couldn't really tell you how I hoped it'd work) the end result was fruitless. Anybody know of a tutorial that handles this type of scenario, or know a way to do it off the top of their heads? Much obliged, whmchrish P.S. I admit I have a slight problem with limiting myself when I write on forums like this. My apologies to anyone offended by it. | 2012-02-23 00:59:00 Author: Unknown User |
Compher made a video on that i think... [Part 1] (http://www.youtube.com/watch?v=nCryeXkKpDQ&list=UUhuVRageHxiKjyJiXzV0c1Q&index=27&feature=plcp) and [Part 2] (http://www.youtube.com/watch?v=Yr63uFrRNS8&list=UUhuVRageHxiKjyJiXzV0c1Q&index=26&feature=plcp) Hopefully it can help | 2012-02-23 01:10:00 Author: StaticLinuxpro Posts: 482 |
I had a go and squeezed my brain remainders lol to find a way for an easily manipulateable setup regarding the order of inputs using a sequencer and came up with the follow: http://i2.lbp.me/img/ft/9922094f56dcee3de2b0332735f3110e44657b3f.jpg Although its quite easy to build and setup, the modular easyness goes mainly for the order of input as long as there are only 2 different inputs. If you want a more modular system that can accept more than 2 inputs you should stay with Comphs method. The main circuit is the 2 switches that go to countdown timers set to 0.1 then through the OR gate they are going to a sequencer set to START-STOP and timing is 0.1 as well. The speaker is for testing purpose to have a clue when you press the wrong button. Now inside the sequencer the bars represent each press (grab) of a button, so you simply put the Blue-Red batteries on each bar in the order the buttons should be pressed. So in the pic the upper half represents the Red button and the lower the Blue. In this case i tested it for 4 presses, hence the 4 batteries and the order is, if its not obvious : p , Blue-Blue-Red-Blue. You can expand the sequencer and add as many as you want in either area (Blue or Red). You just make sure they dont overlap, they have the same length and position as in the picture and you have them all connected on an OR gate before the signal leaves the sequencer. Obviously all Red will connect to an OR gate and all Blue to another OR. Finally the timer at the end of the sequencer is the success switch and is set to Back-Forth and set to 0.1 as well. Hope this helps too as just an alternative. ; ) For the shake of simplicity, below is a more clean variation of the above which uses tags and sensors and looks tidy but has the drawback that you have to put the sequencer outside the chip: http://i4.lbp.me/img/ft/f64329a24f6234f8e25b6078431bfffdd9b67bcd.jpg As is, the circuit warns you and resets the very next moment you press the wrong button in the sequence which makes kinda easy to memorize or write down each step and the next time you will try it you will have 1 less guess to make. That will be a nice addition that removes frustration in a level but hardly helps in a lockbox case. So the picture bellow concludes this sort (or rather long lol) of tutorial, by adding a reset method and warns you if not correct, only when all 4 decisions (and buttons in the sequence) pressed. http://ic.lbp.me/img/ft/f4cb6a43a2300960782f9d42c1ecb88fbb4c00cf.jpg The new additions are, the blue tool at the middle is a counter set 0 to 4 (should increase accordingly if you add more buttons at the sequence) connected to the AND gate along with a Green Inverted Sensor and that AND gate is connected to the Orange/Yellow Inverted Countdown Timer set to 0.1 which is connected to the ON/OFF connector of the chip where the Sequencer is nested. Finally (and really hope this is the end lol) the Green Tag wich decides if the sequence was right, should span a bar and a quarter to the left of the final tag sequence. Radius of sensors should be big enough to cover the Sequencer Chip. Dont ask me how it really works because i cant recall right now. If anyone figures out just tell me. lol Darn.That went more coplex than i thought initially | 2012-02-23 14:22:00 Author: zupaton Posts: 167 |
My first atempt was a buildup of selectors where if I grabbed the right switch, the selector would start to feed a signal to a new selector, but if you hit the wrong swich, it would go to a OR gate that reset every selector back to default. This crashed because when I grab the correct switch, the signal does indeed proceed to the next selecter, where the switch I grabbed is wrong - hence the reset commences. I dunno if that made sense, but basically what I need is to either delay the signal into the next selector, or make it so that when I grab switch A or B, it generates a single "pulse" signal that only goes through the inteded selector, instead of continuously feed while I'm hanging on to the switch. You have the right idea. Place a counter set to count to 1 which resets itself between each switch and the selectors. Each time you grab a switch the counter will generate a "pulse" signal as you say and hopefully it won't activate the next selector prematurely. If the above doesn't work to delay the signal to the next selector by 1 frame you can use a 2 port selector and input into the cycle port. Each time the selector is cycled there's a 1 frame delay until the next output port goes high. | 2012-02-23 16:07:00 Author: Ayneh Posts: 2454 |
LBPCentral Archive Statistics
Posts: 1077139
Threads: 69970
Members: 9661
Archive-Date: 2019-01-19
Datenschutz
Aus dem Archiv wurden alle persönlichen Daten wie Name, Anschrift, Email etc. - aber auch sämtliche Inhalte wie z.B. persönliche Nachrichten - entfernt.
Die Nutzung dieser Webseite erfolgt ohne Speicherung personenbezogener Daten. Es werden keinerlei Cookies, Logs, 3rd-Party-Plugins etc. verwendet.
Die Nutzung dieser Webseite erfolgt ohne Speicherung personenbezogener Daten. Es werden keinerlei Cookies, Logs, 3rd-Party-Plugins etc. verwendet.