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

#1 2008-12-06 18:03:09

andy321
Scratcher
Registered: 2008-08-06
Posts: 53

scrolling velocity and how to mix it in with sensor sprites

i know how to scroll, but can't make a scrolling game yet because i don't know how to do velocity or sensor sprites. any help?

Offline

 

#2 2008-12-06 18:19:18

bhz
Scratcher
Registered: 2008-07-06
Posts: 100+

Re: scrolling velocity and how to mix it in with sensor sprites

Does it have gravity and jumping? or is it top down?

Jumping: http://scratch.mit.edu/projects/archmage/101212
Top down: import the friction marble sprite

Offline

 

#3 2008-12-06 18:27:37

andy321
Scratcher
Registered: 2008-08-06
Posts: 53

Re: scrolling velocity and how to mix it in with sensor sprites

by velocity i meant scrolling velocity. i know how to do graity already.

Offline

 

#4 2008-12-06 18:31:36

bhz
Scratcher
Registered: 2008-07-06
Posts: 100+

Re: scrolling velocity and how to mix it in with sensor sprites

So instead of <change x by( <{ x vel }> [/blocks]
or <change y by( <{ y vel }> [/blocks]
simply put <change{ scroll x }by( <{ x vel }> [/blocks]
and <change{ scroll y }by( <{ y vel }> [/blocks]

BTW, sensing is already covered in the project I linked you for jumping.

Last edited by bhz (2008-12-06 18:32:42)

Offline

 

#5 2008-12-07 12:45:36

andy321
Scratcher
Registered: 2008-08-06
Posts: 53

Re: scrolling velocity and how to mix it in with sensor sprites

<when green flag clicked><forever><if><key[right arrow]pressed?><repeat until><(<{x velocity}>  <=> 10)><change{ x velocity }by( 0.1 the problem is it keeps changing the velocity and doesn't stop.

Offline

 

Board footer