I’m having problems with two widgets I’ve been working on (well, three+ technically, but we’ll get to that).
I.
The first one is a name tag widget that appears whenever the player looks at something nameworthy. The way I have it set up, it’s always there but hidden, it just gets its visibility changed when your ray trace hits something with the right component attached to it.
Here’s the logic that determines whether the thing you’re looking at should cause its visibility to change:
Here’s the logic that i. creates it, ii. makes it visible when you’re looking at an appropriate actor, and iii. makes it hidden when you’re not
The issue that I’m having is that when you initiate conversation with an NPC, I can’t change the visibility of this widget to make it hidden and it just shows up behind the dialog widget.
I’ve tried plugging in nodes after the nodes that check the visibility of the dialog box but before the ones that make it visible and pause the game that change the visibility of the name tag, but that doesn’t do anything.
I thought that maybe the ray trace is going through the widget so I’ve tried to add a bunch of convoluted boolean logic to the front end where it decides whether the thing it’s looking at should make it display (such that, if the dialog box is visible, and it’s looking at something that would otherwise make it visible, collapse the name tag).
I have the dialog box set to Not Hit testable (Self only), but it was originally just visible, so I would expect that to stop the ray tracing if that’s the issue. On that note, I also played around with the Z order a bunch, but it doesn’t seem to be doing anything.
That’s about all I can think of to try to handle this situation; the only thing left that I can think of is that there’s something in the logic itself that I’m not seeing that is causing this.
II.
The second one is the dialogue box itself.
The way this one is built is like this:
The scroll box is the one on the left, which is important to know because there is logic that essentially takes a table attached to the NPC you talk to, look up all the row names in the table, then create text widgets and make them children of the scroll box.
Eventually, I’m going to figure out how to make it so that for each of these widgets, when you click on it, it changes the text in the big box to whatever the content of the row is. That’s a challenge for later, however, because I have a stupider problem.
I don’t seem to be able to click on these widgets. In order to test whether I can actually click on them or not, I set it up so that upon clicking on one of them, I should trigger a print string node and remove the widget from parent (ought to be very easy to tell if it’s working).
However, it’s not. I can tell that the mouse at least recognizes the widget because I added tool tip text to appear when I hover over the widgets, which you can see below.
Again, with this issue, I’ve tried a few things.
I know for sure that the big dialog box is set to Not hit testable (self only), I know it’s got a lower Z order than the topic name widgets. I checked the Player HUD widget that comes in the starter content by default and made sure that one is not hit testable as well. I’ve got clickable events enabled on the player controller, and when the dialog box appears, it sets it the input to game mode and UI. So, again, I’ve exhausted my limited knowledge of widgets on this one.
Any help with these would be greatly appreciated, of course. To the extent that it matters, II. is a priority to me because it’s not just cosmetic and it’s actually impeding the development of this system.
Thanks to all.