Home    LittleBigPlanet 2 - 3 - Vita - Karting    LittleBigPlanet 2    [LBP2] Help!
#1

3 little lights

Archive: 5 posts


Ok so I'm doing a pinball level that requires some lights to be turned on/toggled in a certain order.

This sounds simple, but believe me it's doing my head in! So if you think you are up to the challenge here is the truth table that I require:

3 lights A,B,C

if A-on, B&C-off + R1 = B-on, A&C-off
if B-on, A&C-off + R1 = C-on, A&B-off
if C-on, A&B-off + R1 = A-on, B&C-off
if A-on, B&C-off + L1 = C-on, A&B-off
if C-on, A&B-off + L1 = B-on, A&C-off
if B-on, A&C-off + L1 = A-on, B&C-off
if A&B-on, C-off + R1 = B&C-on, A-off
if B&C-on, A-off + R1 = C&A-on, B-off
if C&A-on, B-off + R1 = A&B-on, C-off
if A&B-on, C-off + L1 = A&C-on, B-off
if A&C-on, B-off + L1 = B&C-on, A-off
if B&C-on, A-off + L1 = A&B-on, C-off

If A,B,C-on trigger X (sequencer) -> A,B,C-off

Trigger for turning on any one of these switches will be a mag key on the ball, this can toggle lights on/off the R1/L1 buttons will be used to cycle the lit/unlit lights left or right.

I tried myself with no luck.

Your time starts..... NOW!
2011-02-02 03:02:00

Author:
Strangepom
Posts: 445


I think I know how to do it, I'll try it when I get home. However, I don't understand the meaning of this: "If A,B,C-on trigger X (sequencer) -> A,B,C-off"2011-02-02 06:02:00

Author:
Tobby
Posts: 15


Ah - I needed a good challenge. The answer is fairly simple (even though the solution still gets a bit complex)... XOR gates. You basically only have two possibilities for each light - ON or OFF. After all, if two are exclusively ON then one is OFF. So...

I've used three colored lights (RED, BLUE, and YELLOW) to illustrate my solution and color coded the logic gates as well (so RED & BLUE both ON = VIOLET, RED & YELLOW = ORANGE, and BLUE & YELLOW = GREEN).

To get the "only one ON state" we use an XOR AND'ed back to the specific light (tag):

http://i168.photobucket.com/albums/u180/v0rtex2002/LBP/APhoto_10-1.jpg

To get the "only two ON state" we use an XOR of the inverse (NOT gates):

http://i168.photobucket.com/albums/u180/v0rtex2002/LBP/APhoto_9-1.jpg

These are combined (AND'ed) with the L1/R1 inputs and the routed through OR gates to get to one of six states: A, B, or C exclusively ON and A, B, or C exclusively OFF:

http://i168.photobucket.com/albums/u180/v0rtex2002/LBP/APhoto_11-1.jpg

And finally, these six possible outputs are filtered back through 3 OR gates to set on the tags (which activate the lights).


There may be an easier solution, but this was the only way I could think to do it. I hope it helps. I have this saved. If you wish to friend me on PSN, I will gladly share it.
2011-02-02 06:44:00

Author:
v0rtex
Posts: 1878


Okay..... so this works if 2 lights are on at any one time as well as when one light is lit?

and WOW! very impressed, a solution within 3 hours of posting (inc time to find the post, solve the problem AND post pictures)

I tried it myself with combination OR and AND gates, the results were less than promising. I see you have used a selector and no toggle, I think I may have over complicated my attempt by linking toggles back to my AND gates.
At least your solution works, mine lit up the lights seemingly at random, quite complex for such an apparently simple thing.

I think I need to send a friend request. As it would be better to see the solution working than try to copy from the pictures and mess something up.

@Tobby the sequencer thing is easy, it just means that if you have managed to pass the ball over all three tags and lit them up a sequencer is triggered to play you a fanfare and flash lights at you then to turn off all 3 lights again.
The L1 R1 is so you can shift the lights so that when the ball is falling towards a lit light you can shift the light left or right to light another.
2011-02-02 11:57:00

Author:
Strangepom
Posts: 445


Yeah - the selector is actually sort of redundant. It ensures that only one solution is selected at a time, but because of the set/resets on the L1/R1, there's not much chance of multiple signals coming through anyway, so that center group of six colored OR's could just as well be routed directly to the last group of OR's (the ones that feed back out to the light/tags).

Sure - friend me. I'll send it over to ya.
2011-02-02 15:39:00

Author:
v0rtex
Posts: 1878


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.