Hello all!
I was wondering if, for the door closing, i can use the ELSE (which still works) instead of the original lecture code.
if (PressurePlate->IsOverlappingActor(ActorThatOpens))
{
OpenDoor();
LastDoorOpenTime = GetWorld()->GetTimeSeconds();
}
else
{
CloseDoor();
}
original lecture code:
if (PressurePlate->IsOverlappingActor(ActorThatOpens))
{
OpenDoor();
LastDoorOpenTime = GetWorld()->GetTimeSeconds();
}
if (GetWorld()->GetTimeSeconds() - LastDoorOpenTime > CloseDoorDelay)
{
CloseDoor();
}