MajeedKazemi / blocks-to-code-old

Other
1 stars 0 forks source link

ask and wait -> statement + output #8

Closed user-74 closed 2 years ago

user-74 commented 2 years ago

Currently the ask and wait block returns the answer as the output.

To mimic Scratch this block should be converted to a separate output block as the answer, and the ask block converted to a statement.

MajeedKazemi commented 2 years ago

@user-74 have you find any solutions to implement this?

user-74 commented 2 years ago

I've grabbed the blocks over from Scratch, but I don't think it came with code generation. I will look into that and see if its possible, otherwise I'll attempt to write some myself

user-74 commented 2 years ago

Using var to declare variable allows them to be brought to the top. Using the answer block before ask has a value of undefined.

For answer, use the variable set in var.