Moving with Directional Keys to a color.
Moving with Directional Keys to a color.
I'm looking for help on how to move to a specific color with the directional keys. Nodes spawn randomly in a specific area but their color remains the same. I'm looking to automate the gathering process by moving in a specific route until approaching one of the gathering areas. I then need the script to check for said color and if its there I need it to input the directional keys needed to approach it before gathering. I know how to utilize color tracking for mouse movement but I've never done it like this before.
Re: Moving with Directional Keys to a color.
Safe to say impossible?
Re: Moving with Directional Keys to a color.
unlikely. ur post simply lacks enough information for anyone to bother engaging with it. explain it as though we had no idea what u were talking about(because we dont actually)
Re: Moving with Directional Keys to a color.
K so 1 directional input= 1 space. I need to move to a specific colors space. The color pops up randomly so just doing a automatic route won't work. I need the script to upon noticing the color to then use the directional keys(Inputs) to move toward said color and then press "f". Trying to have the script figure out the path to the color with the directional keys.
XXXXXXXXXX
XXXXYXXXXX<----------I need it to spot Y and then move towards Y with the directional keys since Y appears at random in a specific area.
XXXXXXXXXX
XXXXXXXXXX
XXXXXXXXXX
XXXXYXXXXX<----------I need it to spot Y and then move towards Y with the directional keys since Y appears at random in a specific area.
XXXXXXXXXX
XXXXXXXXXX
Re: Moving with Directional Keys to a color.
clear as mud. maybe post some screenshots or a video explaining it
Re: Moving with Directional Keys to a color.
K so. I want to utilize detect color for the exact color on the ore. I want it to use that part of the screen location wise and then a pre-set space size (32x32 pixels.) accounted for as distance(Space). I then need it to determine a path using that definition of said space and execute said path with the directional keys(Up/Down/Right/Left) and then press F when it reaches the color(Ore.). I want it turned into a homing missile so to speak. I also need this done with ControlSend(If not possible due to not being compatible with detect color send is fine.) . I'm trying to auto gather in a 2D game while playing on my other account.
Re: Moving with Directional Keys to a color.
ok so u got a 2D grid, whose dimensions and location on screen u know. the grid can be represented as a 2D array of array, each element of which is tile on the grid. u know how to Image/PixelSearch for ur ore, so u know its location and dimensions(ie those of a single tile). so, u can map the ore to an element in the 2D array.
presumably u also have a way of finding out the location of ur character(or its always in the center), so u can map that too to an element in the 2D array.
assuming no obstacles on the grid, a naive approach is calculating the rise and run of 2 points. otherwise, look into A* or some other pathfinding algorithm
presumably u also have a way of finding out the location of ur character(or its always in the center), so u can map that too to an element in the 2D array.
assuming no obstacles on the grid, a naive approach is calculating the rise and run of 2 points. otherwise, look into A* or some other pathfinding algorithm
Re: Moving with Directional Keys to a color.
Could I use imagesearch to bypass any obstacles?swagfag wrote: ↑06 Aug 2021, 10:34ok so u got a 2D grid, whose dimensions and location on screen u know. the grid can be represented as a 2D array of array, each element of which is tile on the grid. u know how to Image/PixelSearch for ur ore, so u know its location and dimensions(ie those of a single tile). so, u can map the ore to an element in the 2D array.
presumably u also have a way of finding out the location of ur character(or its always in the center), so u can map that too to an element in the 2D array.
assuming no obstacles on the grid, a naive approach is calculating the rise and run of 2 points. otherwise, look into A* or some other pathfinding algorithm
Re: Moving with Directional Keys to a color.
what are u asking?
imgsearch tells u(if found) the screen coordinates of a pattern of pixels(ie the image). what u then do with that information is up to u. so, maybe??
imgsearch tells u(if found) the screen coordinates of a pattern of pixels(ie the image). what u then do with that information is up to u. so, maybe??
Re: Moving with Directional Keys to a color.
I mean like taking an image of say a tree so that when said image is found it would adjust the algorithm to set it as a obstacle to factor in.
Re: Moving with Directional Keys to a color.
- detect any relevant entities(player, ore, obstacles) using whatever method works(pixelsearch, imagesearch, something else)
- encode their positions and properties in the array
- run A* on it
- decode the resulting shortest path back into a series of keystrokes. send them
Who is online
Users browsing this forum: No registered users and 47 guests