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

Destroyed Sensor

Archive: 5 posts


Is there anyway to sense when an object has been destroyed to then make something else occur like an emitter to then work?2015-09-04 17:11:00

Author:
NexusDave
Posts: 14


Use a Tag to identify your object, and a Tag Sensor elsewhere in the level searching for that Tag.
Invert the Tag Sensor.
When the Tag is no longer present, the Tag Sensor becomes active.
2015-09-04 17:19:00

Author:
Ostler5000
Posts: 1017


Use a Tag to identify your object, and a Tag Sensor elsewhere in the level searching for that Tag.
Invert the Tag Sensor.
When the Tag is no longer present, the Tag Sensor becomes active.
If I have a multitude of tags that have the same label, is there anyway to sense that one of these has been destroyed?
2015-09-04 18:03:00

Author:
NexusDave
Posts: 14


You'll need unique tag labels, but it's pretty quick to just add a number to the end of each label like Label1, Label2 etc.2015-09-04 19:10:00

Author:
Pookachoo
Posts: 838


I had to go and create something to answer your question, took me 20 minutes but I found something that works.
It may not be an ideal solution, but it should work depending on what you're doing.
You may encounter issues if 2 or more objects are destroyed within 0.1 seconds of each other.
If that may be an issue, I'll see if I can come up with another solution, or a fix for that.


http://ic.lbp.me/img/ft/c7c37d5fda206481402a99c1afcce035cf0bdfd9.jpg
OK, so, I'll talk you through what you're looking at here -

The Tag Sensor is set to search the entire level for the green Tag, and has a count of 5. (In my example I used 5 tags that could be destroyed by grabbing sponges.)
Use whatever count you like, so long as it's higher or equal to the number of destroyable objects you need in your level.
The Tag Sensor is wired into one end of a Signal Combiner, and a Timer.
Set the Timer to 'Positional' for it's input, and 0.1 sec for it's length.

The Tag Sensor will output a signal equal to the number of tags it senses. (So, with a count of 5 Tags, it'll produce an 80% signal if there are 4 Tags present.)
The Timer tries to match the output of the Tag Sensor, but it has a tiny delay because it takes 0.1 seconds to fill or empty.

The Signal Combiner takes the 2 inputs, and outputs a positive or negative signal, depending on which output is greater.
(The outputs are normally equal, however the delay of the Timer causes there to be a brief difference in the two values.)
So, when a new Green Tag appears, the output is positive, when a Tag disappears, the output is negative.

http://i4.lbp.me/img/ft/ae4d7600669808d4be941d8a6f0c53d05755865c.jpg

This signal is then wired into a Signal Splitter, which is wired into two Sequencers with Batteries. This is because we need to change an Analog value into a Digital value.
(So, a 30% signal difference between the Tag Sensor and Timer automatically gets converted into a 100% signal.)

The Sequencers are set to positional, and the batteries to 100%.

Lastly, the Sequencers are wired into a Combiner and a Splitter again, so that we can establish whether a Tag appeared or disappeared.
My example produces a positive signal when a Green Tag is destroyed.
The positive signal was used to turn on a light, and the negative input wasn't used for anything and thus discarded.


I hope this sorts your problem out.
2015-09-04 19:11:00

Author:
Ostler5000
Posts: 1017


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.