We want the AI to care for its well-being when the player is not in sight. This means that the AI should make sure it is not taking damage from its temperature being out of its Comfort Interval. In case the AI is taking damage, it should move its Character to some location whose temperature is compatible with its Comfort Interval.
How?
Edit the AI Controller so that, once every few frames, it checks the UThermodynamicComponent and the UTemperatureDamageHandlerComponent to see if and how much damage it is taking from Temperature. This amount is sent to the Blackboard.
Edit the Behavior Tree we currently have so that, when the AI doesn't have the player in sight:
It checks a float value of the Blackboard that tells it if and how much the controlled character's temperature is taking Temperature Damage and how much per second.
If it's taking damage, it runs the Env Query we made in #46 and then moves to its location
What?
We want the AI to care for its well-being when the player is not in sight. This means that the AI should make sure it is not taking damage from its temperature being out of its Comfort Interval. In case the AI is taking damage, it should move its Character to some location whose temperature is compatible with its Comfort Interval.
How?
UThermodynamicComponent
and theUTemperatureDamageHandlerComponent
to see if and how much damage it is taking from Temperature. This amount is sent to the Blackboard.float
value of the Blackboard that tells it if and how much the controlled character's temperature is taking Temperature Damage and how much per second.