Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

Creating a hunger bar with an Image?

Asked by 6 years ago

I'm very familiar on how to create a hunger bar, but how would I create a hunger bar that shows, let's just say a hamburger, that grays out as the hunger of a player goes down. I just need a couple of hints, not really a complete answer.

0
Possibly have a gray overlay on the hamburger that's partially transparent and have it slowly grow to show hunger going down. ScrewDeath 153 — 6y
0
do you want it to fade into gray? or do you want a bar that slowly makes the hamburger disappear CPF2 406 — 6y
0
Just looking for the image to gray out from top to bottom if that makes sense Icy_Qube 29 — 6y

2 answers

Log in to vote
0
Answered by 6 years ago

Just put the gray image with the zindex higher than the colored image in a frame that is directly over the colored image and has clipdescendants on (which basically "cuts" any part of the gray image that is outside of the frame), then resize the frame as you would resize the gray image (although if youre using scale measurements in position and size things might get complicated).

If you don't understand what I'm saying, I suggest experimenting with the ClipDescendants property (a nice video that might give you an insight on how it works: https://www.youtube.com/watch?v=yz00YFZNBXQ)

0
Thank you, this is exactly what I was looking for! Icy_Qube 29 — 6y
Ad
Log in to vote
0
Answered by 6 years ago

I'm pretty sure this wouldn't be possible just THAT way. But the way to do this is just basically by actually editing a copy of the HamBurger image changing the color of it. Cutting it. And then once your hunger value reaches a certain amount, it will then display the gray hamburger image on top of the original one. But you'd just need to copy the original image, use Paint.NET or PhotoShop and then cut half of it to give that Hunger image effect. It's hard to explain but I hope you succeed in what you are trying to do!

0
I understand what you're getting at, I'll try experimenting with this some more. Thanks! Icy_Qube 29 — 6y

Answer this question