SRL Archive - OSR Help

Best way to compare colors+tolerances.....


Getdropped

2012-08-04 20:05:01

Well ok so i have been working alot still on my dung script and I have run into a unforeseen snag so the background color changes evey time you open a new door because it loads a whole new map…. but by detecting the background color is how I know if I have already opened the door…. I was thinking of ways to try to over come this…. Is there any ideas people might have? I was thinking maybe somehow comparing a color with tolerance to the single color…. not really sure what would be the best way to go about this….

Here is what I orig had:
not(GetColor(625, 30) = BackGroundColor)
What I was thinking would be comething like:
not(GetColor(625, 30) = BackGroundColorFunction)
With the background color function returning a color tolerance for it to test if it matches….

The other longer way I know I could to this would be make a tpa of the color+tolerance on the minimap and compare the points on the tpa and if they match it would tell me that there is a tpa point at the location…..

Any ideas would be great thanks ;)

~Getdropped

riwu

2012-08-04 20:48:10

I think WaitColorGone is what you are looking for. But does the background color changes so much when you open a door? Maybe you can go about detecting the opening door instead, like even AveragePixelShift?

Getdropped

2012-08-04 21:18:25

From: riwu
I think WaitColorGone is what you are looking for. But does the background color changes so much when you open a door? Maybe you can go about detecting the opening door instead, like even AveragePixelShift?


Te blacks are pretty drastic color number changes but with color tolerance I can create a tpa of all the colors I thing I will just look to see if the coordinate matches the tpa but I'm still not sure I have been playing with it …

Home

2012-08-04 21:20:36

From: Getdropped
Te blacks are pretty drastic color number changes but with color tolerance I can create a tpa of all the colors I thing I will just look to see if the coordinate matches the tpa but I'm still not sure I have been playing with it …


Can you explain a little bit more what you wan't :) Picture would be nice =)

~Home

Getdropped

2012-08-04 21:49:30

So my computer crashed while I first tried to post this -.- um i will try to say everything i had typed….

Here is an example of dungeon rooms:
As you can see the blacks are all slightly different I need to make the differences…. not different ;) sooooo….. the color will change after each time you open a room not just when you start a dungeon, because when you open a room the entire minimap changes (kills my sps idea….) the idea is to have a way to : use getcolor() and see if it matches a base background color…. but no one color will work so I was thinking and I can get a color with a tolerance to match all the background colors I was just woundering how to compare it to the color at the x, y pos……

I hope that was everything…. Im not sure why/ how my computer just crashed =/