• Wise@feddit.uk
    link
    fedilink
    English
    arrow-up
    0
    ·
    6 months ago

    Should it be

    PlayerHealth <= 0
    

    ?

    Otherwise the player could have 0 health and not die? I’m sleep deprived so forgive me if I’m wrong

    • vithigar@lemmy.ca
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      6 months ago

      You are correct about it allowing you to have zero health and not die, but whether or not that’s the correct behavior will depend on the game. Off the top of my head I know that Street Fighter, some versions at least, let you cling to life at zero.