does someone mind giving me some code to replicate the BYOB attribute block?
What does the option 'synchronous' mean?
And what kind of data does 'rotation style' report?
I have no idea. (I do know the rest though)
I feel there's some JS code to do it.
rotation style = my rotation style, but I want to make this block to serve many purposes.
You want the MY block, in Sensing.
Synchronous? is the opposite of what's now called
There are a few other things in the old
attribute block that have their own getters and setters. For example,
hidden? isn't needed because there's a
shown? block in Looks. There are explanations for all the options in the Reference Manual.
I am making this block because: I like having one block to do multiple things, and making it a primitive doesn't make sense. 2. I like the block and it is cool
Umm, okay, knock yourself out. You might want to look up the implementation of MY in the Snap! source code for ideas.
I made the block
It's not an exact replica, but it has pretty much everything the original does.
I means whether your sprite points in it's direction, only left of right, or don't rotate at all. It's taken from Scratch.
The rotation style is. Not that you can report it.
no, changing the rotation style with code was in scratch 2, BYOB is a 1.4 mod.
No, I know what rotation style is. I mean, does it report a number or a text?.
scratch can't report the rotation style, but snap can. Snap reports a number, 0 for no-rotate, 1 for left-right, and 2 for all-around.
That was a long time ago. Snap! does not share code with Scratch, much as we love them.
I'm a big believer in Eisenberg's Law, which says "anything you can do from the user interface, you should be able to do in code, and vice versa." This applies not only to programming languages such as Snap!, but also to extensible utilities, such as Emacs, which has a Lisp interpreter inside it. So, pretty much from the beginning I've been pushing for getters and setters for everything. (See the Getters/Setters library.) I'm gradually wearing down Jens's resistance about this. :~) We haven't really addressed the "vice versa" part, but someday I want the ability to add menus and widgets to the toolbar.
It reports a number.
1 for all around.
2 for left-right.
0 for no rotation.
volume is in the code twice
No it isnt???
Edit: Oh you meant the code in the block. Yeah ill fix that hang on
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.