pathToReference() is USELESS!

Post » Sat Aug 31, 2013 2:29 am

This native function is so unreliable that it's a wonder Bethesda even bothered with it. Yet if I could somehow get it to work properly it would be an extremely handy tool. Currently there are two big issues with it:

1. It does not resume when interrupted. So if I talked to the actor undergoing pathToRef he'd stop and never continue his path. Can be overcome with a simple while loop.

2. It's a latent function that sometimes doesn't end when the actor is interrupted. So it will halt the rest of my code while it waits for an actor that is never going to reach his target cause he's been interrupted. Now THIS I don't know how to get around, and the following simple code won't work:

Spoiler
while true    myActor.pathToReference(target, 0.5)    utility.wait(10)endWhile

So can I get around this? Is there a way to force the function to end when the actor stops moving??

(Note: I did ask a similar question before, but since then I've done tests and boiled my question down to this.)

User avatar
Taylor Bakos
 
Posts: 3408
Joined: Mon Jan 15, 2007 12:05 am

Return to V - Skyrim