This is the testing Godot forums! All forum posts unique to this forum will be deleted! Please use the main forums here for any posts you want to keep. All forum rules still apply.

Yield for function

SomnivoreSomnivore Posts: 102Member

I'm looking to do something like this:

func some_func(): #do stuff yield(other_func_that_yields_for_idle_frame()) #do more stuff

As of this moment I'm aware you can store another function's state and resume() that function on demand, and you can also yield for signals so the other function can fire this signal to allow the first function to continue, but I'd like to just wait for this function in particular to finish before continuing. Is this a possibility?

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.