Hello! I’m trying to solve a Widget challenge. I have Trigger Box 1 that opens a Widget to view an image and after the user is finished, they click the Close button to close the window but then another Widget opens with a web browser window containing a survey form. When they are done, they click the Close button and the window closes. The user moves about the scene and encounters another Trigger Box 2 and they view different content but the same process of widgets. However, if the user goes back to Trigger Box 1 they can view the Widget with the image, but I do not want the Widget with the web browser to open. It can only open once. That is the part I’m having a problem with. Any advice? Thanks!
Hey @gisvisman!
Have you tried using a DoOnce or a branch (if true) node? You can find more information on those nodes here:
I hope the above is the solution you need!
I have not and this looks like what I’ve been searching for.
Thank You!
I was able to get the DoOnce to work in one of my widgets.
However, one of my widgets has a Close button that opens another widget and I only want it to open once. I followed the same logic but it continues to open. Any thoughts?
Thanks again for the help and guidance!
Hey @gisvisman!
That is some odd behavior. Is the widget you are having trouble with instanced? (I can see that happening because of the remove from parent.) Could you give more specifics on the widget in question?
If the DoOnce is failing due to it instancing itself, possibly adding a master variable attached to the parent that can be referenced as a true/false using a branch may work.
Any additional specifics you provide may go a long way in solving your problem!
Hello @Quetzalcodename
I’ll try to better explain the blueprint layout.
In the main level blueprint, I have several trigger boxes to open several widgets.
In the main level blueprint, this logic is duplicated for the different trigger boxes. See below.
Once a trigger is activated, a widget (image) appears where the user can scroll through the contents. Once they close the widget, another widget appears. See below.
Below is the last widget to open and this is the only widget I want them to open once. But I want the user to be able to revisit the same triggerbox to view the same image without bringing up the survey questions again.
I will check out the Branch option and see if I can make some progress, but if you see something in the logic, as always, I appreciate your feedback.
Thanks!
So, I tried this.
I feel logically it should work but it doesn’t. I have a Counter integer set to 1 so when you click the Close button it would follow the True path and add 1 to the Counter and setting it to 2. Then if the user passes over the same TriggerBox and clicks the Close button again, that it would see the Counter as 2 and then travel along the False path and never open the survey widget. What am I missing?
Thanks!
Hey @gisvisman!
So your issue here is that the branch only reads boolean (true/false) statements. So you can use a true false statement as your check or use a less than node if you want to keep the counter for reasons.
Hopefully this helps solve your issue!