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

#1 2009-05-05 14:03:49

Magnie
Scratcher
Registered: 2007-12-12
Posts: 1000+

Multi Direction Scrolling (w/ Arrow keys) - Help

I want to know how to do multi direction with arrow keys not using "mouse down" type. (Multi direction as in every direction not just up, down, right, and left.)

Found out how from this project: http://scratch.mit.edu/projects/FoxDur/487526

Last edited by Magnie (2009-05-05 17:20:19)

Offline

 

#2 2009-05-05 15:53:10

bosox397
Scratcher
Registered: 2008-02-17
Posts: 1000+

Re: Multi Direction Scrolling (w/ Arrow keys) - Help

Well the script would be

<when green flag clicked>
<forever>
<if><key[  right arrow ]pressed?>
<change{  scrollx}by( -5
<if><key[  left arrow ]pressed?>
<change{  scrollx}by( 5
<if><key[  up arrow ]pressed?>
<change{  scrolly}by( -5
<if><key[  down arrow ]pressed?>
<change{  scrolly}by( 5

although it doesn't seem like it would work, it does!


Dear Scratch Users,
I'm done with scratch, or at least making projects. I have made one last big game, thats both fun and teaches a lesson about water. It'd mean a lot if you gave me feedback.                              http://scratch.mit.edu/projects/bosox397/569201

Offline

 

#3 2009-05-05 15:54:33

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

Re: Multi Direction Scrolling (w/ Arrow keys) - Help

try checking this out
http://scratch.mit.edu/projects/archtest/374330


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

 

#4 2009-05-05 16:27:56

Magnie
Scratcher
Registered: 2007-12-12
Posts: 1000+

Re: Multi Direction Scrolling (w/ Arrow keys) - Help

bosox397: I ment in all directions not just up down right and left.

Archmage: Same thing as I said to bosox397

Like if you turn 5 degrees then move forward the turn 5 degrees.

Offline

 

#5 2009-05-05 17:19:58

Magnie
Scratcher
Registered: 2007-12-12
Posts: 1000+

Re: Multi Direction Scrolling (w/ Arrow keys) - Help

Thanks to this project: http://scratch.mit.edu/projects/FoxDur/487526
I can do it! Thanks guys for trying to help!  smile

Offline

 

#6 2009-05-05 18:57:56

Zelda123
Scratcher
Registered: 2007-11-21
Posts: 1000+

Re: Multi Direction Scrolling (w/ Arrow keys) - Help

See this too:
http://scratch.mit.edu/projects/archmage/105910

Offline

 

#7 2009-05-05 19:14:18

Magnie
Scratcher
Registered: 2007-12-12
Posts: 1000+

Re: Multi Direction Scrolling (w/ Arrow keys) - Help

Cool.  smile

Offline

 

#8 2009-05-05 19:26:53

bosox397
Scratcher
Registered: 2008-02-17
Posts: 1000+

Re: Multi Direction Scrolling (w/ Arrow keys) - Help

welcome


Dear Scratch Users,
I'm done with scratch, or at least making projects. I have made one last big game, thats both fun and teaches a lesson about water. It'd mean a lot if you gave me feedback.                              http://scratch.mit.edu/projects/bosox397/569201

Offline

 

#9 2009-05-08 04:17:29

pokemon_master12
Scratcher
Registered: 2008-09-26
Posts: 100+

Re: Multi Direction Scrolling (w/ Arrow keys) - Help

Hmm... Difficult, but you would just have to change the sprite's x and y position at the same time when the arrow key is pressed. And you may have to put on your maths thinking cap!  big_smile


My Dragon Egg! http://dragcave.net/image/5YUA.gif
Visit my blog: http://freyasworld.wordpress.com/

Offline

 

#10 2009-05-08 06:45:40

bosox397
Scratcher
Registered: 2008-02-17
Posts: 1000+

Re: Multi Direction Scrolling (w/ Arrow keys) - Help

pokemon_master12 wrote:

Hmm... Difficult, but you would just have to change the sprite's x and y position at the same time when the arrow key is pressed. And you may have to put on your maths thinking cap!  big_smile

we already have the answer in a much better way. and that was my way anyway. i already suggested it


Dear Scratch Users,
I'm done with scratch, or at least making projects. I have made one last big game, thats both fun and teaches a lesson about water. It'd mean a lot if you gave me feedback.                              http://scratch.mit.edu/projects/bosox397/569201

Offline

 

Board footer