True, I didn’t even look that far. OP, here’s a non-cryptic response:
The first node is a ‘SET’, meaning you’re setting your cast reference to null each time this event runs. You want to GET your reference
There’s no need to SET the int on the actor you just got it from, you’re just setting the same value again
You need different ‘add to viewport’ nodes for each of those execution flows, otherwise it doesn’t know which of the widget references to use. It will try and use both, but one won’t be valid
Also, add a print statement off the event just to check it’s even being fired to begin with.
True, I didn’t even look that far. OP, here’s a non-cryptic response:
The first node is a ‘SET’, meaning you’re setting your cast reference to null each time this event runs. You want to GET your reference
There’s no need to SET the int on the actor you just got it from, you’re just setting the same value again
You need different ‘add to viewport’ nodes for each of those execution flows, otherwise it doesn’t know which of the widget references to use. It will try and use both, but one won’t be valid
Thanks. It shows it properly now.
Although, it seems that it couldn’t know the integer value. It’s supposed to check if the integer value is greater than 0, but every time the value goes up, it still shows the widget through the false branch.
First try removing that set node (it really is unnecessary) and add a print between the Event and the Branch, and check you are reading the int as above 0.
If you are, then check your widgets. Are you clearing them after each click? If not then they’ll be trying to fight for the same z order.
Are you expecting the widget to update after the click? If so, this event will not do that.
First try removing that set node (it really is unnecessary) and add a print between the Event and the Branch, and check you are reading the int as above 0.
Just tried it. It isn’t reading if it’s above 0. It always go false no matter if it’s 0 or above.
Ohhh. I just did it and it doesn’t print the value it’s supposed to (aka. it just says 0 no matter what I do). How odd. There must be something wrong in that area then.