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

Toggle Switch

Archive: 28 posts


In my level I have a grab switch connected to a light which I want to turn on when you grab the switch but stay on until you let go and grab again. Basically a grab switch which 'locks' its state when let go.
I've thought about using (from electronics) SR type Flip-Flop or a Monostable, however from what I've learned a SR flip flop has to inputs (one to set and one to reset) and a monostable turns on then turns off after a set amount of time. So what I'm looking for is a one input SR flip flop, a monostable which wont turn off or something in order to make a grab switch act as a 'toggle switch'.
2009-03-12 21:38:00

Author:
adlingtont
Posts: 321


Have your grab switch connected to 2 pistons and set it to "direction". Each piston much push a magnetic key in order to it lines up with a magnetic switch triggering the light on. A piston pushes the mag key in line, the other one pushes the mag key away.


.
2009-03-12 22:50:00

Author:
RangerZero
Posts: 3901


Nope, easier way (as far as I know)
Have a cardboard box on a piston with an emmitter on it. The emmitter emmits a block of dark matter with a magnetic key on it. Behind where the Block is , place a Mag key set to DIRECTIONAL and connect it to the piston. So when a block is spawned, the cardboard box is moved away. In your case, you'd also need a mag key set to on/off near the directional one. IMPORTAINT! Tweak the emmitter, set max emmitted to one, lifetime to infinite, and timing to 0.1. Set the timing on the piston to 0.1. have your swich connected to the emmitter set to one shot. There you go, an alternating swich.
2009-03-13 00:37:00

Author:
DRT99
Posts: 431


Have your grab switch connected to 2 pistons and set it to "direction". Each piston much push a magnetic key in order to it lines up with a magnetic switch triggering the light on. A piston pushes the mag key in line, the other one pushes the mag key away.



Nope, easier way (as far as I know)
Have a cardboard box on a piston with an emmitter on it. The emmitter emmits a block of dark matter with a magnetic key on it. Behind where the Block is , place a Mag key set to DIRECTIONAL and connect it to the piston. So when a block is spawned, the cardboard box is moved away. In your case, you'd also need a mag key set to on/off near the directional one. IMPORTAINT! Tweak the emmitter, set max emmitted to one, lifetime to infinite, and timing to 0.1. Set the timing on the piston to 0.1. have your swich connected to the emmitter set to one shot. There you go, an alternating swich.


Huh? I guess I don't get how either of these works, especially if you want the effect to be repeatable. Maybe I'd need to see a diagram.

I have a toggle set up that works very well that I am using with the paintinator. If the solutions already offered don't work out, let me know and I will draw it up for you. It could just as easily be made to work with a grab switch.

This would be one of my Mm wish list items: a toggle option on the switches where it makes sense. I hate that the only true toggle switch is that big, ugly, sponge-handled two-way.
2009-03-13 05:02:00

Author:
v0rtex
Posts: 1878


I use a toggle switch (2 way) that is pulled by weak winches. It's a easy way and the uglyness doesn't matter if it's not on screen.2009-03-13 08:49:00

Author:
Wyth
Posts: 263


Huh? I guess I don't get how either of these works, especially if you want the effect to be repeatable. Maybe I'd need to see a diagram.

I have a toggle set up that works very well that I am using with the paintinator. If the solutions already offered don't work out, let me know and I will draw it up for you. It could just as easily be made to work with a grab switch.

This would be one of my Mm wish list items: a toggle option on the switches where it makes sense. I hate that the only true toggle switch is that big, ugly, sponge-handled two-way.

No I don't see how they would work either. I've just tried an idea based around an emitter and a piston. The emitter emits a key which activates the light and half of an AND gate. When the switch is grabbed it activates the other input of the AND which makes the piston extend, pushing the key away from the light trigger and on to another and input which when will make the emitter emit again when the grab switch is grabbed.
This also had some problems though in which both ANDs were active at the same time.
Yeah a toggle switch option would be nice...
2009-03-13 10:17:00

Author:
adlingtont
Posts: 321


LordCanti, a member on this forum, has made several types of toggle switches. He has a level called 'just an example' or sometheing in which he demonstrates a 2 way toggle switch. Don't be fooled by the gates that are controlled by it. You can simply scrap the gates and add a on/off magnetic switch in the right place to connect with your light. Anyway, you'll see what I mean when you visit that level. It's all pretty obvious.

Edit: I forgot to mention: his design works with permanently emitting just one block with a key on them. In create mode the emitter may forget that it already emitted one and just emit a second one. This cloggs the switch, so you have to delete both of them manually, so the switch can start out fresh again. This doesn't happen in play mode, except by this way: you finnished making your level. The switch has already emitted one block, but you haven't paused the game ever since. Now, if you go to play mode and use the switch, it will clogg up again! So never forget that in game mode, your level must start out with fresh switches! If you make sure of that, no matter how long a player waits in between using the switch, it will never ever clogg. That's a promise
2009-03-13 12:44:00

Author:
Wonko the Sane
Posts: 109


