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

Logic help, pressing buttons in a certain order

Archive: 4 posts


I can't seem to get my head around how to do this, but hopefully someone here can.

Basically I need to make it so (as the title says) two buttons must be pressed in the correct order for the outcome to occur. Say for example, to open a door, the player must hold down L1 and R1 in the that order. So if the player holds down R1, and then holds down L1 the door will not open. However if they hold L1 and then R1 the door will open. And both buttons must be held down for the door to open as well, so if the player presses L1, releases it and then presses R1 the door will not open. Just an example, not what I'm actually planning to do.

Hopefully I explained this right. Any ideas on how I would accomplish this?
2011-02-01 18:34:00

Author:
Doopz
Posts: 5592


ive had exactly the same problem when trying to create a keyroom/konami code kinda thing. i hooked something very rudimentary up once in the beta using loads of counters, ill have a look and see if i can work it out but hopefully someone who knows better can tell us the proper way2011-02-01 19:50:00

Author:
Skalio-
Posts: 920


I've been working on this same problem... I don't have it figured yet but I think I'm getting there. My thinking is to use a selector as the basic function. So the correct button press is wired up to cycle the selector forward. The wrong button press is wired up to reset it to the first port. (through an OR gate so any wrong button will reset the selector).

I'm trying to do it with four button presses, in the correct order. So each time the answer is correct, it moves forward to the next port, if it's wrong it starts over at the first. And the last port would be wired to whatever outcome you wanted to occur when the sequence was entered correctly (open a door or whatever).

I've been working on a way to randomize the correct sequence (say have a randomizer select the button order) and then have the player repeat it. I think I have it on paper but I've yet to implement it in game. I'll post again when I get it closer. The solution is a bit messy all together but I *think* it will work. I'll post pics too if I get it up and running. As always with logic though I would love to hear from others because I always feel like I'm going around it the long way.
2011-02-01 19:51:00

Author:
Unknown User


Thanks a bunch Jeffrey, using a selector worked. It looks overly complicated for the small thing it does, but I'm happy it works.

http://i3.lbp.me/img/ft/583d24caa527a745738fc25448b3ed7d56aae783.jpg

In this picture, X and then triangle must be pressed.
2011-02-01 20:05:00

Author:
Doopz
Posts: 5592


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.