Discuss Scratch

FieryFork
Scratcher
40 posts

Temporary Variables

There could be temporary Variables in the editor that could be useful for clone specific indexes (figuring out where list data is per clone) and variables that do not need to be used often.

Create a thread variable named: []
Change thread variable [] by []
Set thread variable [] to []
(thread variable variable [])
Broadcast [ v] to clones with [] set to []
<touching clone with [] set to [] ?>
Delete clones with [] set to []
portalpower
Scratcher
1000+ posts

Temporary Variables

This could be useful for keeping the editor clean, since the variables section can get very messy in bigger projects, or in other cases. Some things to note though:
1. there are a lot of implications of allowing the users to type the variable names in the blocks like that, like the need for errors or extremely hard to find bugs
2. the fourth block is confusingly worded
3. this is fairly easy to work around with local variables
4. the last 3 blocks seem a bit bloated, meaning they're a bit too long and wordy
5. the last 3 are really hyper specific and 5 and 7 are really easy to work around, so they probably aren't worth adding.

Last edited by portalpower (Dec. 3, 2024 00:15:19)

BigNate469
Scratcher
1000+ posts

Temporary Variables

I will point out that “local” variables are possible, as long as you consider scope to be a sprite- making a variable set to “this sprite only” will make a copy of it for each clone, independent of each other and the main sprite.

That said, temporary variables are useful for things other than that- I would certainly like this to be added.

This feels like a dupe.

Powered by DjangoBB