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

Explosions

Archive: 9 posts


Im making a top down mini game were players get grenades. Depending on the distance from the grenade the player should take more/less damage. I have a tag sensor that picks up the signal from the grenade and set to signal strength. The tag sensor is then linked up to the players health bar. But the damage from the grenade is always the same, no matter how far (as long as its in range). I know its not a problem with the health bar because everything else on it works.

Can anyone tell me how to fix it?
2011-07-04 02:42:00

Author:
Zero10100
Posts: 385


Take a look at comphermc's and silverscorps tutorials about working with analogue signals. I'd say without looking at your exact setup that you'd need to make sure that the tag sensor that dectects the bombs is set to closeness, and the radius is out as far as the splash damage will go. On the other end of the equation you just need to take this analogue signal and scale it to give the correct damage. Apart from the older ideas about health bars; Have a look at this tutorial (http://www.youtube.com/watch?v=c4GaCQ1eRVE) for what I hope will get you on the right path.

Just take the idea of storing the signal and have it output the value of a timer/counter set to speed scale that is hooked into the tag sensor set to closeness.
2011-07-04 03:41:00

Author:
Mr_Fusion
Posts: 1799


Here's a simple fix/idea.

1) Change tag sensor to proximity.
2) Output tag sensor into positive of a combiner
3) Output a battery into negative of combiner
4) Output combiner into divider
5) Use positive output to deal damage (seems you have this part working, but ask if you don't know how)

The battery will limit the amount of damage dealt when the explosion occurs on the unit. Say you want it to deal 70 at epicenter, then you set the battery to 30.

Adjust the range of the tag sensor to adjust how quickly the damage falls with distance. A smaller range means greater drop.
2011-07-04 05:22:00

Author:
SSTAGG1
Posts: 1136


ok I got the damage scaling fixed but now it doesn't want to go into the health bar unless it's full2011-07-04 15:24:00

Author:
Zero10100
Posts: 385


Then that depends on how you deal damage. You're likely relying on digital rather than analog signals to deal damage. Can you explain your setup? Use a feedback loop if possible, as those are generally the best (imo).2011-07-04 18:30:00

Author:
SSTAGG1
Posts: 1136


Then that depends on how you deal damage. You're likely relying on digital rather than analog signals to deal damage. Can you explain your setup? Use a feedback loop if possible, as those are generally the best (imo).

I have the tag sensor set to closeness hooked into the direction combiner liked to the timer set to .1 sec and speed scale. I got it to work but it the damage will only drop after about half way out.
2011-07-04 18:52:00

Author:
Zero10100
Posts: 385


What value are you using for the battery. If you have it at 50, it would reduce the range of the damage by half.2011-07-04 19:01:00

Author:
SSTAGG1
Posts: 1136


What value are you using for the battery. If you have it at 50, it would reduce the range of the damage by half.

...If I used a battery wouldn't it just stay at that %...
Do i need to link the sensor to the battery's MC or use an AND gate...

or the battery at the start and end of the bar
2011-07-04 19:29:00

Author:
Zero10100
Posts: 385


1) Change tag sensor to proximity.
2) Output tag sensor into positive of a combiner
3) Output a battery into negative of combiner
4) Output combiner into divider
5) Use positive output to deal damage (seems you have this part working, but ask if you don't know how)

The battery will limit the amount of damage dealt when the explosion occurs on the unit. Say you want it to deal 70 at epicenter, then you set the battery to 30.

Adjust the range of the tag sensor to adjust how quickly the damage falls with distance. A smaller range means greater drop.
Did you make this? That's the battery I'm referring to.

This should work provided you use a damage system that can interpret analog values.

The above would be on the unit, not the explosion. The explosion only has the tag for the tag sensor.

Use an AND gate with inputs as:
1) A pulse activated by a tag sensor (tag sensor set to strength -> a counter pulser)
2) The system I outlined before

This would go into the combiner you use to deal damage to the health. I suggest using a feedback loop, since with a speed scale timer, it's not as intuitive, and is generally more complex.
2011-07-04 20:08: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.