How can I create a while loop that runs all the time but doesn't interfere with the order that the code runs in (PYTHON)? : I'm making a text adventure game in Python to get myself started, as I am not that good at Python yet. I have tried to implement a set of health rules:
    
    while True:
    if health == maxHealth:
      playerAtMaxHealth = True;
    elif health > maxHealth:
      health = maxHealth;
    elif health < 0:
      health = 0
    elif health == 0:
      playerDead = True;

Here is it with the rest of my code:

    def startUp():
      StartPRINT("""╔═══╗
    ║╔══╝
    ║╚══╦══╦══╦══╦══╦══╗
    ║╔══╣══╣╔═╣╔╗║╔╗║║═╣
    ║╚══╬══║╚═╣╔╗║╚╝║║═╣
    ╚═══╩══╩══╩╝╚╣╔═╩══╝
    ─────────────║║
    ─────────────╚╝ \n""")
      global gold
      global health
      global inventory
      global berryCollected;
      global maxHealth;
      global playerAtMaxHealth;
      global playerDead
      berryCollected = False;
      playerAtMaxHealth = True;
      playerDead = False
      gold = 0
      health = 30
      maxHealth = 30
      inventory = []
      time.sleep(2)
      while True:
        if health == maxHealth:
          playerAtMaxHealth = True;
        elif health > maxHealth:
          health = maxHealth;
        elif health < 0:
          health = 0
        elif health == 0:
          playerDead = True;
      forest()

Basically what happens is that it prints out the start text, but then it just gets stuck in the while loop and doesn't move onto forest().

Any help would be greatly appreciated!