SetTimer usage

Hi again.

I’m trying to create a Timer like we used to in UScript. I tried searching the ShooterGame code and found nothing, so I went straight for the documentation.

According to the documentation, it should be as easy as doing this:

FTimerManager::SetTimer(this, &AMatineeActor::CheckPriorityRefresh, 1.0f, true);

however, to me it seems it’s not.

I’m trying the following:

void ACustomPlayerController::CameraTimer()
{
	FTimerManager::SetTimer(this, &ACustomPlayerController::ChangeCamera, 0.5f, false);
}

where ChangeCamera is of course another declared function.

and I get an error:

Error	1	error C2352: 'FTimerManager::SetTimer' : illegal call of non-static member function

so what the heck am I doing wrong?

thanks :slight_smile:

You now want to do GetWorldTimerManager().SetTimer instead.

that works, thanks!