Home    LittleBigPlanet 1 - PSP - Tearaway -Run Sackboy Run    LittleBigPlanet 1    [LBP1] Help! [Archive]
#1

Hello, thanks for all the fish, and a logic question...

Archive: 9 posts


First of all, hello. *waves* I'm obviously new here.

Second, thanks not really for all the fish (Anyone else notice the similarity between LBP and The Hitchhikers Guide? Anyway...), but thanks to lbpcentral and everyone involved in creating the logic pack. I actually found this site by searching for "logic" in the game, where I came across the tutorials. They were very professional, entertaining, and informative.

Now to my question. It just so happens I'm creating an elevator. The logic pack example of an advanced elevator was easy enough to understand and I have everything working in that regard. My specific problem is that I'm trying to create some sequential logic for a fancy door. Said door will have several parts that will slide into place in a particular order, and slide open in the inverse of that order.

My first thought was to use a separate, one input AND switch for each piece (Lets call this an IF switch). When the first piece is in place, it's IF switch tests true, triggering the next piece, etc. The issue is that once the sequence is complete and the door is ready to be open, the IF switches follow the same sequence in testing false, rather than the inverse.

To put it simply, I'm looking to have:
Door closing - contract piston 1 [wait] 2 [wait] 3 [wait] 4
Door opening - expand piston 4 [wait] 3 [wait] 2 [wait] 1

Any thoughts? Perhaps I'm missing something small.

I'm long winded, I know...
2010-05-21 11:35:00

Author:
cgCody
Posts: 16


I used this for my door in Ankor Sack,
What I did was create a wheel with a key that rotates 180 degree (wobble) trough a directional input, and let it toggle a one input And switch for each piston etc. (have to time it though)

now when you inverse the wobble, it does it in exactly the reversed order (also depending on the time of movement on the pistons if it looks like an axect reversed movement.

If you still have questions I can show you the door in the editor,
might explain more than I can with words.
2010-05-21 12:41:00

Author:
Luos_83
Posts: 2136


This might not be the simplest solution, but this is what I'd do:

Set up 4 Set-Reset switches and 6 delay switches (2 delays between each Set-Reset). The top delay activates the Set-Reset to the right of it, and the bottom delay activates the one on the left. The delays are triggered by the Set-Reset next to them that they aren't triggering.

To open the door, you activate one winch on the leftmost Set-Reset. It moves across, activating the delay, and after a pause the next Set-Reset moves across, and so on down the line. To close the door, you activate one winch on the opposite Set-Reset, and the whole process operates in reverse, using different delays. The outputs to the pistons come from the Set-Resets.

EDIT: That was FAR more complicated than it needs to be, and no doubt completely incomprehensible. OK, here's the simple version.

Take a delay and format it so that the mag key on the delay goes past several mag switches in sequence. Set the mag switches to 180 degree angle radius, and also so that once the mag key has passed the switch that it remains on. Set each mag switch to direction and attach it to a piston.

When the delay switch extends, first it will activate the first mag switch. This will remain activated as the mag key continues to move and activate the next one. The door should open in sequence. Then, to close the door, the piston is simply retracted - first the fourth mag switch deactivates, then the third and so on.

Hope this helps!
2010-05-21 13:13:00

Author:
Holguin86
Posts: 875


Door closing - contract piston 1 [wait] 2 [wait] 3 [wait] 4
Door opening - expand piston 4 [wait] 3 [wait] 2 [wait] 1

Actually, v0rtex recently posted a pic (https://lbpcentral.lbp-hub.com/index.php?t=27080-need-logic-for-cutscenes!-help-please!&p=470450#post470450) for sequencing magic mouths which would probably work fine...


http://i168.photobucket.com/albums/u180/v0rtex2002/LBP/LBPLogic-2.jpg

...just set the mag switches to directional, and hook them up to the pistons.
2010-05-21 15:12:00

Author:
Aya042
Posts: 2870


^^ That's exactly what I was trying to explain above, but as they say, a picture is worth a thousand words. Thanks Aya.2010-05-21 15:55:00

Author:
Holguin86
Posts: 875


See what I mean? I thought I was missing something small. I ask for some help, and I receive 3 relatively simple solutions (when compared to the monstrosity I was coming up with.)

Thanks for the help fellas. In the spirit of learning new techniques, I'll try all 3 suggestions.
2010-05-21 21:59:00

Author:
cgCody
Posts: 16


Aya, wouldnt that move the piston only for the second the key goes by the switch?2010-05-22 11:06:00

Author:
Luos_83
Posts: 2136


Aya, wouldnt that move the piston only for the second the key goes by the switch?

Not 100% sure what you mean there.

I mean it's not my design, but I think the idea is, if the mag switch detection zones all overlap, then as the piston holding the key moves upwards, each switch is turned on, one-by-one, and when it reaches the top, all four switches are on at the same time.
2010-05-22 13:43:00

Author:
Aya042
Posts: 2870


Aya's suggestion worked perfectly. This is the method I ended up using for ease of tweakabilty.

If you care to check it out, and/or copy my example, I created a copyable level called Advanced Elevator 2.0. Note that the logic is stable, but I can't verify that for the model. It seems after slightly shrinking down the elevator car, the pieces don't quite fit perfectly. Therefor it is possible that the pieces can get stuck, though I haven't had that happen yet.
2010-05-23 01:45:00

Author:
cgCody
Posts: 16


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.