Home LittleBigPlanet 2 - 3 - Vita - Karting LittleBigPlanet 2 [LBP2] Help!
#1
Help with Advanced Logic
Archive: 17 posts
Please Help me! I have 26 Emitters. I am trying to use a Selectir or a Randomiser to To Turn On 7 Emitters When I press X In a Controllinator, and Activate 7 Random Others when I press it again, and so on. Can someone please help me????? Please?????? Sprinkle me with wisdom from your mighty brain! Thanks in Advance. | 2011-03-18 07:19:00 Author: BeaversLikeWood Posts: 119 |
How does this sound... x-selector (8 selects, 1st to randomizer, all next 7 loop to next select input on left side of selector, and to one of the 7 OR inputs on the OR that goes to teh randomizer) selector-randomizer reset (does that exist?) -7 in OR OR-randomizer Thus hitting button starts selector to reset the randomizer, then selects itself to auto go through its next 7 selects and each of those channels through the OR to hit the randomizer set on toggle until full. If you can't reset a randomizer...then this is a very bad response, and I should be banished from posting snarky responses for one day. | 2011-03-18 08:04:00 Author: celsus Posts: 822 |
My first thought is to have a 27-gate selector (gate #27 being the default, not hooked up to anything), gates #1-26 hooked to a randomizer (add, 0.1s on, 0.0 off) and have some logic that goes through the following pattern: reset selector (gate #27), turn on randomizer for 0.7 seconds, turn it off. Repeat for a new sequence. Edit: if the signals from the selector are meant to stay 'on', then in this setup you could add 26 permaswitches (1-count counters). These switches can get reset by hooking up selector gate #27's output to the reset input of each switch. | 2011-03-18 10:01:00 Author: Antikris Posts: 1340 |
That is pure genius. I ran it on some lights but not emitters, and I'm looking forward to see what happens. Thanks. I will play one of your levels and give detailed feedback as a Thanks. | 2011-03-18 10:09:00 Author: BeaversLikeWood Posts: 119 |
If you can't reset a randomizer...then this is a very bad response, and I should be banished from posting snarky responses for one day. There's no reset on a randomizer. Consider yourself banished from snarkiness. Antikris, I tried your solution and I'm either missing something or it's just not reliable. First, I had to set the randomizer's patter to add (to keep it from triggering the same output twice in the 0.7s). I completely bypassed the selector as it was no longer needed, and I hooked the randomizer to 12 1 shot counters (I only used 12 in my experiment but the principle will apply to any number). Then I hooked the button that starts the whole thing to a 1 shot counter set to reset itself. The one shot triggers a 0.7s timer at the same time it resets all the other counters. It mostly works, but it's random whether you'll get six or seven of the outputs to turn on during the .7s that the timer runs for. Basically the timer to randomizer isn't reliable enough. So here's my solution: http://ie.lbp.me/img/ft/0feacec7c6b9f45cb7b5be4f3d713eaf22d3c701.jpg Obviously this is a crazy simplified version: it only has one output because it gets impossible to see where the wires go when it's got more than one or two. So the first step is a self-resetting one-shot counter (converts the signal to a single pulse) which is tied into port two of that selector on the left. Port two of the selector turns on the randomizer (note that the randomizer's pattern is set to "add" so that it doesn't try to trigger the same output twice during a single cycle. The randomizer is hooked to the next selector (in the full circuit there will be 26 of these two port selectors to the right of the randomizer). Port two of each of these selectors is hooked to another one shot counter and to the emitter. Each of the 26 one shots (one for each of the 26 selectors) is hooked into an OR gate (shown here with two inputs, but you'll need to scale yours to 26). The OR gate is hooked to a counter set to count to 7. The counter's output runs back to port one of the first selector, which shuts off the randomizer once the count reaches 7. The first one shot (the counter on the far left) is also hooked into port one of all the 26 selectors (resetting them) and to the reset on the 7 counter. The parts that need to be duplicated are shown on the orange microchip: you'll need 26 of each of these. So when you turn the mechanism on, it sends a reset pulse throughout the circuit and turns on the randomizer. Once seven signals have passed through the OR gate, the randomizer is turned off, leaving the seven triggered emitters running until the circuit is re-triggered. | 2011-03-18 10:49:00 Author: Sehven Posts: 2188 |
First, I had to set the randomizer's patter to add (to keep it from triggering the same output twice in the 0.7s). I mentioned that in parenthesis inside my post, but as it is a requirement for this thing to work, I am glad you put extra emphasis on this setting. I completely bypassed the selector as it was no longer needed, and I hooked the randomizer to 12 1 shot counters (I only used 12 in my experiment but the principle will apply to any number). Then I hooked the button that starts the whole thing to a 1 shot counter set to reset itself. The one shot triggers a 0.7s timer at the same time it resets all the other counters. It mostly works, but it's random whether you'll get six or seven of the outputs to turn on during the .7s that the timer runs for. Basically the timer to randomizer isn't reliable enough. I tend to hook up randomizer to selectors most of the time, because from a selector's output gate I can connect to as many things I like, whereas wiring up a randomizer directly to those items will make the randomizer pick between them. Of course there are other conduits possible (a circuit node, an inverted NOT gate) but I find the selector the most versatile. For just this situation, though, I agree that linking the randomizer to 1-shot counters works fine. To beat the unreliable results from a time-based randomizer, we'd have to instead use a counter to keep track of how often the randomizer has fired. At first I thought of using the counter to measure the number of output signals, but a better solution is to use a self-resetting timer (0.1s) hooked to the randomizer and to a counter as well; the timer keeps firing off pulses until the counter is full and will stop the timer. A reset of the counter will kickstart the timer again. To circumvent the 0.7s delay you get from 7 randomizer pulses, you could further improve this setup by replacing the timer by a microchip with a NOT gate on it that both feeds itself (very rapid pulse) and the randomizer + counter. Turning the chip on and off would achieve the same effect. EDIT: got edit-ninja'd by you. | 2011-03-18 11:08:00 Author: Antikris Posts: 1340 |
To circumvent the 0.7s delay you get from 7 randomizer pulses, you could further improve this setup by replacing the timer by a microchip with a NOT gate on it that both feeds itself (very rapid pulse) and the randomizer + counter. Turning the chip on and off would achieve the same effect. Whenever you turn the randomizer off, it will clear the pattern, rendering the add setting useless. At least, that's the case when its input is set to on/off--I dunno' how it acts with other inputs. My solution works as fast as possible: 7 clock cycles on and 7 off=14 clock cycles=0.466s. If you were to manage to get the randomizer to propogate faster (you can't--it takes two clock cycles per output at the 0.0s setting), it would break the circuit because the counter wouldn't be able to tell when one signal stopped and the next started. Don't get me wrong. I liked your solution and if it can work (I haven't tried the counter thing you said), it would be much simpler to set up than mine was. I only built a version with twelve outputs and it was already lagging like crazy when I was hooking up the wires (it won't lag in play mode--the lag was the wires on the chip rearranging themselves while I set it up) so it would be a pain to build it with 26, so a solution that uses fewer wires than mine would certainly be a good thing. | 2011-03-18 11:38:00 Author: Sehven Posts: 2188 |
Whenever you turn the randomizer off, it will clear the pattern, rendering the add setting useless. At least, that's the case when its input is set to on/off--I dunno' how it acts with other inputs. Here is a pic of what I just made with 6 lights and a counter of 3 (3 random lights select at each button press). It works, almost. I had to set the randomizer to "Add Then Reset" or else it would do nothing anymore after it gave off 6 pulses. However, with this one it seems that every second button press (with 2 times 3 signals, completing its add pattern) one light won't turn on. Haven't figured out exactly why that is... If I could find a way to reset the randomizer's Add queue... http://i0.lbp.me/img/ft/2a0dc575ffd566f7804b0e33e835eb14a93ba9ff.jpg Here is the level (copyable), if you want to have a shot. http://lbp.me/v/y1jvzg | 2011-03-18 11:52:00 Author: Antikris Posts: 1340 |
When I tried it I had a Selector with 8 Outputs each cycling to an OR Gate and to the next imput of the selector. Each or gate was set up to a Randomiser to turn on different lights. The Controllinator was hooked up to the entire setup so that when I pressed X it cycled through, but would keep on going until you let go of X, there is no reset option. I'll try out your level. | 2011-03-18 12:03:00 Author: BeaversLikeWood Posts: 119 |
Republished the level (http://lbp.me/v/y1jvzg) including a second attempt. This one DOES work. http://ia.lbp.me/img/ft/07a8cd68c98e88cad7f1c8886a2bccb7135c5507.jpg Changes: - Randomizer put on chip just for clarity, not any real function - Button off state now resets the lights (just for the heck of it) - Button combined with inverse signal from counter turns randomizer ON - Randomizer set to Add - Counter counts signal pulses from randomizer now, instead of from pulser - Randomizer wired to inversed NOT gates that act as wire hubs - From these hubs, signal to 1-shot counters that turn on the lights and to self-resetting 1-shot counters that give off a pulse to an OR gate - This OR gate passes the pulse to the counter that hereby counts the number of pulses from the randomizer Sehven, you were correct. Turning the randomizer off will reset its Add queue. I cannot tell whether my setup can release a faster result; There are no timers involved, all are counters, and the randomizer is set to 0/0/0/0. | 2011-03-18 12:31:00 Author: Antikris Posts: 1340 |
That IS Advanced. Are you sure that there is no reset button or even a logic gate that does that? It's pretty annoying that it does not go through it once then stops. I have fiddled around with it, and there doesn't seem to be an option. | 2011-03-18 13:03:00 Author: BeaversLikeWood Posts: 119 |
That IS Advanced. Are you sure that there is no reset button or even a logic gate that does that? It's pretty annoying that it does not go through it once then stops. I have fiddled around with it, and there doesn't seem to be an option. Such is the nature of the Add/Add Then Stop setting of the Randomizer. Output wires stay on after activation until either the Randomizer is reset (turned off, when on ON/OFF setting) or when the queue of options has been cycled through. I wouldn't have figured it out without Sehven's comments. Thanks to him I learned a lot about Randomizers today. | 2011-03-18 16:10:00 Author: Antikris Posts: 1340 |
Looks like Antikris system is pretty similarly to mine (can't believe I didn't think to use one-shot counters instead of the two input selectors--they serve exactly the same purpose). Seems like a good solution and it's something I would never have thought to try if it weren't for this question, but now I know how to do it--which is pretty much why I hang out in the help section so much | 2011-03-19 01:55:00 Author: Sehven Posts: 2188 |
http://ie.lbp.me/img/fl/e9ef90d654d09ee17fdedca1b02da2a8023913b0.jpg On the left showing the chip on the holoboard over the dark matter, in the middle showing them moved apart, on the right the controllinator http://ic.lbp.me/img/fl/becd37db75024e2b238734cde053f8dfc48d0e87.jpg A test run. Here is my attempt of a solution... Basically emit the randomizer witht eh x button. I have 22 blue tag sensors connected to 22 lights. Each time I hit x it emits a quick 0% holo board with a chip that has a not looped, connected to the counter set to seven doubled to the XOR gate that is also connected to the not...and the XOR is hooked up to the randomizer set to toggle and intterupt pattern which connects to 22 blue tags. The emitter is set to .0 time infinate life, 1 max, destroy oldest, fade in and fade out. It seems to work. | 2011-03-19 05:59:00 Author: celsus Posts: 822 |
thanks for your posts guys, this gives me an idea of what i need for one of my upcoming levels. randomisers are pretty complicated. | 2011-03-19 06:14:00 Author: BeaversLikeWood Posts: 119 |
IF you try that last idea, let me know if it works...it seemed to for me each time...but I was not sure of what you were emitting (lasers, baddies, or just a point bubble). | 2011-03-19 06:56:00 Author: celsus Posts: 822 |
I thought I would have some fun with this as well and give it a shot. I have come up with a fairly simple solution. Here's the link. It is copyable so you can take it apart and play http://lbp.me/v/y3x7dr I made a piece of dark matter and put a chip on that with a tag sensor and a not gate. I set the tag sensor to require 7 tags. On that chip I placed 26 OR gates, and one randomizer. I ran the NOT gate into the randomizer input. I set the randomizer to run as fast as I could, and to run in add mode; and ran it into each of the open inputs on the OR gates. I looped the output of each OR gate back into one of its inputs so now it is acting as a sort of on/off switch that stays on once it has been hit. Now I closed all that and made a new chip next to it on the holo. On that I placed 26 tags that matched the tag sensor on the other chip. I then made a third chip with 26 AND gates and ran each of my OR gates into one of the inputs and the output from my tag sensor as the other input. Then ran each of those to the lights. i could have probably combined this and the tag chip, but I was trying to keep things from lagging while I wired it up. To reset it, just have the X button wired to a pulse that runs into a NOT gate, and then into the on/off input of the microchip with the randomizer on it. Here's what happens. when everything starts, the tag sensor does not see seven tags, so the NOT gate from it is active. This tells the randomizer to begin pulsing through its outputs. Each time it hits an OR gate, that OR gate activates, and since its output is fed back into its input, it stays on. This OR gate also activates a corresponding tag. This keeps going until there are exactly 7 OR gate/Tag pairs active. This triggers the tag sensor that then hits all the AND gates it is attached to, and causes the ones also attached to a charged OR gate to send the ON signal to the lights. When you hit the X button, the pulser activates shutting off the NOT gate it is attached to. This turns off the MC with the OR gates on it for a fraction of a second and clears them. Then it starts all over. | 2011-03-19 09:04:00 Author: tdarb Posts: 689 |
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.