The get_health()
function retrieves Gizmo's current and maximum health points. Use this function to monitor Gizmo's condition throughout the game.
health_data = get_health()
None.
The function returns an object with two properties:
current_health
: An integer representing Gizmo's current health points.max_health
: An integer representing Gizmo's maximum health points.Here's an example of how to use the get_health()
function:
# Get Gizmo's health information
health_data = get_health()
# Print Gizmo's current health and maximum health
print(f"Gizmo's current health: {health_data.current_health}")
print(f"Gizmo's maximum health: {health_data.max_health}")
# Calculate health percentage
health_percentage = (health_data.current_health / health_data.max_health) * 100
print(f"Gizmo's health is at {health_percentage:.2f}%")
This example demonstrates how to retrieve Gizmo's health information, display the current and maximum health, and calculate the health percentage.
get_health()
function is available from the start of the game (UnlocksAtLevel: 0).