Construct-bugs icon indicating copy to clipboard operation
Construct-bugs copied to clipboard

none async functions behave like async functions

Open F3der1co opened this issue 1 year ago • 2 comments

Problem description

none async functions behave like async functions

Attach a .c3p

waitForPrev.zip

Steps to reproduce

  1. run preview

Observed result

text is set only after tween finished

Expected result

text is immediately set

More details

It seems like the asyncronous booleans in the "Edit function" dialog is not working correctly. Custom actions have the same issue, but I guess that is not a surprise as they share the same implementation.

Affected browsers/platforms:

First affected release:

System details

View details

PASTE HERE

F3der1co avatar Oct 04 '24 21:10 F3der1co

https://github.com/Scirra/Construct-bugs/issues/5257 Seems to be a duplicate of this, but this definitely goes against how scope and sync functions work for everything else (like wait X second) so this is very weird and counter intuitive. It's also confusing as I async functions have an additional overhead according to the documentation, so how does it even happen if the function is not async, are they inlined?

F3der1co avatar Oct 04 '24 22:10 F3der1co

image can be worked around by doing this for example, this does add a 1 tick delay before the tween starts though.

F3der1co avatar Oct 05 '24 00:10 F3der1co

I do think this is a duplicate of #5257 so closing, but I will have a look at the older issue and see how feasible it is to fix it. Long-standing issues like this can end up with awkward backwards-compatibility implications though.

AshleyScirra avatar Oct 29 '24 11:10 AshleyScirra