I'm frequently using a switch based on Osprey71's toggle design. It has one input, like you need. It's a relatively simple construction with just two moving parts, thus easy on the thermo and not as messy as an emitter design. And it's quick and reliable.

I'd consider Wyth's brilliantly simple design (just one moving part!) if I needed two inputs. I haven't so far, but I'd be interested to see how quick it switches.
2009-03-13 12:58:00

Author:
tameturtle
Posts: 150


LordCanti, a member on this forum, has made several types of toggle switches. He has a level called 'just an example' or sometheing in which he demonstrates a 2 way toggle switch. Don't be fooled by the gates that are controlled by it. You can simply scrap the gates and add a on/off magnetic switch in the right place to connect with your light. Anyway, you'll see what I mean when you visit that level. It's all pretty obvious.

:hero:Wow... so after reading this I went Lord Canit's Just an Example level and realized just how simple it can be. I had never realized that the emmiters act like a queue - so if you have it set to a max of 1 at a time, and emit from it again in another location, the previously emitted object disappears. This changes everything! (okay, maybe not everything... but quite a few things). Rep to Wonko for showing me the light! :hero:

I am almost embarrased by the complexity of what I had been using (although they worked perfectly), as this is so much cleaner. I actually had a nice drawing ready (which you shall never see) to demonstrate my method! lol

I went in and changed all my toggles to use this method (then added a few more). However... I don't see that I really saved any therm.
2009-03-14 05:56:00

Author:
v0rtex
Posts: 1878


