Everytime i press play with this code activated
if (GetWorld()->GetTimeSeconds() - LastDoorOpenTime > DoorCloseDelay)
{
CloseDoor();
}
Unreal crashes and gives me a bug report, I don’t see what wrong with the code could anyone help?
Everytime i press play with this code activated
if (GetWorld()->GetTimeSeconds() - LastDoorOpenTime > DoorCloseDelay)
{
CloseDoor();
}
Unreal crashes and gives me a bug report, I don’t see what wrong with the code could anyone help?
I found what was causing the problem
here is what I had
void UOpenDoor::BeginPlay()
{
Super::BeginPlay();
AActor* Owner = GetOwner();
ActorThatOpens = GetWorld()->GetFirstPlayerController()->GetPawn();
}
Here is what I needed
void UOpenDoor::BeginPlay()
{
Super::BeginPlay();
Owner = GetOwner();
ActorThatOpens = GetWorld()->GetFirstPlayerController()->GetPawn();
}