Is there a GetWorldTimerManager().SetTimer() equivalent that supports parameters?

Hello, i want to make a method call after x amount of seconds and for that i have been using GetWorldTimerManager().SetTimer(), but the problem with this is that it does not support sending variables (like AActor and derivated classes) through it. Is there a way to achieve this? Thank you

Funtion poiter just pointer to the funtion that can be called it does not represent a call, you can’t use other arguments of such SetTimer as i compiler does not support identifing argument types of pointed function. So you cant do that direcly with one funtion call in C++, it was limitation of timers also in UE3 even in UnrealScript as well as now in Blueprint.

But you can walk way arround it, like seting some varable when you set timer and pointed funtion would use that varable as argument for pointed funtion. You can do that in single funtion that looks like settimer just will have extra argument which will be used to set the that varable which later be used by pointed funtion.

Currently i’m using pointers to later access it, but i wanted to find a way to not have that. I’m figured out a way of calling SetTimer with parameters using FTimerDelegate but it only supports simple types like int, float and so on. Is the pointer approach the only way to do this using more complex types?

Sorry did not understand very well what you wrote :stuck_out_tongue:

Anyway way that pointed funtion can use as argument will work, i just showed one ezample, you seem to figure other ways already ; p

Any way that can deliver argument to poited funtion will work, i only showed one example