Discuss Scratch

mathsboy314
Scratcher
9 posts

Have an "onChange()" function

As an addition to the “Data” blocks, or even the “Event” blocks, an onChange function.
This would be good for projects where there is a slider variable.
It would probably be best as a ‘hat’ block.

(There is already a way to do this, but unconventional: )
when green flag clicked
forever
wait until <not <(Main variable) = (Extra variable)>>
set [Extra variable] to (Main variable)
broadcast [onChange]
end

Last edited by mathsboy314 (Jan. 28, 2014 21:15:23)

AonymousProfessor
Scratcher
100+ posts

Have an "onChange()" function

mathsboy314 wrote:

As an addition to the “Data” blocks, or even the “Event” blocks, an onChange function.
You mean like a real programming “event”?

Interesting idea…

Only problem is it could be a bit confusing for New Scratchers.

Also, in your workaround script, instead of broadcasting something, just run the script there. (If it only requires a linear script )

I am @AonymousGuy's test account!

The word “test” in test accounts is outdated. That is why mine has professor instead!

Thanks @MicroMacro for the profile image!
Sonickyle
Scratcher
1000+ posts

Have an "onChange()" function

Support.

No I don't make projects anymore. I left some time ago.
I only check the forums every now and then, but other than that consider me retired.
scratchisthebest
Scratcher
1000+ posts

Have an "onChange()" function

So, something like this?



Good idea

I am a Lava Expert
mathsboy314
Scratcher
9 posts

Have an "onChange()" function

scratchisthebest wrote:

So, something like this?

Yeah, pretty much.
(Maybe in orange)
Mickey_Fan
Scratcher
100+ posts

Have an "onChange()" function

support

Powered by DjangoBB