Why aren't my nodes working?

First of all, I’ve created Main Widget, which operates during the gameplay. This has event tick that changes health, mana, level variables for the whole time.

As I was modifying what I was following from the tutorial, I do not understand what is valid? (shown in the picture) means. I suppose it means if Main Widget is running for the moment or not. But then when I checked, it keeps on going to “failed” node instead of the “success” string. the Main Widget is definitely running for the whole time. Or probably I am not understanding “IsValid” function.

What should I do to make it go to “success” string?

===================================================================================

Furthermore, I created this “Show Obtained Message?” Boolean in the basic Third Person Character Blueprint. When I was calling it in this blueprint class(Bp inventory), it simply does not work at all, so I had to connect the previous pin to the “IsValid” instead of the “branch” shown at the bottom. Sometimes, when I try to call variables from other blueprints, it does not work. Why is that so?

I’ve already done that, but didn’t work. Also it keeps on going to false. Your answer never helped.

It is working as intended - the branch is going to false because your variable is equal to false. If the variables value was true, the branch would use the true wire instead.

Your is Valid node might also be going down the Is Not Valid path, because the Main Widget may not be valid. You need to use Create Widget to create the widget first, and then store it in the Current Widget variable. Then it will be Valid.

I would definitely recommend watching some of the official unreal tutorials on Blueprints, because it seems that you do not fully understand some concepts around Blueprints. You will speed up your learning a lot if you just power through the tutorials instead of trying to make stuff and having to wait for an answer every time you reach a problem. Just a bit of advice :slight_smile:

Good luck and happy developing

You need to plug a white wire into your branch node, otherwise it will never run. This is your error.

Is valid will check if a variable has been set or not. In your case, your checking if your Main Widget Variable has been set :slight_smile:

Hope this helped, please mark this question as correct if problem is solved.

Could you show a screenshot with the entire setup? You say that your main widget is running, which leads me to believe that you are not initializing your Main Widget Reference correctly. The IsValid node simply checks whether the object you put in is not NULL or about to be destroyed (“pending kill”).

However, with the screenshot you provided, it’s impossible for us to know where the problem is exactly.