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

Problems with tag sensors.

Archive: 3 posts


I made a level recently, and I realized that it had a couple of pretty big flaws that I have no idea how to fix. My level is inspired by Space Invaders, but instead of moving your tank along the ground, you toggle between four stationary guns. Only one can fire at a time, so the challenge comes from having to divide your attention. Aliens come straight down towards your guns, and if one hits you, you lose a life. To register a hit, I'm using a tag sensor on the cannons with a tag on the aliens (everything's made of holograms, or I would have considered a collision sensor). Each cannon's sensor is hooked to an or gate, and the gate is hooked to a counter. Each time the counter goes up, a life is lost. My problem is that if two cannons are hit at the same time, it only registers one hit. It's a pretty major flaw, and I can't think of a way to fix it. Any ideas?2011-01-24 04:52:00

Author:
Nucleotyde
Posts: 27


The collision detector will work even with two pieces of holographic material. I'd recommend you try using a collision detector on each of your tanks as it sounds like you already have all of your aliens tagged so the collision detector would be against the tag that the aliens are using.

The output of each collision detector would go into the OR gate but I do not know if there would be timing issues if two inputs where sent to the OR gate at the same time. Would there two discrete outputs separated by a clock cycle or would two simultaneous inputs be processed in the same cycle and sent as a single output.

I think that if both signals are actually simultaneously received regardless of using the impact sensor or the tag sensor you'll get the same result on the OR gate.
2011-01-25 01:15:00

Author:
Trindall
Posts: 297


Nucleotyde, I'm posting an example level for you that uses rtm223's Adder logic and some stuff I learned from HOW-TO-Convert-Timer-into-Health-Bar (https://lbpcentral.lbp-hub.com/index.php?t=44386-HOW-TO-Convert-Timer-into-Health-Bar) The examples show a 4 way simultaneous hit handled by an OR switch (taking away only 1 of 5 lives), and the second replaces the OR with a microchip that uses an Adder and other logic to combine the signals and take off 4 Lives (You may notice that the 5 lives are actually remaining on a 0.1 Timer that has 12 hits available for each single hit [a 25% analog signal]) I did this so both examples would have 5 lives. I'm still learning myself, so it's not great, but might point you in the right direction... [check out the above link and rtm223's Analog Logic Blog]

[EDIT:] I have just started into rtm223's Analog Logic Blog #4, and it is covering Samplers and how to adjust the output with Multipliers to get around the issue I had above, where the Timer had 12 hits total. Of course, with the above logic, you could tie in an Add Lives signal and store more than 5 lives also... So approach depends on your needs.

PM me after you copy it, please.

Level Link: Test Level (http://lbp.me/v/w0smt8)
2011-01-26 02:20:00

Author:
SledKnight
Posts: 93


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.