Overlays
-
@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?
-
@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!
-
@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. -
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?