BG1, PRELOAD BG2, PRELOAD

Page 1 of 2 1 2 LastLast
Results 1 to 20 of 28

Thread: Toggle Switch

  1. #1

    Default Toggle Switch

    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'.

  2. #2

    Default

    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.


    .

  3. #3
    Junior Sackperson
    Points: 11,014, Level: 31
    Level completed: 67%, Points required for next Level: 236
    Overall activity: 1.0%
    7 days registered 5000 Experience Points 1000 Experience Points 500 Experience Points 250 Experience Points
    PSN
    Try and Guess!
    Join Date
    Nov 2008
    Location
    Locked in some room with Tony, Billy, Michael, Devin, Paul, Jane and Fluffy
    Posts
    415

    Default

    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.

  4. #4
    Toolmaster of LBPCentral v0rtex's Avatar
    Points: 44,607, Level: 65
    Level completed: 28%, Points required for next Level: 943
    Overall activity: 19.0%
    7 days registered 5000 Experience Points 1000 Experience Points 500 Experience Points 250 Experience Points
    PSN
    v0rtex2002
    Join Date
    Jan 2009
    Location
    Minnesota (USA)
    Posts
    2,086
    Blog Entries
    5

    Default

    Quote Originally Posted by RangerZero View Post
    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.
    Quote Originally Posted by DRT99 View Post
    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.

  5. #5
    Sack Wyth's Avatar
    Points: 9,544, Level: 29
    Level completed: 33%, Points required for next Level: 406
    Overall activity: 0%
    7 days registered 1000 Experience Points 500 Experience Points 250 Experience Points 100 Experience Points
    PSN
    Wyth
    Join Date
    Jan 2009
    Location
    The wetlands (more like snow lands right now)
    Posts
    264

    Default

    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.
    Levels:
    Jack McSetback & the Spiky Stone of Doom
    Jack McSetback & the Buccaneers' Booty
    Jack McSetback III, Work in Progress

  6. #6
    Junior Sackperson
    Points: 9,939, Level: 29
    Level completed: 99%, Points required for next Level: 11
    Overall activity: 0%
    7 days registered 1000 Experience Points 500 Experience Points 250 Experience Points 100 Experience Points
    PSN
    adlingtont
    Join Date
    Feb 2009
    Location
    South West England
    Posts
    325

    Default

    Quote Originally Posted by v0rtex2002 View Post
    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...

  7. #7

    Default

    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
    Last edited by Wonko the Sane; 03-13-2009 at 11:54 AM.

  8. #8

    Default

    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.

  9. #9
    Toolmaster of LBPCentral v0rtex's Avatar
    Points: 44,607, Level: 65
    Level completed: 28%, Points required for next Level: 943
    Overall activity: 19.0%
    7 days registered 5000 Experience Points 1000 Experience Points 500 Experience Points 250 Experience Points
    PSN
    v0rtex2002
    Join Date
    Jan 2009
    Location
    Minnesota (USA)
    Posts
    2,086
    Blog Entries
    5

    Default

    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.
    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!

    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.

  10. #10

    Default

    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.

  11. #11

    Default

    Quote Originally Posted by tameturtle View Post
    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.
    Last edited by Wonko the Sane; 03-14-2009 at 10:12 AM.

  12. #12

    Default

    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! :D

  13. #13

    Default

    Quote Originally Posted by tameturtle View Post
    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! :D
    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')
    Last edited by Wonko the Sane; 03-14-2009 at 01:46 PM. Reason: typo

  14. #14

    Default

    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 ... :D )

    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?

  15. #15
    Junior Sackperson
    Points: 11,014, Level: 31
    Level completed: 67%, Points required for next Level: 236
    Overall activity: 1.0%
    7 days registered 5000 Experience Points 1000 Experience Points 500 Experience Points 250 Experience Points
    PSN
    Try and Guess!
    Join Date
    Nov 2008
    Location
    Locked in some room with Tony, Billy, Michael, Devin, Paul, Jane and Fluffy
    Posts
    415

    Default

    if you place the emmitter far away enough... or have a sound when they are destroyed.... no problem!

  16. #16
    Junior Sackperson
    Points: 11,014, Level: 31
    Level completed: 67%, Points required for next Level: 236
    Overall activity: 1.0%
    7 days registered 5000 Experience Points 1000 Experience Points 500 Experience Points 250 Experience Points
    PSN
    Try and Guess!
    Join Date
    Nov 2008
    Location
    Locked in some room with Tony, Billy, Michael, Devin, Paul, Jane and Fluffy
    Posts
    415

    Default

    Quote Originally Posted by v0rtex2002 View Post
    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.

  17. #17

    Default

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

  18. #18
    Junior Sackperson
    Points: 9,939, Level: 29
    Level completed: 99%, Points required for next Level: 11
    Overall activity: 0%
    7 days registered 1000 Experience Points 500 Experience Points 250 Experience Points 100 Experience Points
    PSN
    adlingtont
    Join Date
    Feb 2009
    Location
    South West England
    Posts
    325

    Default

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

    Quote Originally Posted by dkjestrup View Post
    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.

  19. #19

    Default

    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.

  20. #20

    Default

    Quote Originally Posted by Wyth View Post
    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.

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •