I cant understand the word tick on documentation. Is the the call for every second?
A tick is called every frame, and the length of a frame is determine by your hardware and it normally isn’t a second.
From the documentation, “Function called every frame on this Actor. Override this function to implement custom logic to be executed every frame. Note that Tick is disabled by default, and you will need to check PrimaryActorTick.bCanEverTick is set to true to enable it.”
So the main focus here is every frame. And a frame is how the game looks at the current frame. If you need to do something that is focused around seconds, then you can create a class variable and increment this variable with DeltaTime during your tick’s function. Once it equals a second by comparing to a float value of 1.0 for one second, then reset the variable and do whatever function.
The better approach however is to create a function that is used with the time manager. You can create a function that is called in seconds/half seconds/etc. Like a damage over time, use a time manager. GetWorldTimerManager().SetTimer(this, &ACustomPlayerController::UpdateDot, 0.5f, true);
0.5f would be how long this function would be called and every half second the player will ultimately be hurt.