Jump to content

Manage Run/Walk state during webWalk()


Fanny

Recommended Posts

I haven't been able to find anything about this, and I am struggling to find a way to do this other than to manually start walking in the rough direction and then toggle run energy.

Is there a built in way to toggle run after a short duration of walking randomly? (like a player would realise they are only walking then turn run on)

Link to comment
Share on other sites

Will probably need to multithread your enable run class but this might be a bit resource heavy? Haven't tried yet...

Another idea could be to web walk to multiple 'checkpoints' and then enable run in between each checkpoint however, won't really be what you're after because you'll still be walking if the run energy depletes before you get to the checkpoint.

Link to comment
Share on other sites

1 hour ago, dubai said:

Will probably need to multithread your enable run class

This is a good idea actually, it would allow full control of the run energy

It could be programmed to be impatient sometimes and run with only 3% or 5% energy, or other times patiently walk, sometimes notice it has 60% run and switch run on shortly after starting the walk, etc.

A separate thread would allow repeatedly checking distance to target also, allowing further refinement to when run is switched on or not

1 hour ago, dubai said:

Another idea could be to web walk to multiple 'checkpoints'

I did consider this, but I think the webwalking is pretty well written, don't want to reinvent the wheel too much - but this would be less resource intensive. Would be a lot more programming though to handle obstacles like the webwalk does

 

If all of my async checks into a single additional thread, it shouldn't be too resource intensive hopefully, but would love to know if there is an easier way or even an existing method that we don't know about!

Link to comment
Share on other sites

1 hour ago, Fanny said:

I did consider this, but I think the webwalking is pretty well written, don't want to reinvent the wheel too much - but this would be less resource intensive. Would be a lot more programming though to handle obstacles like the webwalk does

100% what I thought, web walk is good with the only caveat being lack of control over other tasks unless we multithread them...

I'm kinda hoping someone else chimes in with a different way of solving this because it would be nice to have an easy way to run other tasks while webwalking. I have a "RememberInventory" class that  saves the inventory setup onstart, then when it's bank time it will sort the inventory exactly how it was on startup. Would be awesome if I could make it sort the inventory while it's walking to the next area etc. That'd be pretty human-like imo.

Link to comment
Share on other sites

2 hours ago, dubai said:

Would be awesome if I could make it sort the inventory while it's walking to the next area etc. That'd be pretty human-like imo.

That is a great idea

It is also a good idea to keep track of this information when depositing, as it can misclick deposit equipment instead of deposit all I noticed

Link to comment
Share on other sites

  • 2 months later...
On 9/23/2024 at 10:30 PM, Fanny said:

I haven't been able to find anything about this, and I am struggling to find a way to do this other than to manually start walking in the rough direction and then toggle run energy.

Is there a built in way to toggle run after a short duration of walking randomly? (like a player would realise they are only walking then turn run on)

Not sure if this is what you are looking for - make a webWalkEvent and setEnergyThreshold(int) or random int setEnergyThreshold(random(2,16)); the default is 15.

 

everytime your run energie gets above the x int number it will activate running again iirc. 

  • Like 1
Link to comment
Share on other sites

3 minutes ago, Wacky Jacky said:

Not sure if this is what you are looking for - make a webWalkEvent and setEnergyThreshold(int) or random int setEnergyThreshold(random(2,16)); the default is 15.

 

everytime your run energie gets above the x int number it will activate running again iirc. 

If you like it to be more random, you could add a break override with random x time, so the webwalker stops after said x time and then gets recalled again with new random run % values.

So that it maybe like you said starts walking since now the random int for toggling running has become == 60%. So you don’t need threads and can have some weird fun. 
 

this will get rid of reinventing the wheel, but maybe a little to much random? 

  • Like 1
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...