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

Question about Timer-based HP Bar damage

Archive: 15 posts


Hello, I don't know if people have already done this same kind of thread before. It could be of more people's interest anyways. I wish I had pictures to better illustrate my problem, which would make my text shorter.

I watched comphermc's Video Tutorial 5 - Timer-based Life Bar and addition(http://www.youtube.com/watch?v=JXJzQrsGxpc). In this tutorial comphermc used the additon method so that DIFFERENT kinds of projectiles / attacks (Hit1, Hit2 and Hit3 as show in the video) could damage your lifebar at the same time, and to do we used three subtractions (To represent the three possible sums).

How can I make projectiles, which deal the SAME kind of damage, hit us at the SAME time, stacking up the damage up to 100% signal strenght ? I know that it was mentioned in the forums that if you want higher damage values than 100%, more than 1 pulse is needed. For instance 3 or more "hit1" projectiles hit you at the same time, as long as the summed signal is below or equal to 100% (I don't want overflow).

According to the tutorial, the adder would have to recognize three different kinds of hit1 (Hit1-a, Hit1-b, Hit2-c <- the three of them causing the same damage) projectiles so that the sum would work. I would like a situation where multiple enemies could hit you at the SAME time, with each enemy being able to deal the same damage per hit (Of course they could do different kinds of damage as well).

My solution attempt, which could be useful thermo-wise because with it we wouldn't have to place a subctraction for every single kind of damage we want. This if it worked: A projectile which has a tag (Set to strenght) attached on it, and a battery connected to this tag. As soon as this projectile hit the target, it would damage the lifebar. The idea is that the impact sensor would recognize any battery signal being sent though the tag, and send this signal to the direction combiner(I connected the impact sensor straight to the direction combiner), in the hopes the tag would send the desire signal, which never happens because it always result in a 100% signal.

At least with this we would only have to add subtractions for the types of enemies that can damage us, instead of the types of hits / projectiles. (Enemy 1 damage (Which could recognize any signal from 0%-100%), enemy 2 damage, Hero 1 damage, hero 2 damage, etc).

Any ideas on how to solve this, if it is possible to be done of course?
2011-03-04 21:12:00

Author:
AlvaroShiokawa
Posts: 126


set the tag sensor to sense tag strength instead of closeness.2011-03-04 21:17:00

Author:
TheSwede
Posts: 59


set the tag sensor to sense tag strength instead of closeness.
I forgot to mention I set the tag to strength, it did't work . Anyone else?
2011-03-04 21:21:00

Author:
AlvaroShiokawa
Posts: 126


BUMP!

I tried using Counters, inspired on what I saw on comphermc's 8th tutorial video where you have a counter sending percentage signal through a tag, but still didn't work .

I repeat, any ideas on how to solve this ?
2011-03-06 00:58:00

Author:
AlvaroShiokawa
Posts: 126


I use a counter for the energy bar in my F-Zero level and I have looped sequencers to deplete and restore energy.2011-03-06 02:34:00

Author:
Unknown User


I use a counter for the energy bar in my F-Zero level and I have looped sequencers to deplete and restore energy.
Hey DW86x, could you please tell me more of what you use with the sequencers? Though I really prefer the timer method as it does an instant damage in 1 single hit coming from a signal of 0% to 100% .
However, even with counters, do you know of a solution for this problem "same type of hit damagin you at the same time" I described on the opening post?
2011-03-06 02:38:00

Author:
AlvaroShiokawa
Posts: 126


As far as I know there isn't a way to do it with impact sensors.

Use a series of tag sensors instead. One for 2 or more tags. One for 3 or more tags, etc. Then you would have to use a circular trigger radius.

Perfect? Nope. Works? Yep.
2011-03-06 02:42:00

Author:
comphermc
Posts: 5338


As far as I know there isn't a way to do it with impact sensors.

Use a series of tag sensors instead. One for 2 or more tags. One for 3 or more tags, etc. Then you would have to use a circular trigger radius.

Perfect? Nope. Works? Yep.

Hey comphermc, thanks for the input . Hmm I hadn't thought about this idea of using tags sensors that require more than 1 tag. Indeed I would prefer the impact sensors in terms of defining a precise area the our characters can be hit (Though I don't know to what extent they are precise).

I watched that tutorial 8 of yours in which you show a wireless signal sending. Could it be possible to do what I want of transmitting battery signals through tag sensors. Perhaps I did something wrong when I tried doing this, as mentioned in my past posts?
2011-03-06 02:50:00

Author:
AlvaroShiokawa
Posts: 126


Hey DW86x, could you please tell me more of what you use with the sequencers? Though I really prefer the timer method as it does an instant damage in 1 single hit coming from a signal of 0% to 100% .
However, even with counters, do you know of a solution for this problem "same type of hit damagin you at the same time" I described on the opening post?

The sequencer just contains a battery hooked up to a direction combiner that goes in to the counter.
I have one sequencer to deplete energy and one to restore energy. You might be able to adjust the sequencer speed to change how much damage you want to do but this probably isn't the best method for your situation.
2011-03-06 15:20:00

Author:
Unknown User


