Hi, I’m trying to open a door on a button press. I’ve made an input action to interact with objects and a function to open the door on the door BP (I know the function works because I use the same nodes on another BP that opens the door on a timer). I’m calling the function on input (E) in the first person character BP using an object reference to the door BP (Activated Door) to call the Open Door event. I keep getting the error “Accessed None trying to read property Activated Door,” which directs me to the Open Door node on the first person character. The debug string for the key press is firing, but the door is not moving nor is the debug string appearing. I’ve also tried casting, but I couldn’t get that to compile correctly. Any ideas??
EDIT: I just changed the E event to an input action event in the first person character BP, but the results are the same.
I think your variable there doesn’t reference any actor, at least on that time.
Either:
After Begin Play, get the Get All Actors of Class node, select your actor from the dropdown menu inside the node, connect the Out Actors pin of the node into a Get (copy) node, leave it’s index as 0, and connect the Get node’s output pin into the set type node of your variable.
Or
If there’s a detection involved before getting to use that door, can be with collision volumes or line traces, set your variable to the hit actor (if there’s a possibility that the hit actor can be another actor, check that by comparing the display name or tags)