Hello. I want to control visibility of an object in the scene with another object: when I pull a lever, a button on the wall appears.
I have set up the animation of the lever, but I don’t understand how to control the buttons visibility through it.
The interaction with the lever is set inside the FirstPerson BP. I have tried to make ButtonVisible variable so that is becomes 1 when the lever is pulled, but when I’m trying to use it inside the BP_Button, it doesn’t work, since it requires another target input, and objects inside BP_Button don’t fit in.
I also tried to create a ButtonRef variable inside BP_FirstPerson and make it of a BP_Button class, which is then connected to Set Visibility, but that doesn’t work neither, and when I close the sumulation, I got error messages:
“Blueprint Runtime Error: “Accessed None trying to read property ButtonRef”. Node: SetVisibility Graph: EventGraph Function: Execute Ubergraph BP First Person Character Blueprint: BP_FirstPersonCharacter”.
I would appreciate any help.