Jump to content
aniki432789

Evaluating the break condition of a WalkingEvent more often?

Recommended Posts

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

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);

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.

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