At the risk of repeating myself (and promised, it's the last time I mention it here): I can only recommend Osprey71's toggle design for being quick, silent, reliable and easy on the thermo.2009-03-14 10:44:00

Author:
tameturtle
Posts: 150


At the risk of repeating myself (and promised, it's the last time I mention it here): I can only recommend Osprey71's toggle design for being quick, silent, reliable and easy on the thermo.

I'm interested in the this design you talk of. Where can I find it? But anyway, Lord-Canti's emitter based toggle switch is not at all that heavy on the thermo either. Just make them in grid, and in grid only, an always use the same block-with-a-key for all your switches. That leaves you with one piston, one emitter and one keyswitch. And apart from the little forgetfulness of emitters in pause mode, they are as reliable and fast as they come! (switching takes 0.1 seconds)

oh and perhaps I could add this to: don't use any new materials in switches! Thats a waist of space. Also, I use glass blocks for all my switches and even for the emitted blocks (since I use the same blocks over and over again). Glass blocks reduce the risk of braking high-speed pistons juuuust that tiny bit that makes them almost perfect.
2009-03-14 11:06:00

Author:
Wonko the Sane
Posts: 109


Just search for "@Osprey71" to find a short level demonstrating and offering multiple switches. Except for the one-input toggle, most are interesting tech demonstrations of little practical value that can't compete with piston-based designs.

I tend to stay away from emitters in their current shape because I find them extremely cumbersome to work with and prone to misbehaviour. Good for you if you don't share this aversion of mine!
2009-03-14 11:43:00

Author:
tameturtle
Posts: 150


I tend to stay away from emitters in their current shape because I find them extremely cumbersome to work with and prone to misbehaviour. Good for you if you don't share this aversion of mine!

When my first real level comes out, It'll make you a convert for sure! By the way, my order of preference for making custom switches is: emitter, wobble bolt (bit annoying to configure and therefore grossly underrated), piston, and then anything else you can imagine, except for winches and those two- or three-way switches MM designed for sackpeople. To me, if you want to make a custom switch and not just something players can directly control, there is always a solution more elegant than using those things. (except ofcourse in the foolproof 3-way elevators I demonstrated in two published levels. See my thread under 'object demonstrations&apos
2009-03-14 14:44:00

Author:
Wonko the Sane
Posts: 109


Hehe, I'm a bit skeptical about becoming a convert - unless you position your toggle switches in plain view in your "real" level I'll not even notice their presence if they work as advertised. (But I guess I'll probably hear the emitted object dissolving when toggling anyway ... )

I'm not quite sure I understand correctly what you say about elegance further on, Wonko - surely you cannot beat a two-way and two winches in design simplicity, which most regard as the foundation of elegance?
2009-03-14 18:44:00

Author:
tameturtle
Posts: 150


if you place the emmitter far away enough... or have a sound when they are destroyed.... no problem!2009-03-15 02:58:00

Author:
DRT99
Posts: 431


Huh? I guess I don't get how either of these works, especially if you want the effect to be repeatable. Maybe I'd need to see a diagram.

I have a toggle set up that works very well that I am using with the paintinator. If the solutions already offered don't work out, let me know and I will draw it up for you. It could just as easily be made to work with a grab switch.

This would be one of my Mm wish list items: a toggle option on the switches where it makes sense. I hate that the only true toggle switch is that big, ugly, sponge-handled two-way.

It's essentially just moving the emmitter away from the magnetic swiches, so that when the 'activation block' is emmitted, it does not activate anything and moves the emmitter back. It needs a mag swich on directional to the piston to work.
2009-03-15 03:04:00

Author:
DRT99
Posts: 431


How about Trap-Ts switch? It uses a binary counter like system.2009-03-15 06:53:00

Author:
dkjestrup
Posts: 672


I have to say Osprey71's design was very good (I ended up using it!)


How about Trap-Ts switch? It uses a binary counter like system.

I like binary and all things logic/electrical. I sit in my electronic classes thinking 'how can I build that in LBP?'
Logic gates are fairly easy (and once you have a NAND you can make any logic gate) but then if you want analogue components (capacitors,resistors,transistors,maybe even a LDR) for whatever reason, that's where things would start to get complicated.
2009-03-15 12:23:00

Author:
adlingtont
Posts: 321


Osprey71's toggle switch is great, but It's still no competition for lordcanti's switch. His switch allows you to add magnetic switches in several potentially useful places (depending on your purpose). If I needed a straightforward toggle-switch, I would seriously consider Ospreys design though.2009-03-16 01:35:00

Author:
Wonko the Sane
Posts: 109


I use a toggle switch (2 way) that is pulled by weak winches. It's a easy way and the uglyness doesn't matter if it's not on screen.

I've been in need of a two-input toggle in the meantime and tried this design.

However, it seems to me that using one-shot winches set to 0.1s and tightness 10 is actually a superior solution - easy to set up, silent, reliable and quick to switch.
2009-03-19 15:38:00

Author:
tameturtle
Posts: 150


Hahaha... that you of all people should say this. Osprey 71 has a two-input toggle switch in that level of his. It works analogous to his one-input toggle switch.2009-03-19 15:44:00

Author:
Wonko the Sane
Posts: 109


Hehe

I know he has one, but a stock two-way with two winches reduces the count to just one moving part (and that one is quite possibly optimised by MM). It just doesn't get any simpler than that.
2009-03-19 16:27:00

Author:
tameturtle
Posts: 150


it can be done using NO moving parts:

1. create 2 bricks of material (1 heavy and 1 dissolve)
2. put the heavy brick on top of the dissolve brick
3. place the 2 stacked bricks on a surface
4. put mag key on heavy top brick
5. put mag switch on surface the bricks are on.
6. attach grab-switch cord to dissolve brick.
7, attach mag-switch cord to your LED

When the grab switch is grabbed, the dissolve brick dissappears and drops the heavy brick w/key into range of the key switch thus turning your light on permanently! No pistons, no emitters, a very untaxing design!

All kinds of things can be done with this type of switch and is the handiest switch in all of LBP IMO
2009-03-20 16:24:00

Author:
mindphaser74
Posts: 349


mindphaser, that's the well-known p-switch (p for permanent).

But we've been discussing a switch whose state can be toggled repeatedly.

By the way, your p-switch has at least one moving part, namely the heavy block (and arguably the dissolve block as well). Besides, you can simplify the design by putting the mag key on the dissolve block and inverting the mag switch - once the dissolve goes away, it takes the key with it, and the switch changes state.
2009-03-20 16:48:00

Author:
tameturtle
Posts: 150


mindphaser, that's the well-known p-switch (p for permanent).

But we've been discussing a switch whose state can be toggled repeatedly.

By the way, your p-switch has at least one moving part, namely the heavy block (and arguably the dissolve block as well). Besides, you can simplify the design by putting the mag key on the dissolve block and inverting the mag switch - once the dissolve goes away, it takes the key with it, and the switch changes state.

My apologies, their were ALOT of responses to this thread, I read some but obviously got confused.

The switch design I described might not be the best way to make a perma-switch, but it is very very handy when you use this technique to produce a multi-switch using several dissolve blocks between the key and key-switch. It has to be the best multi-switch design... I've racked my brain repeatedly trying to think of a better multi-switch but haven't thought of any yet. My multiswitch works perfectly. So yeah I guess I was describing a multi-switch and not a perma-switch. Again sorry. But if anyone needs a multi-switch, this is a great design IMO and is very handy.
2009-03-20 17:04:00

Author:
mindphaser74
Posts: 349


I found this ingenious way of doing it!

http://forums.lbpbuilder.com/viewtopic.php?id=430

There is an easier way too... check out FellBlade's "Tools Tutorial"
2009-03-27 22:16:00

Author:
SawronZXZ
Posts: 463


Over at the workshop Tyger picked up the idea of using one-shot winches on stock two-ways and reduced the count to one, mounted on the symmetry axis of the switch above it - when the winch pulls the lever up, inertia moves it over the peak, toggling the switch.

It's a bit tricky to set up but once done, this looks like the ultimate toggle switch - one input, quick, silent, reliable, and just one moving part. More testing needed but I think it's a winner.

That lbpbuilder posting you mention is hilarious, Sawron!
2009-03-28 02:22:00

Author:
tameturtle
Posts: 150


As mentioned, I think FellBlade's "Tools Tutorial" is better.2009-03-28 13:04:00

Author:
SawronZXZ
Posts: 463


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.