Prey

Passive creature who eats plants and flees from Hostiles.

This behaviour has not yet been migrated for use in multiplayer Experiences.

  • Walk within a defined zone

  • Eat specific assets within its range

  • The eating frequency can be changed within its parameters

  • Once it detects a predator, it tries to escape by increasing its speed and running away from the predator

  • Once an asset gets eaten, it goes for another one if its hunger hasn’t reached its maximum

  • Peaceful creature that doesn’t attack any targets

Common Uses

  • A creature that flees from Predators and seeks a food source, which will stop seeking food when hunger parameters are met

  • Removing Objects from an Experience at a more consistent rate than the Farmer Behaviour's random and continuous "harvesting"

Communications

Inputs:

  • Detects specified Tags as targets to flee (default Tag is Predator)

  • Detects specified Tags as targets to eat (default Tag is Plant)

Outputs:

  • If any of its Tags to Flee are detected, moves away

  • If any of its Food Tags are detected, moves toward a random object with the tag(s), displays its eating animation, and makes the target object disappear (no death/destroy animation)

Parameters

OptionsDetails

Food Tag - Tags that the Object will look for to eat. You may add more than one tag or remove unwanted tags. Tags to Flee - Tags that the Object will flee from if the tags enter their Enemy Detection Range.

Food Value - Determines the amount of hunger your Object earns from eating a target.

Max Hunger - The maximum hunger value that can be reached by the Object. When the Prey is hungry, it will look for Food Tags. Hunger Decrease Rate - How much hunger your Object loses automatically per second. Eating Duration - The time, in seconds, that it takes for the Object to eat a target. Hunger Threshold - Determines at which hunger level your Object must be to look for Food Tags.

Last updated

Logo

Copyright Β© 2012- 2023 The Sandbox. All Rights Reserved.