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

Health bar and healing item logic dilemma!

Archive: 11 posts


What I want to achive is an item, which on it's collection resets a counter. I tried doing this by making my item, obiusly, then there is a destroyer activated by a impact sensor, which is triggered by a tag in my sackbot, and that destroys the item when he touches it. He has an impact sensor wired to reset his counter healt bar, which detects the tag on the healing item. But, when he collects the item and triggers the items destruction, his counter does not get reset. It seems that his impact sensor does not detect the item's 'heal' tag but the item's impact sensor detects his "player" tag and gets destroyed. So he collects the item, it makes a healing sort of sound, but it doesn't heal... Can someone help?!2011-01-25 22:10:00

Author:
Screeno
Posts: 153


Why are you using impact sensors? Why not use Magnetic Keys/Tags?2011-01-25 22:19:00

Author:
Unknown User


Why not? It seems that when the thing gets destroyed, it's "heal" tag is not sensed...2011-01-25 22:22:00

Author:
Screeno
Posts: 153


Why not? It seems that when the thing gets destroyed, it's "heal" tag is not sensed...

You just answered your own question.

Use tag sensor instead.
2011-01-26 08:27:00

Author:
Ungreth
Posts: 2130


Yeah, there is a slight fail in the system when connecting impact sensors to destruction switches, arguably the destruction happens too soon, though it does really depend how you look at it.

Anyway, you can delay the activation of the destruction switch by 1/30th of a second, by wiring the impact sensor into the bottom of a microchip. inside the microchip place a battery and then wire the battery to the destructor. This should work due to the latency issue of wiring into the bottom of a battery.

Alternatively, another solution requires 2 pulse generators (counter, set to maximum count 1 with the output wired to it's reset) and connect:

impact -> pulse -> NOT -> pulse ->destroy.

This will similarly lag the impact signal by 1/30th of a second. This will be enough time for the other impact sensor to detect the impact as well and so you should have the object destroying and the heal collected.
2011-01-26 09:13:00

Author:
rtm223
Posts: 6497


try setting a timer before the object is destroyed.. Like have the impact sensor trigger the heal tag, and the timer which is set to like 0.4, and then the destroyer.

the only way I could figure it wouldn't work is if the object is getting destroyed before it emits the heal tag... Also make sure you tweaked the emitter. I think it defaults to 2 second intervals, you need to change that to 0.1 sec, make it last maybe one second, and make it only emit one.

I had a similar problem yesterday, and this seemed to fix it.
2011-01-26 14:33:00

Author:
Madafaku
Posts: 738


I agree with madafaku. I add a 0.1 second timer count up trigged by tags or impacts to delay sdestruction until after events. I feel LBP2 performs destructions too soon, and they should be the last thing that happens in a chain of events, so we have to add a delay.2011-01-26 14:37:00

Author:
Shifty Geezer
Posts: 131


Well, of course, you could add in a 0.1s delay, but why do that when 0.033s is enough and tightens up the response of the system - specifically by reducing the chances of a double pick-up 2011-01-26 14:42:00

Author:
rtm223
Posts: 6497


There is no emmiter here, the heal tag is on the item that gets collected.2011-01-26 17:08:00

Author:
Screeno
Posts: 153


Ssorry for the bump again, but rtm, it did not work. I did exxactly as u sed.2011-01-26 17:28:00

Author:
Screeno
Posts: 153


Well, of course, you could add in a 0.1s delay, but why do that when 0.033s is enough and tightens up the response of the system - specifically by reducing the chances of a double pick-up True enough! I wasn't aware of this latency bug. It'd be easy enough to createa destructor chip with the destruction workings inside to use in palce of a destructor direct on board. And I could stick a skull or something on the chip to differentiate it. So I might just try that tomorrow!2011-01-26 23:05:00

Author:
Shifty Geezer
Posts: 131


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.