I think I must have missed something with this lecture because it doesn’t make sense to me. The problem was that an instance of OpenDoor existed in the scene and didn’t have a trigger volume assigned, and this gave a null pointer error that made the project crash on start.
I went ahead and added the following “if” statement to BeginPlay()
if (!PressurePlate)
{
UE_LOG(LogTemp, Error, TEXT("%s has the open door component on it but no pressure plate set."), *GetOwner()->GetName());
}
So on BeginPlay(), my script would now check to see if there’s a pressure plate there or not. However, despite doing this check (or trying to), I still have the original problem that I haven’t assigned a trigger volume to PressurePlate, so obviously my project is still going to crash just like before, which is what happens.
I can’t work out why it isn’t happening to you in your video, because surely you also still don’t have a pressure plate assigned, so why does your project not still crash? What I see in the video is that your Editor window doesn’t crash, and you get two clear red error messages telling you about the missing trigger volume. In comparison, my whole editor goes down.
Edit: I can find the error message in the log file stored in my project folder at BuildingEscape\Saved\Logs, but this is a black and white text file and it’s going to be really difficult trying to sort through something like that the find errors.