Jump to content

[Walking problem] Can't execute some simple walking in this location. What can I do?


dot_b0T

Recommended Posts

Hello guys, currently working on a script that is taking place inside of the mm II tunnels. The problem I'm having is that I simply can't make the damn char walk back n forth between 2 tiles that are next to each other. I've tested the script on other places(just swapped x,y coordinates) and it works just fine. I've tried making my own paths and aswell tried using both Positions as well as Areas. and I've also tried walk(..), webWalk(..), walkPath(..).

It's just inside these tunnels that I cant make it work.

How can I solve this?

Link to comment
Share on other sites

never said I did? Just pointed out that I never had to use walkingEvent in the past and gotten away with using very simple webwalking in my previous scripts! :) not sure if I'm doing it the optimal way though but at least it works now!

WalkingEvent tile1 = new WalkingEvent(TILE_ONE);
         tile1.setOperateCamera(false);
         tile1.setEnergyThreshold(20);
         tile1.setMinDistanceThreshold(0);
         getBot().getEventExecutor().execute(tile1);

 

Edited by dot_b0T
  • Like 1
Link to comment
Share on other sites

22 minutes ago, dot_b0T said:

never said I did? Just pointed out that I never had to use walkingEvent in the past and gotten away with using very simple webwalking in my previous scripts! :) not sure if I'm doing it the optimal way though but at least it works now!


WalkingEvent tile1 = new WalkingEvent(TILE_ONE);
         tile1.setOperateCamera(false);
         tile1.setEnergyThreshold(20);
         tile1.setMinDistanceThreshold(0);
         getBot().getEventExecutor().execute(tile1);

 

There is some unnecessary code in there.

Why setting OperateCamera to false? Why set an energy threshold?

This should work fine:

WalkingEvent event = new WalkingEvent(TILE_ONE);
event.setMinDistanceThreshold(0);
getBot().execute(event);

 

Link to comment
Share on other sites

25 minutes ago, dot_b0T said:

never said I did? Just pointed out that I never had to use walkingEvent in the past and gotten away with using very simple webwalking in my previous scripts! :) not sure if I'm doing it the optimal way though but at least it works now!


WalkingEvent tile1 = new WalkingEvent(TILE_ONE);
         tile1.setOperateCamera(false);
         tile1.setEnergyThreshold(20);
         tile1.setMinDistanceThreshold(0);
         getBot().getEventExecutor().execute(tile1);

 

3

we have a execute() method

execute(Event event);

execute(tile1);

 

2 minutes ago, The Undefeated said:

There is some unnecessary code in there.

Why setting OperateCamera to false? Why set an energy threshold?

This should work fine:


WalkingEvent event = new WalkingEvent(TILE_ONE);
event.setMinDistanceThreshold(0);
getBot().execute(event);

 

maybe he doesnt want it to move the camera?

what if he wants it to start running @ 20 run?

Link to comment
Share on other sites

50 minutes ago, Chris said:

we have a execute() method


execute(Event event);

execute(tile1);

 

maybe he doesnt want it to move the camera?

what if he wants it to start running @ 20 run?

He said ithas to walk 2 tiles, why bother adding code like that for 2 tiles?

Edited by The Undefeated
Link to comment
Share on other sites

1 hour ago, The Undefeated said:

He said ithas to walk 2 tiles, why bother adding code like that for 2 tiles?

it is moving diagonally around a corner, which means it travels past another square so it has time to start running in-game, and since this action is repeated a lot i wanted to manage the run energy somewhat so that's why I have that added in there! Also i prefer to have full control over the camera. for this script it wouldn't make a lot of sense to have the camera move much. so I just handled the few camera actions I needed manually. :peanut:

Link to comment
Share on other sites

5 hours ago, Alek said:

WalkingEvent will do that, however that solution also works. 

yep worked fine using walkingEvent

6 hours ago, IDontEB said:

Why not just use MainScreenTileDestinations and just click the tile since it's only two squares away?

I found out about that method while I was looking around, from what I understand it works best when there are no items and npcs covering the tile? since your just sending a mouse click with that. not sure though :D

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...