Skip to content

HealthPercentCondition ​

Inherits: EntityCondition < Condition < Resource

Checks if the entity's health is above/below a specified percentage. Consolidates HealthAbove and HealthBelow conditions.

Properties ​

floathealth_threshold_percent50.0
boolhealth_abovefalse

Methods ​

boolevaluate_entity( entity: Entity )
Stringget_entity_description()
Stringget_entity_function_description()

Property descriptions ​

float health_threshold_percent = 50.0 ​

The health percentage to compare with (0 to 100)

bool health_above = false ​

If true, checks for health ABOVE threshold; if false, checks BELOW

Method descriptions ​

bool evaluate_entity( entity: Entity ) ​

Is the condition met for this entity?

String get_entity_description() ​

A short text about what the condition checks on the entity.

String get_entity_function_description() ​

The sentence the editor shows for the condition, with {placeholders} for its values.