Wait until an object is gone?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By MrGenie151

I’m making a platformer with signs and dialog boxes. Is there any way to wait for the dialog box to queue_free() before unfreezing the player?

:bust_in_silhouette: Reply From: Wakatta

For dialog and menu systems simply hiding/showing works faster than adding/removing from screenTree. Not necessary but something to look into.

# Player.gd

func victor_fries():
    yield($dialog_box, "tree_exited")

or you can directly connect the signal for more control

don’t have to do that in the player script. i have a freeze variable lol

MrGenie151 | 2021-12-19 03:47