Jump to content

Won't move one tile to the left/right


Maxo

Recommended Posts

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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

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.
Note: Your post will require moderator approval before it will be visible.

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.

  • Recently Browsing   0 members

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