Page 1 of 1

How to delay execution of code for non-Actor classes?

Posted: Sat Mar 26, 2016 8:19 pm
by sn260591
SetTimer() and Sleep() is not available in this case.

Re: How to delay execution of code for non-Actor classes?

Posted: Sat Mar 26, 2016 8:41 pm
by Wormbo
If you have functions that get called regularly, go find yourself a LevelInfo and use that to do keep track of the time. Otherwise I recommend spawning a custom actor on the current level or the entry level to do the timing for you.

But that's just the very generic suggestion. A more specific one depends on what exactly you are trying to achieve. (Stating that is a much better way to get good answers anyway - you might have an idea for an approach, but it could be way off track.)

Re: How to delay execution of code for non-Actor classes?

Posted: Sun Mar 27, 2016 7:28 am
by sn260591
Wormbo wrote:A more specific one depends on what exactly you are trying to achieve.
It is connected to GUI. It is necessary for me that after clicking of the button some part of a code was executed after one second.