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

I need a realy fast counter

Archive: 9 posts


Hello again, sacknation!

I have one new question:

I have many similar pieces on my level. After some trigger they start to destroy himself. I need to count amount that were destroyed. And here I have my small problem. I use magnet switch with counter. On pieces I have magnet key that power up on 0.1 second just before death. But some pieces destroyed at exactly same time and magnet switch can't react to each of them, so if there are two or more pieces deaths at one moment switch send only one signal.

How I can count each pieces death if it destroy simultaneously? Please help me!
2011-03-06 15:27:00

Author:
Domik12
Posts: 838


I don't know how easy this would be for you to do on your level, but you could have a tag on each of the items, and then tag sensors to detect the count. Tag sensors can require up to 100 tags.

If you have 20 items, just use 20 tag sensors set to require 1 to 20 tags. Then, as objects are destroyed only the appropriate tag sensors will be lighted no matter when objects are destroyed. You can use that to get a fairly fast and accurate count.
2011-03-06 16:15:00

Author:
tdarb
Posts: 689


Question- what are you using this counter for?

Does it matter if you only count by [more than 20], [more than 30], [more than 40] or does it have to be exact?

Giving a little more information on what the actual use of this device might be helpful.
2011-03-06 16:41:00

Author:
dr_murk
Posts: 239


I don't know how easy this would be for you to do on your level, but you could have a tag on each of the items, and then tag sensors to detect the count. Tag sensors can require up to 100 tags.

If you have 20 items, just use 20 tag sensors set to require 1 to 20 tags. Then, as objects are destroyed only the appropriate tag sensors will be lighted no matter when objects are destroyed. You can use that to get a fairly fast and accurate count.


I don't think that'll work. It's accurate, but if there were like 10 and I destroyed 2 at once, it would read it as 8. I think He wants a counter that can count the number that has been destroyed rather than the number that's left.

Although, your idea would work if he wasn't emitting anything.

@Domik - It would help more if we knew what the counter was used for.
2011-03-06 16:55:00

Author:
Devious_Oatmeal
Posts: 1799


Thank to all for feedbacks. About separate tags I thought too, but I can have on my level about 60 pieces and it will be not very easy to create. But it is good idea anyway.

Here my main level idea:

I will generate some amount of pieces (from 5 to 60) and after player push trigger button there starts chain reaction of pieces deaths . So I need to count amount of deaths for pushing players to the next level part or just replay previous.

Is I explain all clear? I am from Russia, so my English is not very good, sorry for that...
2011-03-06 18:07:00

Author:
Domik12
Posts: 838


I would try this. Have the tag sensors set up to detect the number of tags for each quantity (10 tags for 10, 9 for 9, etc). Set the output on them to inverted. Now run each of these into a three input AND gate. On one of the other inputs have a battery scaled to 1%. On the final input of the AND, have an on/off signal attached that you use to tell each level how many tags to count. This way, for each level, you can only get signals from the sensors that you switch on.

Run all of this into an adder so that you can then parse the analogue output to set the value of your display. This could be sort of a pain to set up at first, but it would be accurate and would work with any number of sneezies up to 100. If you need more, then just copy it and set the sensors to detect a different colored tag and you have 100 more.
2011-03-06 20:45:00

Author:
tdarb
Posts: 689


I would try this. Have the tag sensors set up to detect the number of tags for each quantity (10 tags for 10, 9 for 9, etc). Set the output on them to inverted. Now run each of these into a three input AND gate. On one of the other inputs have a battery scaled to 1%. On the final input of the AND, have an on/off signal attached that you use to tell each level how many tags to count. This way, for each level, you can only get signals from the sensors that you switch on.

Run all of this into an adder so that you can then parse the analogue output to set the value of your display. This could be sort of a pain to set up at first, but it would be accurate and would work with any number of sneezies up to 100. If you need more, then just copy it and set the sensors to detect a different colored tag and you have 100 more.

wow, thats an incredibly creative and clever way of doing that. I'm gonna remember this one! hah
2011-03-06 20:58:00

Author:
Epicurean Dreamer
Posts: 224


wow, thats an incredibly creative and clever way of doing that. I'm gonna remember this one! hah

lol thanks.
2011-03-07 04:19:00

Author:
tdarb
Posts: 689


I would try this. Have the tag sensors set up to detect the number of tags for each quantity (10 tags for 10, 9 for 9, etc). Set the output on them to inverted. Now run each of these into a three input AND gate. On one of the other inputs have a battery scaled to 1%. On the final input of the AND, have an on/off signal attached that you use to tell each level how many tags to count. This way, for each level, you can only get signals from the sensors that you switch on.

Run all of this into an adder so that you can then parse the analogue output to set the value of your display. This could be sort of a pain to set up at first, but it would be accurate and would work with any number of sneezies up to 100. If you need more, then just copy it and set the sensors to detect a different colored tag and you have 100 more.

Great solution! Thanks! I will try it as soon as I can
2011-03-07 17:27:00

Author:
Domik12
Posts: 838


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.