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

Selector based Counter that Counts up and Down

Archive: 5 posts


Hey, I have created a selector based counter that counts up perfectly. Here is a tutorial on how to make it http://www.youtube.com/watch?v=_DxRDzbybUw&hd=1

basically the level shows a button to press, if the right button is pressed the counter goes up if the wrong one is pressed the counter goes down. I have the logic so it recognizes right/wrong button presses but i am having difficulty with making the counter decrease.

the units increase and decrease perfectly but the problem lies in when the counter goes over 10. When I try to go from 11 to 10, it goes from 11 to 20. I know it is because I have the input 1 of the first selector hooked up to the cycle input so i need a way of inverting the signal from this to make the second selector go in the opposite direction.

Hope this wasn't too confusing to read but couldn't really think of how to describe it. Thanks for any help and I will credit you when i publish the level (even though it probably wont get many hits :/ )
2011-03-05 19:28:00

Author:
Unknown User


Assuming that you are using a signal combiner to create your positive / negative signals...

You need to set up separate triggers on zero (input #1 of the selector) and 9 (input #10). Then base those on whether or not the original signal from the buttons was positive or negative.

I've created a sample chip. I added 1-count pulsers between the selectors and the positive negative logic, because the AND gates will cause them to be reused (for instance, through the first series of nine positive pulses, the hundreds digit would also go up - the pulsers prevent this). Then I route the results back into another signal combiner (9 - or selector input #10 - AND a negative button signal means we decrement. 0 - or selector input #1 - AND a positive button signal means we increment).

I flipped the whole thing so the digits would be in the right place:

http://i168.photobucket.com/albums/u180/v0rtex2002/LBP/APhoto.jpg
2011-03-06 01:21:00

Author:
v0rtex
Posts: 1878


Thank you so much! This works so well! Now I can finish my level! Thanks again!2011-03-06 12:22:00

Author:
Unknown User


Glad to be of service. 2011-03-06 22:42:00

Author:
v0rtex
Posts: 1878


If anyone needs such a tool, I've added mine to my Logic Library (https://lbpcentral.lbp-hub.com/index.php?t=51882-Logic-Library) level. I changed it a bit to be more modular. Each digit works on its own and I give a away both a full nine digit counter rig and an individual digit/chip that can be chained together.

LBP.me link: http://lbp.me/v/ygn7dx
2011-03-08 00:11:00

Author:
v0rtex
Posts: 1878


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.