Sharing Variable Between Scenes?

How do you get this?

They wanted to share their blocks directly between scenes to avoid having to export and re-import them

image

Yeah, it sucks. But at least it's possible.

Oh, thanks!

I know, right? I tried suggesting shared custom blocks for that reason, but jens said no.

Can you give a quick summary on how to use them?

Oof, sorry.

Is that question for me?

Yes, but I might be able to figure them out myself.

image

The key name doesn't have to be the same as the variable but it makes things easy to follow

Oh, that makes sense, thanks!

Can we also do it with lists?

The values in the browser database need to be text strings

So, the way to store a list is to convert it to a JSON string and store that representation of your list

image

Note JSON of block is one of the options of the length block
image

oh, perfect! You are a time saver, thank you!

You can send "simple" values with
untitled script pic - 2022-01-29T185236.997
untitled script pic - 2022-01-29T185218.581


Or with browser storage and serialization
untitled script pic - 2022-01-29T185850.762
untitled script pic - 2022-01-29T190116.385

Test project

Script

Does nothing, also this already has a solution.

Cool but there is already a solution plus I'm far too in to restart, but thanks!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.