Skip to main content

Relative Health (Entity Condition Type)

Compares the entity's health, as a fraction of its maximum health, with a number.

Type ID: apoli:relative_health

note

The fraction is currentHealth / maxHealth, so 1 is full health and 0.5 is half.

Fields

FieldTypeDefaultDescription
comparisonComparisonrequiredHow the relative health is compared with compare_to.
compare_toFloatrequiredThe number the relative health is compared with.

Examples

"condition": {
    "type": "apoli:relative_health",
    "comparison": "<=",
    "compare_to": 0.5
}

This checks whether the entity has half of its max health or less.