Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
hyperPad

hyperPad Forum

  1. Home
  2. Help and Support
  3. Reacting to an overlay being closed

Reacting to an overlay being closed

Scheduled Pinned Locked Moved Help and Support
5 Posts 3 Posters 935 Views 1 Watching
  • 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.
  • StanicaS Offline
    StanicaS Offline
    Stanica
    wrote on last edited by Stanica
    #1

    I have an overlay that allows you to buy items from a store and I need to update my UI in the scene below after closing the overlay. I've tried opening the overlay without pausing the scene and broadcasting a message, but the scene doesn't pick it up. I can set up a timer to periodically load a file and check if its contents have changed but this feels very inefficient. Any ideas?

    SplitMindGamingS 1 Reply Last reply
    0
    • StanicaS Stanica

      I have an overlay that allows you to buy items from a store and I need to update my UI in the scene below after closing the overlay. I've tried opening the overlay without pausing the scene and broadcasting a message, but the scene doesn't pick it up. I can set up a timer to periodically load a file and check if its contents have changed but this feels very inefficient. Any ideas?

      SplitMindGamingS Offline
      SplitMindGamingS Offline
      SplitMindGaming
      wrote on last edited by
      #2

      @Stanica I tried this also as I have an overlay I use to buy upgrades for my main character. I tried the broadcast message and it also doesn’t work. You have to use save file and load file but the problem with that is it’s not instant as you are experiencing right now without adding a timer. What I had to do was create the overlay layer entirely on the U.I layer which just looks really messy. Would be nice if overlays worked on real time prior to the scene you are currently playing.

      StanicaS 1 Reply Last reply
      1
      • Aidan_FireA Offline
        Aidan_FireA Offline
        Aidan_Fire
        wrote on last edited by Aidan_Fire
        #3

        I also had this problem once, I think saving and loading is the only way to send data between scenes/overlays.

        I use an overlay as my UI for one of my games because it's the main menu UI, it disappears when the game starts. This way I can run a 0s timer to load the file (so the main menu isn't really efficient) but the timer turns off once the game starts. If your game is sort of meant to pause while the Shop UI is up, just run the load behaviour on a 0s timer I don't think it matters too much if your game is running a bit inefficiently while you're paused or in a shop, just turn off the load timer once you're done.

        StanicaS 1 Reply Last reply
        0
        • Aidan_FireA Aidan_Fire

          I also had this problem once, I think saving and loading is the only way to send data between scenes/overlays.

          I use an overlay as my UI for one of my games because it's the main menu UI, it disappears when the game starts. This way I can run a 0s timer to load the file (so the main menu isn't really efficient) but the timer turns off once the game starts. If your game is sort of meant to pause while the Shop UI is up, just run the load behaviour on a 0s timer I don't think it matters too much if your game is running a bit inefficiently while you're paused or in a shop, just turn off the load timer once you're done.

          StanicaS Offline
          StanicaS Offline
          Stanica
          wrote on last edited by
          #4

          @Aidan-Oxley I never considered disabling the timer after it ran. Thanks!

          1 Reply Last reply
          0
          • SplitMindGamingS SplitMindGaming

            @Stanica I tried this also as I have an overlay I use to buy upgrades for my main character. I tried the broadcast message and it also doesn’t work. You have to use save file and load file but the problem with that is it’s not instant as you are experiencing right now without adding a timer. What I had to do was create the overlay layer entirely on the U.I layer which just looks really messy. Would be nice if overlays worked on real time prior to the scene you are currently playing.

            StanicaS Offline
            StanicaS Offline
            Stanica
            wrote on last edited by
            #5

            @SplitMindGaming For one of my modals I did the same thing you did and created the "overlay" on the UI layer. Messy but it works.

            1 Reply Last reply
            0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Search