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

#1 2012-02-05 19:37:15

imnotbob
Scratcher
Registered: 2010-12-11
Posts: 1000+

How to make sprites fly up?

For my design studio project


PesterChum Handle: annoyingAnchorman
durp yo terezi sup sup gotta beat john gotta beat john

Offline

 

#2 2012-02-05 20:16:50

MoreGamesNow
Scratcher
Registered: 2009-10-12
Posts: 1000+

Re: How to make sprites fly up?

I'm not sure what you're asking.  Do you want to know how to make sprites go up if the up-arrow is pressed, but to still have a gravitational pull acting on them?

when gf clicked
forever
if <key [up arrow] pressed?>
change [y-velocity] by (0.2)
else
change [y-velocity] by (-0.2)
end
change y by (y-velocity)
end
Of course, that doesn't take into account hitting walls and the ground.  But that's the basic script.

Last edited by MoreGamesNow (2012-02-05 20:17:27)


http://images2.layoutsparks.com/1/218929/rubiks-cube-animated-rotating.gif
"Cogito ergo sum" --  I think, therefore I am

Offline

 

#3 2012-02-06 11:04:33

RedRocker227
Scratcher
Registered: 2011-10-26
Posts: 1000+

Re: How to make sprites fly up?

Can you explain a bit more please?


Why

Offline

 

#4 2012-02-06 22:07:01

CatPerson
Scratcher
Registered: 2011-12-17
Posts: 1000+

Re: How to make sprites fly up?

you change the y position as it shows in looks  smile


http://nyopoliticker.files.wordpress.com/2012/02/in_dog_we_trust_rusty.jpghttps://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcSrxH2RAmte9adghivuoOhgklIlUcZUFuCAA0wFufFq-NWyZWg5http://www.buttonsonline.com/2012/obama/BO-rallysign-104.gif

Offline

 

Board footer