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

    Carrying values between scenes?

    Scheduled Pinned Locked Moved
    Help and Support
    3
    6
    289
    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.
    • AcebossA
      Aceboss
      last edited by

      How do I carry a value (i.e. a score) from 1 scene to the next?

      AcebossA 1 Reply Last reply Reply Quote 1
      • AcebossA
        Aceboss @Aceboss
        last edited by

        @Aceboss So I managed to achieve it via the ‘modify save file’ and ‘load file’ behaviours, in case anyone else is looking for the means of doing it.

        MurtazaM 1 Reply Last reply Reply Quote 1
        • MurtazaM
          Murtaza Admin @Aceboss
          last edited by

          @Aceboss

          Another way you can do it is to place an object on your UI layer, and store the value on that object. It should then exist in all scenes.

          AcebossA 1 Reply Last reply Reply Quote 1
          • AcebossA
            Aceboss @Murtaza
            last edited by

            @Murtaza I haven’t had too much luck with that. I.e. if I set an attribute on an object in the global ui in scene1, and then get that attribute in scene2, the value returned is the default, not what was set in scene1 - any ideas?

            RobinsonXR 1 Reply Last reply Reply Quote 1
            • RobinsonXR
              RobinsonX @Aceboss
              last edited by

              @Aceboss When switching scenes, make sure refresh is disabled. If that is enabled, all GUI objects reset when a different scene is loaded.

              AcebossA 1 Reply Last reply Reply Quote 0
              • AcebossA
                Aceboss @RobinsonX
                last edited by

                @RobinsonX Thanks, that was it!

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