Jump to content

Won't move one tile to the left/right


Recommended Posts

Posted (edited)

image.png.c25c35af793e0cf644a60a8b4e48c7db.png

I can not get this to work so it moves one position to the south, it does log all the loggers, but does not move.
I have tried putting a conditional sleep after the walk but doesn't work

The idea is that when player is standing on a fire in the 'firemakingStartingArea' and tries to light a log, the message pops up, and it moves one tile to the south.

Edited by Maxo
  • Like 1
Posted (edited)

Reading the documentation usually helps 😉
https://osbot.org/api/org/osbot/rs07/api/Walking.html

B4eX6gL.png

fDDhNOT.png
By default the threshold is set 2 and 5 ^
You will have create your own WalkingEvent and set setMinDistanceThreshold(0) 😉
 

WalkingEvent event = new WalkingEvent(position);
event.setMinDistanceThreshold(0);
execute(event);


You should never execute any code thats interacts with the game in any way in the onMessage method in my opinion, should only be done in the onLoop.
Also mirror mode can skip messages very easily, so checking messages should never affect any script logic 😉

Edited by Khaleesi
  • Like 1
  • Heart 1
Posted
On 10/6/2022 at 3:08 AM, FushigiBot said:

Rather than using onmessage, setup an animation timeout timer that resets everytime it animates. Set it to 5-10 secs or so and have it move tiles if it doesnt animate within that time. onMessage is unreliable in mirror.

Is there a way to just check if there is a fire on the tile where i am standing? Seems stupid to just try and and see if it works every time

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...