Scirra / Construct-bugs

Public bug report submissions for Construct 3 and Construct Animate. Please read the guidelines then click the 'Issues' tab to get started.
https://www.construct.net
107 stars 83 forks source link

none async functions behave like async functions #8273

Open F3der1co opened 6 days ago

F3der1co commented 6 days ago

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 commented 6 days ago

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 commented 6 days ago

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