How to program Snap to save itself (including using Javascript blocks)?

I would like to know if there is a way to program the project to save itself at a certain point (eg. to remember variables). This includes through Javascript (despite it being disabled automatically).

Snap! 6.9.0 Build Your Own Blocks you can use that block and the unsaved changes block (do you want me to add the unsaved changes block?)

Do you know where that block originally came from? (I think I do)

Jens.

Wdym? For it to run while JS is disabled? That’s against the rules.

unsaved changes block?

(Edited) - I see. So that would save all variables?

For if I enable it. I don't share projects anyway, I usually use Snapp to share them as exes (which I'm hoping allows javascript for changing the game title, etc.)

The block I linked saves the project itself, meaning it can be used to make an auto save. It is the same as clicking file> clicking save

That's super useful! Thank you!

I do have a question though, what is the unsaved changes block?

world.unsavedChanges()

what exactly does it do?

So when ever your making a project and you make a change, you have not saved it yet so if you click it it says true or false, if it is false then you should save.

please don't just post javascript code and expect people to know what it means. it's low-effort, unhelpful and annoying.

Hmm... It is quite similar to the one I created in my Snap! Dev tools project.

That's decently useful. Thank you for your help with the code!

Np, just helping out.

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