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

Comparing Counters?

Archive: 14 posts


Hey,
I was starting a multiplayer level and a very important question came to my mind, since i'm not going along too good with logic.

How can you compare counters or timers?

I used the search bar to find similar topics to get an answer but it seems nobody ever had this problem.

I need the comparison to compare results of players without using points in a multiplayer game.
For example a fishing challenge, most catches wins. How do you do that?

Counters or timers might just be the wrong way to think to.
I also tried selectors but it also did'nt work for a comparison.

Is there an easy solution to this problem?
I'm grateful for every answer.
2011-07-29 22:16:00

Author:
Chicoleunis
Posts: 123


There are several ways to compare timers and counters working with analoug signals with things like direction compigners and sequencers. This is all laid out in a lot of detail in rtm's logic blog on the blogs page. I suggest reading them all as they will really enhance you logic skills. However if you struggle post here again and I will see if I can simplify it a tad.2011-07-29 23:10:00

Author:
Megafig
Posts: 52


Thanks for your answer but unfortunately my english knowledge is not good enough to have a fluenty read through his blog entries.
I've already read a few but it's very hard to understand for me.

I would be glad if you could explain one of these "several ways" a bit more.
2011-07-29 23:22:00

Author:
Chicoleunis
Posts: 123


Well, counters count how many times its input has been activated. Timers count time up or down to activate something.2011-07-29 23:23:00

Author:
StaticLinuxpro
Posts: 482


Okay I will get back to you shortly I just want to recap something myself2011-07-29 23:28:00

Author:
Megafig
Posts: 52


Well, counters count how many times its input has been activated. Timers count time up or down to activate something.

That's right but not the answer to my question.

I need to know how to compare the value of a counter/timer with the value of another counter/timer.
It can be done with a bit of logic but i just can't figure out how.
2011-07-29 23:29:00

Author:
Chicoleunis
Posts: 123


Okay so what do how do you want to compare them, I.e. Do you want to know which one is bigger (more full up) or smaller and then what do you want to do with this information2011-07-29 23:39:00

Author:
Megafig
Posts: 52


I want to compare the information of 4 counters after a certain amount of time to declare a winner, a 2nd a 3rd and a loser to give them points and make a ranking.

edit: i think i've found something interesting in rtm's 2nd entry Sorting & addition. That stuff may work.
2011-07-29 23:56:00

Author:
Chicoleunis
Posts: 123


Okay I will give you a brief rundown.

So we have 2 signals signal A and signal B. To compare A and B we get a direction combinger and wire A into the + and B into the -. Then we wire the output of the direction combinger into a direction splitter. We can then take both the + and - output from the direction splitter into 2 sequencers (of any length) with a battery filling up the whole of the sequencer circuit board. Make sure that in the sequencer tweak menu it is set to positional. Now if signal A is bigger the battery on the sequencer from the + output from the direction splitter will be active and if signal B is bigger the battery on the sequencer on the - output from the direction splitter will be active. I hoped this helped I will try and upload a pic but i struggle with anything more complex than typing and it's quite late here
2011-07-30 00:18:00

Author:
Megafig
Posts: 52


That's right but not the answer to my question.

I need to know how to compare the value of a counter/timer with the value of another counter/timer.
It can be done with a bit of logic but i just can't figure out how.
Sorry, I misread the question.
2011-07-30 00:19:00

Author:
StaticLinuxpro
Posts: 482


You could also check out Comphermc's LBP2-Torials. Especially the one explaining addition and subtraction in terms of logic.2011-07-30 00:52:00

Author:
DoodVogeltje
Posts: 81


I want to compare the information of 4 counters after a certain amount of time to declare a winner, a 2nd a 3rd and a loser to give them points and make a ranking.
You could transmit the 4 values to tags and use a sequencer and follower to scan from the highest signal to the lowest and allot the appropriate points each time you detect a tag.
2011-07-30 02:45:00

Author:
Ayneh
Posts: 2454


I tried Megafig's method and the explained way in the tutorial but i just don't understand how it can be player specific.
You just get a value in the end of the comparison but how do i know which one was from which player?
Another comparison with the values all players gained? I'm so confused...

By the way, i just noticed, that it does not work with counters.
They only do on or off so i used a selector selecting through batteries connected to a tag.
But my question still is: How can you know whose value is which value of the comparison?
2011-07-30 12:46:00

Author:
Chicoleunis
Posts: 123


If you use a test to find which one of the signals the highest signal is equal to, then hopefully you can trace this back to the player. There is a test for equality on rtm's blog again it think it's on the 3rd one with a lovely picture to go with it. Also if it helps you can store player data (which tracks back to each player) within objects like selectors and counters. I also believe this data should carry through rtms first method for sorting signals (in the second lbp2 edition)

Edit: also you can work out which input the largest signal is from in my first suggestion so this could be traced back to each player. I.e. If the + input is bigger then the sequencer (and battery) connected to the + output on the dir. combinger will be active.
2011-07-31 00:03:00

Author:
Megafig
Posts: 52


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.