Jump to content

Recommended Posts

Posted

Where is this stripe from? A website or game or? You could use PixelSearch, but there may be an easier way depending on where it is appearing.

Posted

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.

Posted (edited)

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

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
×
×
  • Create New...