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

How to make a basic health bar

Archive: 8 posts


Today i will be showing you how to make a basic health bar.(Very Basic!)

Step 1: Place a sack bot
Step 2: Place a counter and set to invert output (make sure you set it so you can see in play mode)
Step 3: Put a tag sensor on the sack bots circuit board. for the options i made mine red with the label as hit.
Step 4: Connect the output of the tag sensor to the increment of the counter
Step 5: Place a destroyer on the sack bots circuit board
Step 6: Place a not gate
Step 7: connect the output of the counter to the not gate
Step 8: connect the output of the not gate to the destroyer
Step 9: place any material and put a tag on it. Make sure if you put a label on the tag sensor you use the same label for the tag.
step 10: place material with tag near sack bot

There you have it! a simple health bar!

Post with pictures here: http://www.littlebignetwork.com/showthread.php/13026-How-to-make-a-basic-health-bar
2012-05-06 18:25:00

Author:
LJRobey
Posts: 122


Not to annoy you or be mean, I enjoy when new faces post tutorials, but you should try to do an advanced search with "title only" and related keywords. With "health meter", you get 4-5 links, all posts made by me XD... Ok, I just happen to be a fan of health meter logic.

You can also connect a combiner to a non-inverted counter, allowing you to give back health or lower it using the + and - inputs. The next step would be to make a piece of logic which can pulse (make a very short signal) multiple times in one input. With that, you would be able to lower and increase health by more than one point. And then you find out it's slow, since it takes 2 x amount_of_health_loss x 0.33 seconds. So you end up looking for the LBP2-torials post in search of "feedback loops". That was my learning curve
2012-05-07 05:35:00

Author:
Unknown User


I personaly think lbplanetorials has a better healthbar. It is (nearly) instant, can calculate the remaining health. It also is able to calculate multyple hits in the same time.

Link: http://www.youtube.com/watch?v=JXJzQrsGxpc
2012-05-10 20:37:00

Author:
Fotografht
Posts: 57


Actually, and I think this is sadly displayed on the LBP2-torials, comph found a better way to make them.
http://www.youtube.com/watch?v=c4GaCQ1eRVE&feature=channel&list=UL
That uses a feedback loop instead of a timer. That's what I talked about. Using a timer makes things imprecise, plus a 100% would deal 33% damage while in feedback loops. a 100% signal subtracs 100%. If watching the video is too long, my toolkit has it made for you
2012-05-10 23:39:00

Author:
Unknown User


Didn't you see the link I gave you, that is the link to the tutorial where CompherMC explains his healthbar 2012-05-11 23:09:00

Author:
Fotografht
Posts: 57


Didn't you click mine ?

this is sadly displayed on the LBP2-torials, comph found a better way to make them.
That uses a feedback loop instead of a timer
Yours is LBP2-T-5, mine is LBP2-T-20. I know the title seems bad, but it's a better way to make health meters than the one called health meters.
2012-05-12 01:58:00

Author:
Unknown User


I really looks like the same tutorial to me =P
Only your is more the theory of it, and mine is an example.
2012-05-13 16:46:00

Author:
Fotografht
Posts: 57


Yours uses timers as the memory. It works by making a 3-frame timer (0.1s) be on for only one frame and for a small amount of the speed. Giving 50% for one frame will make it fill up half of one third, 1/6. The feedback loop method uses a combiner loop as the brain and overrides a timer to display it. Pulsing a 50% signal in the minus of the combiner subtracts exactly 50%. Then there is the timer override which displays 50% on a timer. The timer method is fine, but it has some bad sides, because 1/3 is actually 0.3333333333... where in LBP that number isn't infinitely periodic because of the way data is stored. That makes the timer method lose precision with some numbers, and so hurting the player six times by 1/6 might leave the player with 00.1%, which is small but still noticeable. At the same time, feedback loops aren't perfect, since 1+1+1+1+1 isn't perfectly 5 neither in LBP, since even batteries don't output perfect numbers. However, the error is smaller and the fact that you direcly put in the exact value you want to add-lower instead of 3 times the value, that's a great thing too.

Perhaps I should give you the link of the 2nd part on feedback loops, which goes more into health meters.
http://www.youtube.com/watch?v=k0sbxogAcDo&feature=relmfu
2012-05-14 03:36:00

Author:
Unknown User


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.