I dont know what version of scratch it was but the one i first used had a function which allowed you to change costume but a certain number, (even negative numbers). That was often very useful. I know there is a 'next costume' button but this cannot change the costume by - for example - 2. it may just be a small thing but it could often be very useful.
Offline
Hi, BigB.
I know it was a useful feature, but it confused some beginners so we removed it.
However, there is a way to achieve the same effect. First, you'll need to create a variable to hold the costume index. Then, you can use two blocks to simulate "change costume by n":
change costumeIndex by n
switch to costume costumeIndex
The non-obvious trick is that the argument of "switch to costume" can take a number block even though it doesn't look like it.
-- John
Last edited by johnm (2007-06-21 09:15:05)
Offline
I agree with calculus, all sorts of state should be available:
x, y, z (or layer if they don't implement a good depth model)
costume number, brightness, color effect, whirl effect, ghost effect, ...
mouse x, mouse y, mouse down
These state variables should appear on the variables pane, rather than being scattered all over the various panes.
Offline
How about access to state of other objects/sprites? I cannot find a clean way to do this (short of global variables), and, for the kind of projects I have been doing, quite frequently want one sprites behaviors to depend on some state of another sprite.
Thoughts?
Offline
Yes, I've often thought is would be useful to have access (perhaps read-only) to other sprite's variables. There is a format for it already in the variable displays: "sprite1's var"
But the variable pane is already terribly cluttered. Perhaps we need to make "set" and "change" have pulldown menus (or allow dropping a variable into the "set" slot) so that only the variables themselves need to be on the pane.
Offline
kevin_karplus wrote:
...allow dropping a variable into the "set" slot.
Along these lines, I think
get <sprite>'s <var>
would work nicely, with both <sprite> and <var> selectable drop-down slots.
Offline