Blocks execute out of order when they run in the same frame

ok, whatever works best

2 Likes

@AwesomeOnion @Nazari

It appears the fix is incomplete.

This works now as expected

However now the conditional is delayed until the next frame

To see this we can implement a simple frame counter as the *first* object

.

And change the output to the Frame Count

It will output “2” as the frame count

However, if we move the Set Text before the conditional

It now outputs “1” for the frame count

And to show that the updated value of X is calculated correctly in frame and in sequence, we can change the output to X

This outputs “2” as expected as the value for X

Therefore, the bug isn’t quite fixed since the conditional block is delayed. So the prior Set {variable} block(s) are not “immediate” when followed a conditional block.

4 Likes

So basically it was only fixed for if conditionals, whereas it still occurs for other blocks

(for example, set values, set speed, set text to speed would also show the wrong result)

3 Likes

No. The result is correct but they delayed the evaluation of conditionals until the next frame. Other blocks don’t get delayed, so it’s not completely fixed.

6 Likes

Thanks for finding this. It is very helpful to have you checking so carefully! We’ll continue to look into it. The fix we released was designed for the specific problem, but we’ve realized there are some deeper issues with the code execution that will be more difficult to fix.

It sounds like this issue is not quite as bad as it was before, but the execution does not work quite as expected. Is that accurate?

3 Likes

Yes, I agree that’s accurate.


Sounds like you’re wanting to call this a new bug since the execution order was fixed? Would you prefer if I created a new topic?


Your welcome. Though I will note that my intention isn’t/wasn’t to perform HS QA. I was just trying to make a project that took advantage of and highlighted the benefits of the immediate calculations. I just noticed that it wasn’t working as expected.

As is, the immediate calculations certainly simplify setting “constants” during the first frame so you no longer need numerous When Game Starts. And it does offer the ability to simplify/clarify really long Set equations by breaking it up into multiple parts. However, long equations in conditionals can’t be broken up since the Set calculations don’t work immediately preceding a conditional. And without the ability to execute more than just multiple Set calculations in one frame, I can’t really think of anything really new that couldn’t be accomplished before. And finally, FWIW HS really needs documentation for how the Player works.

4 Likes

This seems like the same issue though, sub frame order incorrect. Feel free to rename it.

3 Likes

No one from THT said anything but this appears to have been fixed/finished. @Awesome_E, want to confirm?

2 Likes

I think this is fixed now!

3 Likes

Thank you, Sam. I was testing it out a few days ago and it seemed fixed to me.

3 Likes

Leads can close now

1 Like

small reminder that images costs $ ;)

1 Like

Oops, ok I’ll keep it in mind

2 Likes