hyperPad hyperPad Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Login

    how do make a character quit the game when HP is 0

    Scheduled Pinned Locked Moved Help and Support
    3 Posts 3 Posters 300 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • DingusDevD Offline
      DingusDev
      last edited by

      I’m trying to make the game quit when a characters hp is 0
      is this coding right? Because it’s not working

      E4C1F81F-9ABD-4418-854C-7D06A051404D.png

      TutorialDoctorT RobinsonXR 2 Replies Last reply Reply Quote 0
      • TutorialDoctorT Offline
        TutorialDoctor @DingusDev
        last edited by

        @DingusDev 33D71CE0-5E2C-4494-A143-437FCF393976.png

        1 Reply Last reply Reply Quote 0
        • RobinsonXR Offline
          RobinsonX @DingusDev
          last edited by RobinsonX

          @DingusDev You've programmed it to only check on start. You can plug the Add to Health Bar behavior to Quit Project behavior, like TutorialDoctor suggested. This makes it so when the health bar reaches 0, it will restart the game.

          This is because in the Add to Health Bar behavior, there is a toggle to trigger when the health bar becomes empty (it should be on by default).

          1 Reply Last reply Reply Quote 0
          • First post
            Last post