Pen Variable Watchers

Oh.

At least a single </span> endtag isn't that bad.

Apparently what we really need is the VALUE OF block of this:
Pen Variable Watchers script pic (9)
which returns the value of a variable name given to it. I need it for this:

Edit: It's in the Create Variables library:

I don't want to use JS.

I don't see how else to get a variable from a string, unless you want to completely remake variables in pure Snap!.

Edit: I'm actually going to go do exactly that.

Edit 2: And it's here.

For global i sprite local variable but not the script vars.
untitled script pic (77)

untitled script pic (78)

I didn't know that! Thank you!

Yes, it seems slightly under-dcoumented
OF
as the menu shows only the sprite local variables.

Pen Variable Watchers script pic (12)
I wonder what can get that.

If you need script vars You may experiment with
untitled script pic (79)
untitled script pic (80)
but I see no way to get the variable name from a single parameter in a vanilla snap.

I'm thinking of using the (scripts) block someone made, and getting the value of a script variable from it.

But "script builder library" is almost pure JS. So why not
varGetter script pic

varGetter script pic (1)

(a really long time later)

Now that Snap! 7 has come, I've edited my project to use the Create Variables library.

I tried this but it gave me an error

untitled script pic

You need to ask a sprite for it to work.

also errored

Remove the call block, and unringify the join block

Woah thats odd

image

With the call block, it doesn't put the variable into context, but when you ask a sprite for it, it puts it into context. I don't like it either, but it's just how it works. Here's a better explanation

(More info can be found by readingthrough that topic)