This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2007-06-21 05:03:07

bigB
Scratcher
Registered: 2007-06-09
Posts: 100+

please bring back the 'change costume by' function

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.


http://scratch.mit.edu/projects/bigB/260981 Draw to Text
http://scratch.mit.edu/projects/bigB/181829 3D Stunt Flyer

Offline

 

#2 2007-06-21 09:14:20

johnm
Scratcher
Registered: 2007-03-08
Posts: 100+

Re: please bring back the 'change costume by' function

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

 

#3 2007-06-21 09:50:05

bigB
Scratcher
Registered: 2007-06-09
Posts: 100+

Re: please bring back the 'change costume by' function

thankyou however it is a longer way


http://scratch.mit.edu/projects/bigB/260981 Draw to Text
http://scratch.mit.edu/projects/bigB/181829 3D Stunt Flyer

Offline

 

#4 2007-07-08 12:23:28

calculus
Scratcher
Registered: 2007-04-27
Posts: 6

Re: please bring back the 'change costume by' function

Another way to do it would be for Scratch to introduce a  "costume" variable,
which would simplify it to one line:

switch to costume [costume + "n"]

Offline

 

#5 2007-07-08 17:22:09

kevin_karplus
Scratcher
Registered: 2007-04-27
Posts: 1000+

Re: please bring back the 'change costume by' function

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

 

#6 2007-07-08 20:46:27

itsme213
Scratcher
Registered: 2007-07-08
Posts: 38

Re: please bring back the 'change costume by' function

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

 

#7 2007-07-08 22:36:47

kevin_karplus
Scratcher
Registered: 2007-04-27
Posts: 1000+

Re: please bring back the 'change costume by' function

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

 

#8 2007-07-13 00:59:00

itsme213
Scratcher
Registered: 2007-07-08
Posts: 38

Re: please bring back the 'change costume by' function

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

 

Board footer