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

#1 2012-06-20 18:20:56

purplepickle
New Scratcher
Registered: 2012-04-14
Posts: 6

A few questions

When the background stops scrolling i want a certain sprite to appear. when that sprite appears i want another sprite to change costume and for both sprites to start jumping (using gravity) in a quicker succession. when they jump (using gravity) i want the back ground to start scrolling in the other direction.

Offline

 

#2 2012-06-20 18:37:08

skippito
Scratcher
Registered: 2012-03-17
Posts: 100+

Re: A few questions

Put this at the end of the background script:

set [Appear v] to [Now]
Put this at the beginning of the background script:

set [Appear v] to [Not Now]
Put this in the sprite you want to appear:

when gf clicked
wait until <(Appear) = [Now]>
show
set [Gravity v] to [0]
repeat [however long you want it to repeat]
  if <touching color [color of ground]>
    set [Gravity v] to [0]
    change y by [1]
    set [Gravity v] to [the larger this number is, the higher your sprite will jump]
  else
    change [Gravity v] by [-1]
    change y by (Gravity)
  end
end
Put this in the sprite you want to change costumes:

when gf clicked
wait until <(Appear) = [Now]>
switch to costume [whatever costume you want it to switch to]
As for the faster jumping, just decrease the height you want the sprites to jump to.

Offline

 

Board footer