• I'm connecting behaviors after a load overlay behavior, but they aren't running when it closes....am I doing it wrong or what is the best way to go about running behaviors when the overlay closes?

  • When you load an overlay, does it always pause the scene? I tried it by loading the default pause overlay, and the behaviour connected under it activated (it was just set colour of a random object to red), but I couldn't see it until I closed the overlay (because closing the overlay I paused the scene).

  • @Aidan-Oxley yeah I made a test project, and it works fine....I guess I'll have to retry in my project.

  • @Murtaza it seems like what is going on is, I have load an overlay with pause on, and when I close it my "execute behavior" behavior (connected after the load overlay) isn't triggering the selected behavior until I load the the overlay again, and then even though pause is on, it still runs the behavior. I have a set color connected under the "execute behavior" and it runs when the overlay closes as it should.(the first time)

  • @Murtaza did you get my email with the project?

  • Admin

    @iTap-Development Which email did you send it to? I don't see anything in the contact@hyperpad.com account.
    @hamed may have already checked it out?

  • @Murtaza i sent it to that email.

  • @Murtaza just checked and found it hadn't sent.... I resent it!

  • Admin

    @iTap-Development the way it is working for me is the following:

    • I press the locations button
    • I click cupertino
    • overlay closes and the title turns red.

    According to the logic, that is what is supposed to happen. What are you expecting to happen?

  • @Hamed sorry I should've explained...I had the title turn red to see if the behaviors after the load overlay were executing. The problem is that the color changes but the behaviors that the "execute behavior" is supposed to execute aren't being executed.(the behaviors are jut to the right). What should be happening is when you tap a location the icon should change to that locations current icon. Instead it seems to change only when i open the overlay again.

  • @Hamed I just tested it some more, and I found that if the set color duration was 0 the icon wouldn't change, but if the duration was the default 1 second it would. EDIT: I tested it with just a restart scene behavior instead of the execute behavior, and nothing changed....so I don't think it's my behaviors wrong, but idk 😐
    EDIT 2: I just replaced the set color with a wait behavior, and tried to see how short a time I could wait, and it works as short as 0.001 seconds. Anything shorter doesn't work consistently.

  • Admin

    Okay, I see whats happening.

    So you're putting logic on Load Overlay and there is a fraction of a second where the overlay hasn't loaded yet and is still running behaviours.

    The reason for this is because there is an option to not pause the background when an overlay is open.

    The easiest way to get around this reliably is to use a wait behaviour after load overlay.

    The safest way to get around this is to use something like broadcast message to broadcast something to the global ui when you close the overlay, and manually trigger the behaviour with Behaviour On.

  • @Hamed ok thanks! Maybe you could add an option to stop running behaviors if it has pause on?

Log in to reply