← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #176949]: Help to make a bot

 

Question #176949 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/176949

    Status: Open => Needs information

RaiMan requested more information:
What game?

Without having some idea of the playground and the dynamics, there is no
chance for efficient help.

--- comments on Region(-13,-13,12,12).exists(gun ,10)

- Region(-13,-13,12,12)
is outside the screen. if you mean "left above" of something else, you need a reference to the base region.

- exists(gun ,10)
this waits 10 seconds for the gun to appear. During this time, your script will just do nothing.

while not exists(gun,0): # comes back directly after the search
     # do something else
     wait(1)

allows you to check something else and may be act on during the time,
the gun is not there.

This is some kind of "poor man's subprocessing". If you really want to
be able to react on the most important things happening, you have to
implement different specialized bots, that run in parallel as
subprocesses and talk to each other.

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.