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

counter advanced when emitted object destroyed by movinator cursor

Archive: 3 posts


How do I advance a counter when I destroy an emitted object?2011-10-18 18:20:00

Author:
DragonSackBoy
Posts: 17


place a tag on the emitted objects and have it activate when the object is destroyed. Then use a tag sensor on the counter to register that.

You may need to put a small delay in so that the destroyer and the tag don't activate at the same moment. Just run whatever you are using to detect the cursor straight to the tag. Also run it to a timer set to go to .1 seconds and then run that out to your destroyer.

The only issue with this would be registering two hits within .1 seconds of each other, but that shouldn't be often at all as long as you can't kill two with one shot.
2011-10-18 20:34:00

Author:
tdarb
Posts: 689


Centralizing a sensor to detect the lack of the presence of certain tags has the advantage of allowing objects to destroy themselves instantly without having them take care of the signal transfer. However, it is a lot harder to detect the destruction of one when more then one are alive at the same time, let alone the destruction of more than one at the exact same time.

What I do in the shooter level I am building is the following: an enemy, when it decides it needs to destroy itself (i.e. after impact with a player bullet) -- and that destruction needs to be relayed to my score system -- it activates a score tag on its chips and a 0.1s timer. When the timer runs full, that activates a destroyer. During that 0.1s, the score system has the time to pick up the tag.

A tag sensor with a very large radius on my score logic picks up this destruction and does its magic with it. It can also pick up a simultaneous kill with a separate sensor set to a 2 tag requirement. Depending on how you want these signals processed and used after, you may want to have a look at my signal buffering tutorial (https://lbpcentral.lbp-hub.com/index.php?t=59607-How-to-buffer-events-(and-use-it-with-a-counter)).
2011-10-19 12:27:00

Author:
Antikris
Posts: 1340


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.