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

Discussions about Coding and Scripting
Post Reply
User avatar
sn260591
Average
Posts: 54
Joined: Sat Jun 01, 2013 10:38 am
Location: Russia

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

Post by sn260591 » Sat Mar 26, 2016 8:19 pm

SetTimer() and Sleep() is not available in this case.
Sorry for my bad English

User avatar
Wormbo
Adept
Posts: 258
Joined: Sat Aug 24, 2013 6:04 pm
Contact:

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

Post by Wormbo » Sat Mar 26, 2016 8:41 pm

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.)

User avatar
sn260591
Average
Posts: 54
Joined: Sat Jun 01, 2013 10:38 am
Location: Russia

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

Post by sn260591 » Sun Mar 27, 2016 7:28 am

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.
Sorry for my bad English

Post Reply