Jump to content
opiumhautopium1

ask for 2 funktions

Recommended Posts

FindColorSpiralTolerance

FindColorSpiral2

 

every day i learn more about scar and it is a real powerful toy..... thanks a lot

 

 

i have 2 questions

is

function FindColorSpiral(var x, y: Integer; const Color, xs, ys, xe, ye, tol : Integer): Boolean; ???

because

There is currently no text in this page!

 

 

 

and

the 2 one

is what is FindColorSpiral2

and how to use it

thx a lot

and have a nice day

 

---------- Post added 01-05-2012 at 07:30 AM ---------- Previous post was 01-04-2012 at 07:18 PM ----------

 

freddy can you help me please?

Link to comment
Share on other sites

FindObjSize can be used with text. You CAN and EASYLY make your own function for spiral to make your own findoclor spiral function like I have now. the functions are VERY Very customizable.

 

A spiral function, or really any color finding function written in SCAR would havea very low performance, usually 1000 times slower than anything built into SCAR...

Link to comment
Share on other sites

but is there a better way to get the distance between 2 colors? ........ in a given area x,y are 1 to 10 orange pixel and the green pixel dont have to be to close

the green pixel has to turn around 1 orange pixel and sidestep to the rest of orange points (later i have to identefy the orange pixel by text at the main window but later ^^)

 

i only want to know is there a better funktion than colorspiraleTolerance?

greetings ^^

Edited by opiumhautopium1
Link to comment
Share on other sites

Unbenannt.JPG

ok i slow down and try to explain

 

me is the green point

i have to stay in the circle of the orange point to destroy

and i have to avoid the other orange points if they come to close the green point

-----------------------------------------------------------------------------------

so i want to know the coordinates from the orange points

and i want t know when orange point "2 to 10" is to close to green point then move to free area in circle of orange point 1

---------------------------------------------------------------------------------------

is there a better funktion as findcolorcircletolerance for every pixel?

(later i have to identefy enemy by name to calculate the right shoot distance.......but that is the next step )

mfg and thx a lot

Link to comment
Share on other sites

[ATTACH=CONFIG]203[/ATTACH]

ok i slow down and try to explain

 

me is the green point

i have to stay in the circle of the orange point to destroy

and i have to avoid the other orange points if they come to close the green point

-----------------------------------------------------------------------------------

so i want to know the coordinates from the orange points

and i want t know when orange point "2 to 10" is to close to green point then move to free area in circle of orange point 1

---------------------------------------------------------------------------------------

is there a better funktion as findcolorcircletolerance and colorspiraltolerance for every pixel?

(later i have to identefy enemy by name to calculate the right shoot distance.......but that is the next step )

mfg and thx a lot

Link to comment
Share on other sites

honestly im lost at what you trying to do, seems like your trying to detect your location by judging color distances. what i would recomend would be to use the

function FindColor(var x, y: Integer; color, xs, ys, xe, ye: Integer): Boolean;

Find color in box specified by xs, ys, xe, ye starting from left to right. Returns True if color found, the coordinates of the color if found is put in x,y.

 

make 2 var called x,y then set the find color function up like this FindColor(x,y,youcolor, startx cord of search, start y cord of search, end x cord, end y cord)

(the start cord x,y is the top right cord from which u want to search left from the the end cord is the bottom right cord at which you want to search to , basically making a box around the area u wish to search)

 

then i would compare those x,y cords the findcolor function returned to the ones where you wanted to find the color, like lets say

if (x= 233) and (y=345) then

writeln(' we are in the correct spot')

else

if FindColorSpiral(XX,YY, Your Color, search cords....ys,ys,xe,ye) = true // make this a color that u wish to click to get back to start

mmouse(x,y,0,0 true);

 

 

i really cant help you to much because ive never played seafight and dont understand there system but hope this gives some information.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
  • Create New...