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

How to make a switch toggle reverse motion of a series of pistons

Archive: 14 posts


Ok, I hope this isn't covered anywhere. What I'm trying to do is this. Underwater, I have a vertical hallway with pistons that close in from the sides. They move in a motion that forces you to go down. If you are too slow or try to go back up, you get squished. What I want to do is at the bottom of this hallway, I wish to have a 2-way switch that I can flip to allow me to go back up the hallway, by reversing the sync of the pistons.

How can I do this? All I seem to be able to do is toggle them on or off, or toggle them as all the way our or all the way in...
2011-05-06 03:47:00

Author:
Unknown User


You could have the switch(es) hooked up to a counter that rests itself when activated and have this counter hooked up to the toggle switch.
This should work, although I'm doing the Logic in my head...
2011-05-06 03:55:00

Author:
UberOrbPS
Posts: 290


One way you can do it is to use a timer for each piston. The timers length determines when it will close. So all timers start at the same time and the ones on top are the first to fill up, then on down to the bottom, which is the longest timer. Then use a button at the bottom to reset all the timers, and the pistons will open up again. I don't know if this could be done with a 2-way switch. But you will need a way to reset the timers if someone gets squished. So you could use a player sensor back at the checkpoint that they will return to. The player sensor will also reset the timers, so you will need an or gate for each of the timers reset, because the button will reset the timers or the player sensor will reset them. Edit: Oh and I forgot to mention that you need to tweak the pistons to forwards/backwards or in/out or whatever it's called. And the timers are start count up.2011-05-06 04:03:00

Author:
riverad08
Posts: 104


I'd use a sequencer to set the timing of the pistons. Then the 2-way switch can reverse the sequencer direction and the piston pattern will reverse. See attachment:

33685

The batteries are connected to forward/reverse pistons. The sequencer is also set to forward/reverse.
2011-05-06 04:33:00

Author:
Dr C
Posts: 122


I'm very close to figuring out what I want to do. I actually figured out a way that is almost a combination of riverad08 and Dr C suggested. Thanks guys! Here's what I have two way switch goes to a not gate and then to the 1st input of a selector. The 2 way switch also connects directly to the 2nd input of the selector. This makes the 2 way switch activate only one selector input at a time. The selector then goes to two different sequencers. The sequencers both contain toggles to cycle the pistons through a whole motion. One sequencer counts up, one counts down. As of now the only problem I get is how to make one sequencer stop looping so the other can take over. Right now they are combining motions and the pattern is messed up. Work on it more tomorrow.... Thanks guys!!!2011-05-06 05:06:00

Author:
Unknown User


Much simpler using a single sequencer that changes direction rather than separate 'Up' and 'Down' sequencers.

I edited my original attachment btw, it didn't need toggles at all. 33685
2011-05-06 05:20:00

Author:
Dr C
Posts: 122


But won't that 2way only turn it on and off? And how do I make the sequencer switch from forward to backwards?2011-05-06 05:28:00

Author:
Unknown User


Tweak the sequencer and set its trigger mode to Forward/Reverse.2011-05-06 06:11:00

Author:
Dr C
Posts: 122


Tried that, the two way only works in the on position. Just as I thought. It's either on or off, the 2nd direction doesn't force the reverse direction.2011-05-06 17:50:00

Author:
Unknown User


Tried that, the two way only works in the on position. Just as I thought. It's either on or off, the 2nd direction doesn't force the reverse direction.

The reverse direction of the sequencer, or the pistons? *Both* need to be set to 'Forwards/Backwards' btw.

It works fine here, throw the switch and the sequencer playback changes direction. If your sequencer only plays forwards it really sounds like its input action is not set on Forwards/Backwards.
2011-05-06 18:12:00

Author:
Dr C
Posts: 122


I'd use a sequencer to set the timing of the pistons. Then the 2-way switch can reverse the sequencer direction and the piston pattern will reverse. The batteries are connected to forward/reverse pistons. The sequencer is also set to forward/reverse.

Correct me if I'm wrong, but you will not be able to start the sequencer when you're at the top. Sure once you get to the bottom you can flip the switch, but there is no way for the pistons start closing as you're going down.
2011-05-06 23:30:00

Author:
riverad08
Posts: 104


set the sequencer to loop, wire the switch into the positive input of a combiner, then have a second wire from the switch going to a not gate, then wire the not gate to the negative input of the combiner, then wire the output of the combiner to the sequencer.
this will make the sequencer loop one way, then loop the other way when the switch is activated
2011-05-07 02:02:00

Author:
evret
Posts: 612


Correct me if I'm wrong, but you will not be able to start the sequencer when you're at the top. Sure once you get to the bottom you can flip the switch, but there is no way for the pistons start closing as you're going down.

Yup, in practice it'll need a touch of extra logic to get the ball rolling, say a player sensor and an AND gate.


set the sequencer to loop, wire the switch into the positive input of a combiner, then have a second wire from the switch going to a not gate, then wire the not gate to the negative input of the combiner, then wire the output of the combiner to the sequencer.
this will make the sequencer loop one way, then loop the other way when the switch is activated

I interpreted the OP as not wanting it to loop. If I misunderstood then that should work great (and would make more sense now that I think about it).
2011-05-07 08:40:00

Author:
Dr C
Posts: 122


the OP wasnt clear on that matter, but i just assumed he wouldnt want it to happen only once, makes more sense gameplay-wise to loop the sequence, then reverse the loop2011-05-07 08:53:00

Author:
evret
Posts: 612


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.