Download

Is Valid?

Hi I am struggling with an object (in fact many objects), which exists in the level. I have a window in the scene. When the character gets near, the window should allow the character to open it. But when I call the window BP from the character blueprint, and check if it is valid, it shows is ‘not valid’. Can someone please help me what could have gone wrong.

Thanks in advance.
Siva

Creating a variable does little on its own - a variable also needs a value. If you create a string variable and forget to type in the text, what do you get - an empty string (not the best comparison but not that far off). Your variable can point at a specific instance of a window but it seems you’ve yet to specify which one.

I have a window in the scene. When the character gets near, the window should allow the character to open it.

So… which window should we refer to? How would you like the character detect the window? Judging by the abandoned line trace bit at the bottom, we’ll be looking at the window? Is that correct? Is looking at it enough or do we need to press a key / button to select it as well? Or is evoking Interact all it takes?

While the below is not a great way to interact with the world, what you’re looking for will be close to this:


Alternatively, have a look at this - by far the most standard way of interacting with the world:

It does not require variables or casting and is very flexible.

1 Like

Thanks for the clarification! I understand!