New variables in the header file:
FTimerHandle CloseTimer;
UPROPERTY(EditAnywhere)
float CloseDoorDelay = 2.0f;
Using the timer
if (PressurePlate &&
PressurePlate->IsOverlappingActor(ActorThatOpens)) {
OpenDoor(DeltaTime);
GetOwner()->GetWorldTimerManager().SetTimer(CloseTimer, CloseDoorDelay, false);
} else if(!GetOwner()->GetWorldTimerManager().IsTimerActive(CloseTimer)) {
CloseDoor(DeltaTime);
}
Ended up with a delay value of 0.8 seconds