Access none 'Sunlight'

60154-bb96489a5b1895d802f05b1b23915a1b.png

I’m having problems with the blueprint. I tried to fix it but couldn’t figure it out. Help pls thanks :{

My bad about the pictures not showing was’t really paying attention when posting the images ;p

My bad i fixed it now

I get what you mean but i’am new to Unreal Engine 4 If u can help me out with visuals would help out more but thanks though ill see how to make my way around

I hate to be a donkey, and hopefully others have access, but for some reason, I cannot access any of the links.

in essence, think of “none” as a null, so the input, coming in, has no value to it, so the Light component node, has no idea what to do. So to start, check the sunlight node for having a non-node value, and if it does, print string out it’s been found, and the start determining why that is true

hope this helps,

you need just one node, that is the not equal (in the popup context menu, type in !=), and just get it for an Object, then you can wire the pins out of that into a Branch statement, checking the condition, you only want to wire the Sunlight variable into the != node, which will force the branch to execute True, if sunlight is “not equal” to null, and false, if it is “equal” to null.

Hope that helps.

so long as I can get from point A to point B, in the same amount of time, I don’t care the path taken! lol

My guess is, that != executes faster, in that it doesn’t imply a function call of some form to test for “all” conditions that IsValid may look for. Does it really matter how long it executes? more than likely not.

but honestly, who the heck cares, so long as the answer is understood!

have a great day!

Actually “IsValid” would be the better solution I think. Even though not equal absolutely works.

Though the interesting part should be why this variable is empty. Sometimes it’s acceptable to just have nothing happening if the variable is empty. Sometimes it isn’t.

Depending on that either a simple “IsValid” fixes it or there needs to be some kind of guarantee of it not being empty.

Now im just too confused lol

I did as what you said but Im not sure if i connected them right or something but from my point of view neither the false or true is lighting up

i am confused with this thing could u help me out on which area i am suppose to add the node “!=” thank you

Hello !

I would add the “test” right at the start, where there output pin of Sunlight is feeding into the light component. Break that link to the light component, insert the “!=” or IsValid node, with the output going to a branch, and take the “true” pin of the branch and run that into the light component node.

Then with the false pin, put in a Print String Node, to get some information as to what is going on

Hope this helps,