Loading...
17
Game
Meikyuu
11 months ago

I got lazy for a couple days, my bad, but the gauge code is done, ta-da


for those who don't really understand what's going on is the HP bar in the bottom prints what percentage of HP is remaining through a set of 20 sprites with names that have a range from 0-100 with increments of 5 and it takes the HPPercentage variable which is found out by calculating the percentage of how much hp is full compared to the max

which is simply done with the tride and true Part/Whole x 100, and then rounding it, but since Scratch rounds with decimals only using the Modulo function set to 5 it'll find out what exact number is needed to reach the closest variable of 5 and then the script adds that modulo number to the percentage to round it to a variable of 5 to be used in displaying the proper HP gauge filling with the sprite using the join block with Join hp + "HPPercentage"



2 comments

Loading...

Next up

In Cozy Caravan, you and your best friend Bubba will travel through Harvestvale spreading happiness wherever you go.

We wanna see YOUR portrait of him. Go to your quest log to start the quest!

One artist will get a ONE OF A KIND trophy!

Happy #WIPWednesday! Are you working on a game? Making some art? Practicing a song? Something else? Tell us in the comments!

@FnafTheVendorTrio Restocked Dee Dee

This Satuday we invite to watch another #speedpainting of our artist Daniel Faiad.

How great is this scene of #Pecaminosa?

#ScreenShotSaturday | #IndieDev | #DigitalArt

Bandana Dee the Dream Friend

What do you think guys in my robot?Just a beginner in 3d modeling..

My instagram https://www.instagram.com/rojhonbb/

Just a Pico sprite

Finished work on the emotions of a new character for the tank universe

I worked so hard to get all four of them to the end safely, but then...

If you have more of an acquired taste, the restaurants in Niravasi have you covered! Maybe skip the salad bar, though.