-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: Lure behavior for sheep not working #98
Comments
Debug Procedure: Results where when a player is in range the sheep keeps checking if player has a item in hand and doesnt go into stray when holding not the right item. Next Steps:
FollowUp:
|
@Jacob-Rueckert I did some digging based on what you found out
I have the assumption that the guard does not process the child result ( The I tried to fix this like so:
which helps in so far that the sheep moves, but something is still weird with the pathfinding while the player is in range: instead of selecting a target, finding a path to it and moving along the path like it does if the player is out of range, the sheep only walks in a straight line forward until it gets stuck somewhere because it doesn't jump (or do any actual pathfinding and movement along a path at all) in this state, so we definitely do need some additional investigation. I'll open a PR with the preliminary fix so you can try it out on your end as well and see what I mean and can continue investigating. |
Context
The https://github.com/Terasology/WildAnimals/blob/develop/assets/behaviors/lure.behavior is currently used for the sheep mobs.
It is intended to give players a way to lure sheep together and eventually flock them in a pen for domestication. Sheep are supposed to
follow a player who is holding a grass item.
Problem
Unfortunately, this luring behavior does not work properly after the refactoring of behaviors onto https://github.com/Terasology/FlexiblePathfinding. The culprit seems to be somewhere in the
guard
behavior node:WildAnimals/assets/behaviors/lure.behavior
Lines 4 to 15 in c011fab
Goal
Sheep should follow the nearest player in range that is holding a grass item.
If no such player exists, sheep should perform the stray behavior.
Hints
This will require some debugging of the GuardAction from the Terasology engine repo, and in particular the parent class ConditionAction.
The text was updated successfully, but these errors were encountered: