Jump to content

Evaluating the break condition of a WalkingEvent more often?


Recommended Posts

Posted (edited)

Hello, I have a break condition set up for my WalkingEvent. It works absolutely perfectly when the player is walking, but when the player is running I feel like the program does not evaluate the break condition fast enough that it would be useful to me. The path itself is rather short so it makes sense to me that the problem mostly exists only when running. The WalkingEvent always finishes before advancing instead of breaking halfway.

 

The objective is to simulate a more human-like interaction where a player starts walking towards an NPC and then. while it is still walking towards it, it interacts with the NPC. In the current state the player's character always stops (reaches the end of the path) for a period of time before interacting with the NPC. Again, the implementation works perfectly when the player's character is walking. Because of this I suspect the break condition is not evaluating fast enough for my scenario while the character is running.

 

Is there anyway to enable the bot to evaluate the break condition more often? Is there a different way about solving my problem? Thank you for your time.

Edited by aniki432789
Posted

I really doubt this is the case, the break condition should be getting evaluated multiple times a second. If you could post your code for the WalkingEvent it'd be much easier to help you.

Another option is to disable running for the WalkingEvent by setting the energy threshold to greater than 100 by using:

walkingEvent.setEnergyThreshold(101);

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