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

#1 2008-02-24 14:10:39

dearkids
Scratcher
Registered: 2008-01-15
Posts: 97

How can i do velocity? can someone make me a code?

Please tell me! Ive been trying forever!


Final Fantasy VII's best characters are Cloud, Nanaki, and Cid. Don't deny it.

Offline

 

#2 2008-02-24 14:13:52

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: How can i do velocity? can someone make me a code?

Check out the friction marble sprite that comes with scratch. Look in the things folder.


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#3 2008-02-24 18:44:58

dearkids
Scratcher
Registered: 2008-01-15
Posts: 97

Re: How can i do velocity? can someone make me a code?

What things folder?


Final Fantasy VII's best characters are Cloud, Nanaki, and Cid. Don't deny it.

Offline

 

#4 2008-02-24 19:57:08

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: How can i do velocity? can someone make me a code?

Go to Choose sprite from file->things->friction marble.

It's one of the many sprites that scratch comes with.


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#5 2008-02-24 21:19:45

infinex
Scratcher
Registered: 2007-07-12
Posts: 24

Re: How can i do velocity? can someone make me a code?

archmage's way works but there is another way.

create this block:

[blocks]
<when green flag clicked>
<forever>
<change x by( <{ x vel }> )>
<change y by( <{ y vel }> )>
[/blocks]

Then you can do something like:

[blocks]
<when green flag clicked>
<forever>
<if><key[ left arrow ]pressed?>
<change{ x vel  }by( -1)>
<if><key[ up arrow ]pressed?>
<change{ y vel }by( 1)>
[/blocks]


looking for a good racing game?  cool  http://scratch.mit.edu/projects/infinex/95995

Offline

 

#6 2008-02-25 07:30:09

EdnaC
Scratcher
Registered: 2007-08-28
Posts: 100+

Re: How can i do velocity? can someone make me a code?

There are lots of examples in:

http://scratch.mit.edu/galleries/view/9206

The Gravity to Games Gallery has examples from several different authors.  I also did some demos based on my jet airplane game.

-MrEd

Offline

 

#7 2008-02-25 18:03:29

dearkids
Scratcher
Registered: 2008-01-15
Posts: 97

Re: How can i do velocity? can someone make me a code?

archmage wrote:

Go to Choose sprite from file->things->friction marble.

It's one of the many sprites that scratch comes with.

I though you were talking about a game!


Final Fantasy VII's best characters are Cloud, Nanaki, and Cid. Don't deny it.

Offline

 

#8 2010-04-29 18:09:27

henley
Scratcher
Registered: 2008-06-21
Posts: 1000+

Re: How can i do velocity? can someone make me a code?

If this is still going on, I'm ending it with

How to Scroll


"I've worked so hard for you and you give me nothing in return. Do you need help... Or do I?"

Offline

 

Board footer