Committed Health commands
Health.TakeDamageResult(amount) and Health.HealResult(amount) return the immutable built-in HealthChange value. Existing TakeDamage and Heal remain available and call the same canonical component actions. The Scripting API page lists every field.
HealthChange hit = target.GetComponent<Health>().TakeDamageResult(20);
if (hit.Applied && hit.Killed) {
// The hit committed a living-to-zero transition.
}Fields are Applied, Amount, PreviousHp, RemainingHp, Killed, Reason, OperationId, SourceId, and TargetId. Amount is the actual HP delta after capping against current health or healing room. Invulnerability, already-dead victims, full health, unchanged values, and exhausted reentrant event budgets produce Applied == false with a reason. Native JS callers receive the same frozen value from damage, heal, setHp, refill, and kill.
HP commits synchronously before notifications. The complete event batch is queued from the committed transition: a lethal hit queues Damaged then Died. A Damaged handler can heal immediately, but that new command's Healed event follows the already-queued Died event. Its healing does not rewrite the hit's RemainingHp or Killed result. Conversely, a second lethal hit inside a nonlethal hit's Damaged handler does not make the parent hit emit a second Died. Consumers needing current health can read Hp; consumers needing the command's result use the returned value or its event payload.
Damage/heal/death payloads include amount, previousHp, remainingHp, killed, operationId, sourceId, and targetId. Script-native calls carry their caller identity and active task operation identity. Event batches drain FIFO. One drain admits at most 128 successful reentrant commands; further commands return the event-budget refusal before changing HP. This bounds a damaged→heal→damaged feedback loop without recursive stack growth. A later independent command gets a fresh budget.
Removing the target or its Health component stops later local notifications. The HP change and immutable result already committed remain valid. Listener failure is diagnostic; it does not roll back the command or change its result. SetMaxHp keeps its existing silent clamp behavior.