# SetEntityHealth

TIP

  • setEntityHealth(<entity_ID>, <health>)
  • Sets the health of an entity.

# Parameters

  • <entity_ID> The entity ID as int
  • <health> The health to set to the entity as int or float

# Example

1: $id$ = spawnEntity("Creeper", $world$, $x$, $y$, $z$)
2: setEntityHealth($id$, getEntityMaxHealth($id$))
3: sendMessage($player$, 'The entity has been healed.')