This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.


Wander / Leash Focusing on Home Point

Recommended Posts

Clopen    12

I've added a Wander behavior to my creature, and it uses it, but instead of wandering around the given home position it keeps returning exactly to it every time.
I.e. it's on a loop of "go to a random point at wander distance" --> "go back to home point".
It would make a kind of star or asterisk shape if you drew the lines it traverses, where I'd expect something more like random lines between points on a circle whose center is the home location.

I don't recall seeing creatures in the game doing this, so I'm guessing there's something wrong with what I'm doing, which is this:

Wander(self.inst, function() return self.inst.components.knownlocations:GetLocation("anchor") end, MAX_WANDER_DIST)

The "anchor" position is fixed while this behavior is active, and at the moment MAX_WANDER_DIST = 5, but I've tried adjusting it and no matter what value I chose, it would always move like that, just up to a different distance from the center.

I saw the same kind of behavior when I used Leash instead - which, by the way, is different from Wander how, exactly?
I'm not sure I get the difference.

Any help would be appreciated.
Thanks in advance.

Share this post

Link to post
Share on other sites