Cant find pathfinding distance travelled expression

  • I found compare distance travelled in pathfinding condition but cant find its expression to be used at action.

  • Pathfinding doesn't have a distance travelled setting? do you mean bullet behaviour? In that case the action is "Set distance travelled"

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • it is not an action, it should be an expression which can be retrieved.

  • I did something like this with an experiment a long time ago.

    Here is some of my old code. I am no longer using it. I just deduct stamina based on time now once movement starts, but anyway, here's my old code. Maybe you can use it to figure out what you need.

    Note that this code may not be optimized. It is very old. It's just the only thing I had that used distance traveled. So, ignore any "mistakes" or whatnot with the overall code. I did this when I was still learning.

    I am using "distance traveled" as an instance variable that I created on my character manually. The variable is set by the code you see from the "every tick" event near the bottom. The "thiefbox" is what does the actual pathfinding. You could give it the instance variable as well. Like I said, this was just an experiment I did a long time ago, so the code can be modified however you want. I don't even use it anymore.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)