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

Having some trouble with my counter system

Archive: 3 posts


Hello all! Been trying to find a way to fix my system for a few weeks now. I just keep failing to make a good working system. However, I'm now using a part of Comphermc's Health bar system (from his 05 tutorial) and it definately works great for it. Only problem is just that it emits 1 more object than it should every time and I can't figure out why.

Let me first post the picture of the microchip it's all about so you'll understand what I'm trying to do.

http://i3.lbp.me/img/ft/65327498a6c32786ae4395172b1e77db47db92a4.jpg

The tag sensors are there to check whenever I kill a box. I have 4 different ones, each giving a different amount of 'points' in the end. They're wired up to the reset of an inverted 0.1s timer which activates a microchip with a battery on it. The batteries on these chips are set to 1%, 2%, 5% and 10%. These %'s will get added (trough the OR gate and the + of the direction combiner) to my timer (speedscaled 0.1s) which acts as a buffer. The sequencer is set to position and it has a battery accross the entire canvas. This one is just there to check if there's any value in the buffer. If there is, it'll activate the microchip with a timer that keeps pulsing a signal every 0.1s which activates the emitter (set to one time only), another inverted 0.1s timer and a microchip with a battery on it. This battery is set to 1% and is connected to the - of the direction combiner so it substracts from the buffer. The emitter emits an object that gets counted by my counting/'point' system (no problems with this one).

So as I said, it all works great except that it keeps emitting 1 more object than it should. For example, when I kill a box that adds 5% to the buffer the pulsing timer decreases it by 1% every 0.1s so this should be right, but the emitter emits 6 objects for some reason I can't figure out. I think it might be a problem with the sequencer but I don't know what else to use to check if there's any value in the timer. Can't fix it the easy way either, by just decreasing the battery %'s by 1, seeing as I have a box that adds 1%. Can't make this 0%. I should also add that the problem's only at the first or last emitted object. If I keep filling the buffer by killing boxes while the pulsing timer is still active it works like it should, except it still has that 1 extra object. So if I'd kill 6 boxes that add 10% quickly I'd get 61 emitted objects instead of 60.

Hope to get some help on this, really want to get this system to work as it will then work and look exactly the same as in some game I'm trying to recreate in LBP.



EDIT: Think I may have fixed it already, made the sequencer a bit longer (50 bars so 2% for each bar) and left some space between 0 and 1% in front of the battery. Seems to work like it should now, not getting any extra emitted objects anymore. Guess it was just because of the small delay in the sequencer. Does it matter if the sequencer is this long though? Does it take any extra space on the thermo because of it or is it just the same? I never made any sequencer this long.

I'd still like to know if there is another way to check if there's a value in the buffer though because of the small delay in the sequencer.
2011-10-30 11:39:00

Author:
Firehuntah
Posts: 75


I'm not entirely clear on what this system does, but since you only seem to need the digital output from your timer, couldn't you just invert the output then swap your + and -?

Inverting the output makes the timer have 0 digital signal whenever it is full, and 1 digital signal at all other times. So, if you start the timer completely full then swap the +/- signals going into your direction combiner you should be able to get what you need without the sequencer.

scratch that...doesn't work.
2011-10-30 12:48:00

Author:
tdarb
Posts: 689


Yeah I tried that, didn't work. Signal just stays on, even when it isn't at 100%.

Anyway, what this system does is make sure that the counter (which you can't see on the picture) only keeps going up by 1, while being able to break boxes that give 2, 5 or 10 points. There are other ways to do this which I tried as well but, once I've expanded this system, this seems to be the best way to make sure you also get the right amount of points when breaking 2 or more boxes at the same time.

It's kind of hard to explain it any better, but it's easy to understand when you see it working in game. Anyway, haven't had any problems with it since I changed the sequencer. Just that there's a small delay with this system.


EDIT: I have now extended the system so you're able to hit 4 boxes (either the same sort of box or a different box) at the same time and still get the right amount of points. Works perfectly on the first try and no extra delay in the emitter which is what I was hoping for. So yeah, the sequencer is fine as it is now. Didn't think the fix would be so easy. This microchip takes up a lot of space on the thermo though.
2011-10-30 13:57:00

Author:
Firehuntah
Posts: 75


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.