Jump to content
Sign in to follow this  
DoubleMcLovin

Help with coords in pixelsearch

Recommended Posts

DoubleMcLovin

I want to set up script so that it finds object 1 and assigns it a variable, and then looks around object 1 for object 2 and assigns it a variable. My idea is this:

$bobber = PixelSearch (149, 300, 1056, 680, 0xC5D0DB, 15, 3)
$coord = PixelSearch ($bobber[0] - "80", $bobber[1] - "40", $bobber[0] + "80", $bobber[1] + "40", 0xFCFFFB, 55, 2)

But that doesn't work, what must I do to include a math operator inside the pixel search like that without declaring 4 variables?

Share this post


Link to post
Share on other sites
Shakala

$bobber = PixelSearch (149, 300, 1056, 680, 0xC5D0DB, 15, 3)
$coord = PixelSearch (($bobber[0] - 80), ($bobber[1] - 40), ($bobber[0] + 80), ($bobber[1] + 40), 0xFCFFFB, 55, 2)

That should do it

The " You had in your code indicated Text. You were having a number - a string and thats why it was not working

Edited by Shakala

Share this post


Link to post
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
Sign in to follow this  

×