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

Placing My Health Bar In Corner of Screen

Archive: 12 posts


I created a pretty nice looking health bar for my sackbot using a timer. It looks way neater than using hologram material. And in my opinion it works better also. The problem I'm having though is not knowing how to put this health bar in the corner of the screen. I'd like to place this health bar at the top, bottom, or corner of the screen. I don't want it to hover above my sackbot. I know how to do that with a follower. But how do I place it somewhere on the screen in a fixed place. I tried attaching the timer to holo material and have it follow me from afar, but I either outrun it, or it just doesn't work right. Any suggestions are appreciated. Thanks.2011-02-15 15:29:00

Author:
rambo3416
Posts: 179


A holo-follower is going to be your only option, unfortunately. I would stick a camera on it with zero player tracking to keep it in the right spot on screen.2011-02-15 15:44:00

Author:
Sehven
Posts: 2188


Do you know the acceleration and speed of the mover? How large does the camera radius have to be? Thanks.2011-02-15 16:08:00

Author:
rambo3416
Posts: 179


If the follower is set to max speed an acceleration then it shouldn't have any trouble following the sackbot. Keep in mind the follower will center itself on the sackbot and not the whole hologram, so you should place it in the center of the hologram or on opposite sides of the health bar. If you really want the meter to fix itself to a part of the screen, you'll have to either use only one camera view or include a painfully difficult system of tags on a giant hologram for the meter to snap to when the camera changes.

As for the radius, I'm not sure if it matters while a wire is powering the game camera. Reason being I almost always use movie cameras instead, where it certainly doesn't.
2011-02-15 16:33:00

Author:
Unknown User


just draw a piece of invisible hologram from right in front of your sackbot up to the bar and connect them, then set a follower on the point in front of the bot.2011-02-15 16:38:00

Author:
Speed Racer
Posts: 156


I appreciate all the responses. Keep in mind though, I already know how to get the health bar to hover above the sackbot. I'm trying to get the health bar in the corner of the screen. For instance like in megaman. I would like to have more than one game camera angle. But I understand if there's just no other way. Grim, do you know what this painfully difficult system of tags is that's to be placed on a hologram? I can always give it a try.2011-02-15 17:15:00

Author:
rambo3416
Posts: 179


Basically, you'd have to know exactly under what circumstances your camera can change and have tags and tag sensors or other logic to read when it's time. Then you'd have to move the health bar so that it would still be in the corner of the screen after changing to the new camera. It's one of those things that is definitely possible, but I've mostly written it off as being impractical. If I were going to do a hud with elements having fixed screen-position, I wouldn't bother trying to make the camera changes possible--it'd be too much work.2011-02-15 17:49:00

Author:
Sehven
Posts: 2188


I wonder if this would work....

Make a large Holo box covering the entire area of your screen on the front thin layer and lay out your HUD. Paste your camera onto that and set it to not track the player, and set it up so that it ignores the bounding box for triggering.

On each side of this box place a sensor to detect when sackboy is too close (one for left, right, up, and down).

Now when a side detects he is too close, have the entire holo box move in the proper direction.

Basically the idea is that you are now creating the game camera view instead of having it automatically move. Since your camera is affixed to the same holo as your hud, the shifting of it should no longer be an issue...at least that's how it works in my head.
2011-02-15 18:02:00

Author:
tdarb
Posts: 689


Wow....I can give it a try. I would actually have to try it to see if it works. This seems like something that should be possible from a options screen on the timer I'm using as a health bar. Why does it have to be this difficult? It's crazy. I know MM is maybe trying to show people how making games works, but man there should be a simple game mode or something.2011-02-15 18:25:00

Author:
rambo3416
Posts: 179


What I was talking about is basically what Sehven said. It's just a simple selector to determine which camera to use and which tag each HUD element should move itself to for each part of the screen. It works for few enough HUD elements and cameras but the more possible camera zooms and areas of the screen you're using, (usually no more than 8) the more ridiculously the work piles up. Plus, all camera angles would still need to be similar and it's likely you'll get some delay with the followers shifting positions.

I just thought of another idea though, which is pretty much just as limiting but could be a lot less work: Make copies of the HUD and adjust them to suit each camera you're using. Have a hologram with your bot follower that has all of the cameras on it and manages all of the HUDs so that the one that suits the selected zoom level is also following the sackbot, while the rest are moved just off the screen of the farthest zoom. This lets you zoom out without having to separate each side/corner, but you still need to make duplicates and rotate them on and off the screen. This wouldn't be much help if you plan to keep just one HUD element though, since you wouldn't have to worry about how far away it is from the rest of them.

I'm not sure if what tdarb said would work since the HUD can already be moved independently of the sackbot with more tags and some logic, but maybe I'm misinterpreting the idea.

And man, I hope MM isn't trying to show people how making games works. 'Real' game making undoubtedly becomes easier than dealing with the limitations and inconveniences that require weird solutions in LBP2 the more you develop your understanding of it, but that's primarily why the game is fun to me. I get to ponder stuff like this even while I can't play it.
2011-02-15 19:04:00

Author:
Unknown User


I guess it's not so bad to use a fixed camera angle and zoom. It's a platform shooter similar to megaman, so for these purposes, it's not so bad. What I just did was place a huge invisible holo to follow the hero sackbot. Then I put a game camera on the holo. Set it to the zoom and angle I want. Then place the Timer Health Bar on the top corner of the following holo. It works pretty good this way. I can deal with a fixed camera I guess.2011-02-15 20:26:00

Author:
rambo3416
Posts: 179


I was thinking of the same thing. While my own game is inspired by megaman, it will play much differently. If a fixed HUD requires one camera angle, I may abandon it for my game personally. 1 camera angle for a fixed HUD...that sucks...2011-02-16 03:37:00

Author:
Rouzeki
Posts: 17


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.