Had the exact same idea, not sure if any of it is relevant, but perhaps it could help. Read my bottom posts on this (https://lbpcentral.lbp-hub.com/index.php?t=50727-Advanced-logic-using-tag-sensor-%28signal-strength%29-reacting-to-multiple-tags) thread.2011-03-06 15:50:00

Author:
SSTAGG1
Posts: 1136


Had the exact same idea, not sure if any of it is relevant, but perhaps it could help. Read my bottom posts on this (https://lbpcentral.lbp-hub.com/index.php?t=50727-Advanced-logic-using-tag-sensor-%28signal-strength%29-reacting-to-multiple-tags) thread.

Hey SSTAGG1, indeed this thread of yours covers a similar idea (I refer to that thread of mine "Question about timer-based hp damage" , has nice information and is relevant to what I want.

However, I still can't do the thing I want: Make a single tag sensor (impact sensor would be ideal for me because of its supposed precise detection range) recognize any signal strenght (During my tests I had done a projectile which had a battery with the desired signal attached to a tag set to strenght. No matter what signal I strenght in the battery (Lets say 10%), it would cause a 100% damage in my timer-based life bar O_o.

I just want this generic / flexible system which would only require us only one tag sensor or impact sensor, is that was possible, to recognize any kind of damage is sent to it. My adder setup is like the one comphermc used in his video tutorial 5. But instead of having the tag sensors labelled as hit1, hit2, I would have it labelled as "Enemy 1 - hit", "Enemy 2 - hit", "Enemy 3- hit",etc. This way the sums in the adder would sums the attacks the enemy do, no matter the kind (Like this I would not have to place lots of tags in my adder to every kind of attack, just for the enemies ), just doing the desired sum, as long as it doesn't surpass 100%. This would in theory let enemies to do combos if they wanted, as long as the sum recognizes the hits being sent one after the other. Same thing for the player characters.
2011-03-06 17:14:00

Author:
AlvaroShiokawa
Posts: 126


Hmm, right, I forgot I posted my other method in a different thread. I used the same idea, just that the tag sensors are always on, but the tag (on the projectile, etc..) is turned on by the impact. The destroyer to remove the projectile activate a moment later to let the tag send its signal before it gets destroyed.

The issue with this, though, is if multiple units are close together, then a projectile could affect more than the unit it hits. You may see this as an awesome side-effect though, since it can replace 'splash' damage, or be used to cause collateral.

I haven't sufficiently tested this, but it should work, only thing you have to be careful about is getting the tag activation vs. destroyer timing right (I haven't tested to see if they can occur simultaneously and still get the desired result, or if you have to delay the destroyer).

Using the property that a tag sensor will take the value counted down from highest value depending on number of tags required (so 1 tag require = highest, 2 tag require = 2nd highest, etc....), you can create a system that uses only a single tag, and just create enough tag sensors to detect how many simultaneous hits you expect to encounter.

Put this value directly into an adder circuit, and you're done.

Not sure if this solves your problem, but I hope it helps.
2011-03-06 23:49:00

Author:
SSTAGG1
Posts: 1136


The issue with the impact sensor is that it will only output '0' or '100', it is only ever 'not in contact' or 'contact'. I wished they would output the same value as the tag that they sense, but oh well.

There is no way to directly sense signal strength using impact sensors (currently), but through tag sensors, or by using multiple impact sensors and multiple tags, it can be accomplished. For you, the only solution would be to use the tag sensors + impact sensors method I tried to outline in my previous post.
2011-03-06 23:53:00

Author:
SSTAGG1
Posts: 1136


Hmm, right, I forgot I posted my other method in a different thread. I used the same idea, just that the tag sensors are always on, but the tag (on the projectile, etc..) is turned on by the impact. The destroyer to remove the projectile activate a moment later to let the tag send its signal before it gets destroyed.

The issue with this, though, is if multiple units are close together, then a projectile could affect more than the unit it hits. You may see this as an awesome side-effect though, since it can replace 'splash' damage, or be used to cause collateral.

I haven't sufficiently tested this, but it should work, only thing you have to be careful about is getting the tag activation vs. destroyer timing right (I haven't tested to see if they can occur simultaneously and still get the desired result, or if you have to delay the destroyer).

Using the property that a tag sensor will take the value counted down from highest value depending on number of tags required (so 1 tag require = highest, 2 tag require = 2nd highest, etc....), you can create a system that uses only a single tag, and just create enough tag sensors to detect how many simultaneous hits you expect to encounter.

Put this value directly into an adder circuit, and you're done.

Not sure if this solves your problem, but I hope it helps.


The issue with the impact sensor is that it will only output '0' or '100', it is only ever 'not in contact' or 'contact'. I wished they would output the same value as the tag that they sense, but oh well.

There is no way to directly sense signal strength using impact sensors (currently), but through tag sensors, or by using multiple impact sensors and multiple tags, it can be accomplished. For you, the only solution would be to use the tag sensors + impact sensors method I tried to outline in my previous post.

Thanks for the input man, and also for the help you gave me during online create concerning this topic, the problem is solved hehe .
2011-03-07 05:51:00

Author:
AlvaroShiokawa
Posts: 126


Yeah, the method I showed you used the impact to activate the tag sensor. A better method would be to activate the tag on the projectile (so have the impact sensor on the projectile activate the tag). This would prevent a tag sensor from activating, picking up all surrounding projectiles, and then activating again when those same projectiles hit it.

You need to change it or else it is very possible to receive several times as much damage as you should when being hit by several shots within a short time.

Edit: Sorry about the mix up, I completely forgot that I HAD to set impact on projectiles instead of the sensors. I forgot it wouldn't work otherwise (well, it'd work, just not properly).
2011-03-07 06:20:00

Author:
SSTAGG1
Posts: 1136


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.