Godot 4.3stable
Sorry for the poor title, wasnt sure how to word it.
I have a function that looks like this in my auto battler game.
Original_function()
Await function_1
Await function_2
Await function_3
Function 1 is a function that searches through the players units to see if it has an ability with a specific trigger and calls the ability function on that unit. Function 2 prints “hello”, and function 3 prints “world”. Function 1 uses await when calling the units ability like so.
Await unit.ability_function()
The problem is, that the original function does not wait for the units ability function to finish, it would print hello world at the same time as the units ability function being called.
Im assuming this is intended so i was wondering what a good way to accomplish this goal would be. Essentially how to await on a function called within an awaited function.