-
Notifications
You must be signed in to change notification settings - Fork 21
Description
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
guard: { | |
componentPresent: "Behaviors:FindNearbyPlayers", | |
values: ["N charactersWithinRange nonEmpty"], | |
child: { | |
sequence: [ | |
{ sleep: { time: 0.1f } }, | |
check_luring_item_in_use, | |
followCharacter, | |
{ lookup: { tree: "Behaviors:follow" } } | |
] | |
} | |
} |
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.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Status