I am calling function from action of entity and this function has loop with wait() in it. If I just do this, then the action and that function are running in parallel.
Simple function can not run "in parallel", this possible only then you use multithreading.
>>>Is there a way for action not to proceed until function completes