I want to make a healthbar like this:
image

I've noticed that in settings there are multiple options for background image etc. I tried building it using a GUIBox with custom skin in combination with HUD and Status Element. I however never achieved what you see in the picture and I find it extremely complicated to achieve such a simple thing.

I've been thinking of making a custom solution where I would execute my own function tied to the HPBar prefab in the Status change event, but I wanted to avoid making too many custom things. Any advice?

Later I want to achieve this for the player himself:
image
  • The GUI box is just a container (defining the bounds) for what you display, i.e. all the image stuff is usually handled by the HUD. If there's an overall background/foreground image for it, use it in the HUD's Image Settings. Otherwise, you can add backgrounds to each individual HUD element.

    For the value bars to fit into such an image, either already have the value bar as a complete image to fit it, or use an alpha mask to fit it to the background. Alternatively, if you have the image around the bar in the foreground, it'll hide stuff anyway :)
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Just an idea, why wouldn't you allow for ORK users to define a bar prefab? I mean it would be x times easier to implement without any tinkering with images and their positioning etc.

    Just a suggestion.
  • edited March 2021
    Here's a tutorial from user RustedGames on more advanced GUI.
    Post edited by Wrofir on
    Miuratale : coming 2024
    Miuratale
  • Well, because ORK's UI system comes from a time before there even was the component based UI system. It's been somewhat difficult to support both legacy and new UI, so it's probably not the most user friendly thing right now.

    ORK 3 will completely revamp the UI system, though :)
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Wow, can't wait for the ORK 3 then. When it's about to be out? How hard will it be to transform all the existing UI to the one in ORK 3?

    @Wrofir Thank you for the reference.
  • ORK 3 just entered active development, you can keep up to date here. Release rougly Q3/Q4, while there'll be an upgrade tool available later down the line, porting over the UI will not be possible due to the complete revamp of the UI system :)
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Thank you for the info. How about porting other functionalities. Will I have to rebuild my game from scratch, or is there going to be any more convenient way to switch to the Ork 3?
  • As said, there'll be an upgrade tool available later down the line which will be able to transfer most of your setup. Due to system changes not everything will be able to be transfered, but I don't have any details on this yet (only that UI will have to be redone).
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.