You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 25, 2021. It is now read-only.
At the moment, entities will starve to death.
In PerformDefaultAttackSystem check if the defending entity dies, if that is the case, add the amount of nutritional value (a new component) to the fullness of the attacking entity.
The text was updated successfully, but these errors were encountered:
After this is done we’ll come up with a way for a dead entity to leave a dead body that several predators will feed on. One large herbivore body should be enough to bring several predators to max fullness.
Hi @hbina,
If you have specific questions, feel free to ask them in the Amethyst discord in the #showcase-team channel.
If you already have some code, even if it is not working, you can create a WIP pull request so that we can help you fix errors etc.
What you need to do:
Create a NutritionalValue component that stores an f32 value. If you search for Fullness, you should have a very similar example. You should be able to set the component value in the prefabs (resources/prefabs folder).
The next step would be to modify PerformDefaultAttackSystem so that it reads the NutritionalValue storage and writes to the Fullness storage. There is code modifying the health in there - that's where you should check if the health turns to 0. In that case, you should add the nutritional value of the defender (defender_set) to the fullness of the attacker (attacker_set).
At the moment, entities will starve to death.
In
PerformDefaultAttackSystem
check if the defending entity dies, if that is the case, add the amount of nutritional value (a new component) to the fullness of the attacking entity.The text was updated successfully, but these errors were encountered: