Jump to content

Stripe Length Searching


Recommended Posts

Make a loop that checks pixels from the left edge of the health bar to right edge of the health bar.

for each iteration of the loop

. check if color is yellow then continue

. if a color is green then break the loop, you have found your limit

where the loop has stopped divided by the maximum total iterations is the percentage of your total health.

Link to comment
Share on other sites

Make a loop that checks pixels from the left edge of the health bar to right edge of the health bar.

for each iteration of the loop

. check if color is yellow then continue

. if a color is green then break the loop, you have found your limit

where the loop has stopped divided by the maximum total iterations is the percentage of your total health.

It isnt hp bar, its exp bar. I need the function which returns me ammount of light green pixels frm the left edge of the bar.

Your idea: 1,1: light (go farther) 2,1: light (go farter) 3,1: light..... 50,1: dark. So light bar have 49px? return 49, how?

@Manadar:

I modifed Your code a bit and works :P Thank Yoy

Edited by GruchaBks
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...