Tooltip widget won't use passed along info?

I am creating a tooltip widget for my character’s inventory hud.

If I print string of the item reference before added to inventory? Correct.

If I print string of the reference after it has been passed to inventory? Correct.

If I pass the info to the tooltip hud when it’s created the info will not display in the hud and now every value for the weapon item is the default.

But it’s only the tooltip widget which does not display the info correctly. All other aspects of my inventory display it correctly and will work; just not the tooltip.

Any help appreciatted.

If I pass the info to the tooltip hud
when it’s created the info will not
display in the hud and now every value
for the weapon item is the default.

Assuming the reference is valid, how is the data handled inside the tooltip? How are you updating the text blocks, for example.

It’s a simple tooltip that has a bunch of text boxes that display relevant info like item name, type, etc…

And then when it’s created I’m just pre-setting the “weapon master ref” with the one that the parent hud is using.

The good news is that a setup like this should definitely work.

Could you confirm that this very function prints? Perhaps print the Weapon Type - just to see the correct data gets into the widget in the first place.

I just checked all 3 areas where the info is being passed.

When the item is added to inventory ti checks out, and then passes the reference to the slot hud via a custom event. The slot hud only utilizes the weapon name and then passes the reference to the tooltip hud on it’s creation. I’m thinking this is where it breaks down.

Since I’m using a custom event maybe the tooltip hud is being created before the event can fire?

I’m gonna grab some screenshots right quick to better illustrate what I mean…

I’m thinking this is where it breaks
down.

So what gets printed in the GetWeaponType function then - default data or nothing at all?

So when somebody picks up an item. It will run this setup function when it adds it to their inventory.

The print string here is a-okay.

It will then run the “setup weapon info” event which literally just takes the reference of the weapon and sets it in the slot hud.

300009-tooltipshit-2.png

It uses that reference to create the tooltip widget we see at the very top of this post. Somewhere along the way the reference just isn’t getting passed correctly or something… Thanks for your help thus far.

Default data.

Hard to say where it breaks down looking at these. The very fact that the tooltip both prints and displays data, albeit the defaults, indicates that a valid reference is passed.

My guess is it’s either the incorrect reference (as in, another weapon object or a base class if that’s at all possible). Or it’s the item_struct. Do you, at any point, alter the data in the struct?

If all else fails, you may need to manually place Prints at every junction and follow the breadcrumbs manually. It’s a disheartening task. :expressionless:

Hmm, for some reason the text binding functions don’t seem to fire at all. So when asked for a value it just puts out the default off the reference.

I do not have an answer for that. The technique you’re trying to implement generally works well. Tooltip widgets mesh well with Getter functionality but can also be directly fed reference chains like so:

Not really applicable in your case since you need to convert an enumerator anyway.

You can even bind them to a function in another blueprint - so all the formatting can be done outside of the tooltip itself.


What are the chances you’re accidentally binding another function (in red, upper right)