I know it is due to something ‘not’ being there, but this blueprint was working without errors 2 hours ago, I duplicated the blueprint it was part of to make a variation of where a child component is attached to control the locking of the door instead of taking a key.
Tried shifting it into the Door master BP in case it was something to do with the function being duplicated across two different BP’s but now the door that wasn’t reporting issues, is.
Reconnected all the pins, dragged in new references to the components etc. no impact.
My guess is I’m getting the player incorrectly?
Any help would be appreciated.
The doors stream levels on interaction and unload when you leave the bounding box, I’m using the players velocity to work out in which direction they are walking from the door to unload the previous room.
They are also physic-like doors so after interaction walking into them pushes them open.
The error message appears in the message log (once per door) just from starting the level.
When this pops up in the log, you can click on the offending piece of script to get to the right place, usually works ok. Is this the place the editor complains about:
No it’s the return node in the function itself, I tried having a local variable in the function to receive the result and feed that into the return node but then the error was referencing the bool I’d recreated so wasn’t even reaching the return node.
I understand that. But since it’s a pure node with no execution wire, something else attempts to pull data from it - here it’s setting the Forward bool, during Event Close Door.
Is this the only place in the entire script where this function is called? I’m trying to identify which part of the script cannot handle it.
My guess is I’m getting the player incorrectly?
On the contrary - there’s nothing wrong with the function itself, it’s about where it’s called.
Below is the door in question, the inner box controls the player pushing the door open, the outer box has a On End Overlap that checks the actor leaving is the player and if so calls the Close Door event.
The delay seems to have no impact (beyond the delay obviously), and the close door event isn’t called until the player leaves the bounding box, but the error occurs even if I just start and stop the scene without doing anything.
No idea why this fixed it but realised I’d assigned a reference to the Player Controller in the parent Interactable BP so used that in place of GetPlayerPawn in the Function and it works now (can’t believe I forgot the player reference)