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

Prize giveaway logic

Archive: 6 posts


I know the title sounds strange, but let me explain what I'm trying to do.

Basically, I'm giving away prizes in my music level. However I want the prizes to be emitted one at a time in one location. I originally was going to use a selector to simply cycle through the emitters, however I ran into a few problems.

1. When you collect a prize, I want a new, different one to emit.
2. When you collect a prize, I don't want the same prize to be able to emit again (can a selector possibly skip inputs?)

To go into a bit more detail, to select the prizes, you stand on a switch, and press left or right on the right stick to cycle through them, and then get the prize if you want it. Also, the objects being emitted are not actually prize bubbles themselves, but they are item boxes that you jump on, then they blow up, then you get the prize. The prize bubbles themselves will be out of sight. I know how to make the prize bubbles activate this way, but I'm having trouble getting the it to work with the two details above intact.

So if anyone has a solution that would be appreciated. Sorry if I made it hard to understand or not detailed enough, if you need more info just ask.
2012-04-03 18:33:00

Author:
DreJ1212
Posts: 240


Assuming I'm getting it right, i think its quite obvious. Connect the output of the circuitry you use to make the selection of the prize to a one shot counter and this one connected to the emitter which will emit the prize. Emitter should be set to one shot as well.2012-04-03 21:03:00

Author:
zupaton
Posts: 167


Assuming I'm getting it right, i think its quite obvious. Connect the output of the circuitry you use to make the selection of the prize to a one shot counter and this one connected to the emitter which will emit the prize. Emitter should be set to one shot as well.

The problem with this is, if I have it right, is that while it fixes the second problem to some extent, the selector can still cycle to it. Yes nothing will happen, but I'm wondering if its possible for this output to be skipped all together if the player already has the prize, if that makes sense.

Also I believe that this means the prize can only be emitted once with your method, so if the player selects a different one, he cant go back to the last one because the emitter can only emit once.
2012-04-03 22:25:00

Author:
DreJ1212
Posts: 240


Yes. Sure it makes sense. : )
Unfortunately though I was only thinking simply in a way that the player still can select the prize but can't get it if already did.
Sorry, Thats how far i could go, heh.
2012-04-03 23:00:00

Author:
zupaton
Posts: 167


As a note, I'm actually doing something completely different for the level now, but if anyone could answer this question, it could be useful info in the future.2012-04-04 05:14:00

Author:
DreJ1212
Posts: 240


I would use tag sensors and AND gates.

Put a microchip on each prize bubble you emit called "prize," and then use other tag sensors to determine which prizes to emit. I would use the one shot counter method as listed above to prevent a prize from being emitted twice.

Now use AND gates that will have two inputs and connect their output to each counter. To clarify, you'll have one AND gate and one counter per emitter. One of the inputs on each of the AND gates will be a tag sensor looking for your "prize" tag. You'll want to either put the output of the tag sensor to inverse, or run the signal through a NOT gate before reaching the AND gate.

The other input on the AND gate will be unique to each prize you want to give away. Once these activate, a prize will emit from the appropriate emitter, but then disable all the other AND gates by them detecting the "prize" tag.


Hope that helps!
2012-04-04 20:31:00

Author:
shane_danger
Posts: 283


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.