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

#1 2010-09-03 12:32:18

legomany3448
Scratcher
Registered: 2010-08-30
Posts: 36

Making things move

I want to talk about how to make stuff move.  I know that that sounds silly, but it is difficult to make moving backgrounds and such.  It can also be difficult to have a sprite rebound off of a certain color.  If you have any suggestions, you can post them here.


¿uʍop-ǝpısdn pɐǝɹ noʎ uɐɔ
Click here to get EPIC custom blocks on Scratch!

Offline

 

#2 2010-09-03 12:37:44

DistantVisit
Scratcher
Registered: 2010-07-29
Posts: 100+

Re: Making things move

legomany3448 wrote:

I want to talk about how to make stuff move.  I know that that sounds silly, but it is difficult to make moving backgrounds and such.  It can also be difficult to have a sprite rebound off of a certain color.  If you have any suggestions, you can post them here.

Hello legomany3448!  smile

If you want to make a scrolling platformer game, if I correctly understood what you are trying to say, I suggest you check out this project by archmage that will teach you everything you need.

Link: http://scratch.mit.edu/projects/archmage/76150

It's not silly to ask questions when you are new too Scratch, so feel free to ask any questions when you need help.

Welcome to Scratch, and Scratch on!

Offline

 

#3 2010-09-03 12:47:42

legomany3448
Scratcher
Registered: 2010-08-30
Posts: 36

Re: Making things move

That's realy cool, but it's not what I meant.  I'm trying to make a maze game where I have a little black dot that travels through a maze.  I'm using a dark gray as the walls.  I'm trying to figure out how not to let the black dot go through the walls.  But yes, other people may apreciate that post seeing as this is a fourm about sprites moving in general.

[blocks]<when green flag clicked><say[Thanks though!]>[/blocks]


¿uʍop-ǝpısdn pɐǝɹ noʎ uɐɔ
Click here to get EPIC custom blocks on Scratch!

Offline

 

#4 2010-09-03 13:03:21

militarydudes
Scratcher
Registered: 2008-09-12
Posts: 1000+

Re: Making things move

try this:
<when[ right arrow ]key pressed>
<point in direction( 90
<repeat until><<  <not>  >><key[ right arrow ]pressed?> <move( 3 )steps>

then duplicate this script, and change the direction and arrow key blocks to left arrow, up arrow, and down arrow. Get it? Hope I helped!  smile

Last edited by militarydudes (2010-09-03 13:06:29)


__m. .m__ KILROY WAS HERE
        U

Offline

 

#5 2010-09-03 13:04:46

DistantVisit
Scratcher
Registered: 2010-07-29
Posts: 100+

Re: Making things move

legomany3448 wrote:

That's realy cool, but it's not what I meant.  I'm trying to make a maze game where I have a little black dot that travels through a maze.  I'm using a dark gray as the walls.  I'm trying to figure out how not to let the black dot go through the walls.  But yes, other people may apreciate that post seeing as this is a fourm about sprites moving in general.

[blocks]<when green flag clicked><say[Thanks though!]>[/blocks]

I knew I would misunderstand what you were saying so I warned you on my original post. I'll give you the scripts now that I know what you mean.

Black dot (Your Player):
[blocks]
<when green flag clicked>
<if<key[ Down Arrow ]pressed?>>
<change y by(-10
[/blocks]
This is the script to help your black dot move. You would have to repeat this same script four times in order to make it move up, down, left, and right and also change the y position to correspond with the direction you are moving into.

Black dot (Your Player):
[blocks]
<when green flag clicked>
<forever if <touching color[(Color of walls) >
<broadcast[ You lose!
[/blocks]

This is the script that would be used to prevent the player from touching the walls and being able to get away with it.  tongue

Here's a good example of a maze that you can use too:
http://scratch.mit.edu/projects/Alex13/507

Have fun with your project and Scratch on!  smile

Offline

 

#6 2010-09-03 13:10:02

militarydudes
Scratcher
Registered: 2008-09-12
Posts: 1000+

Re: Making things move

DistantVisit wrote:

legomany3448 wrote:

That's realy cool, but it's not what I meant.  I'm trying to make a maze game where I have a little black dot that travels through a maze.  I'm using a dark gray as the walls.  I'm trying to figure out how not to let the black dot go through the walls.  But yes, other people may apreciate that post seeing as this is a fourm about sprites moving in general.

[blocks]<when green flag clicked><say[Thanks though!]>[/blocks]

Black dot (Your Player):
[blocks]
<when green flag clicked>
<forever if <touching color[(Color of walls) >
<broadcast[ You lose!
[/blocks]

Let me add on to that. when you brodcast you lose, put this on a sprite that says "You Lose!":

<when green flag clicked>
<hide>

<when I receive[ you lose! ]
<show>
<stop all>


__m. .m__ KILROY WAS HERE
        U

Offline

 

#7 2010-09-03 13:35:10

legomany3448
Scratcher
Registered: 2010-08-30
Posts: 36

Re: Making things move

Good.  I like your idea distantvisit, but I think we should modify it to:
[blocks]<when[rightarrow]key pressed>
<point in direction(90)
<repeat until><<<<  <not><key[right arrow]pressed?>>><or><touching color[ >>
<move(3)steps>
<end>[/blocks]


¿uʍop-ǝpısdn pɐǝɹ noʎ uɐɔ
Click here to get EPIC custom blocks on Scratch!

Offline

 

#8 2010-09-03 13:57:27

legomany3448
Scratcher
Registered: 2010-08-30
Posts: 36

Re: Making things move

I just tried.  It didn't work.  Luckily, I have other resourses...
[blocks]
<when green flag clicked>
<say[  smile  ]>
[/blocks]


¿uʍop-ǝpısdn pɐǝɹ noʎ uɐɔ
Click here to get EPIC custom blocks on Scratch!

Offline

 

#9 2010-09-03 13:57:52

militarydudes
Scratcher
Registered: 2008-09-12
Posts: 1000+

Re: Making things move

legomany3448 wrote:

Good.  I like your idea distantvisit, but I think we should modify it to:
[blocks]<when[rightarrow]key pressed>
<point in direction(90)
<repeat until><<<<  <not><key[right arrow]pressed?>>><or><touching color[ >>
<move(3)steps>
<end>[/blocks]

why didn't I think of that!?  tongue  It seems you figured it out for yourself  big_smile


__m. .m__ KILROY WAS HERE
        U

Offline

 

#10 2010-09-03 17:54:15

FlexiStudio
Scratcher
Registered: 2010-02-28
Posts: 1000+

Re: Making things move

It seems everything about your question has been answered here  smile
Never be afraid to ask questions that may sound 'silly'.
Just remember, we are all still learning and asking the more expirenced users is a top tip!  smile


Hey I'm back!-
FlexiStudio

Offline

 

#11 2010-09-06 16:51:42

legomany3448
Scratcher
Registered: 2010-08-30
Posts: 36

Re: Making things move

I realy didn't post this fourm for me.  It was just that I was having a problem so I figured that other people would also apreciate it.  I probably won't be checking this any more so that other people could post their problems with moving on here.  I did this more for the help of other people not me.  But if I do have another question about moving then i probably will come back here.  Hope you have fun!
[blocks]
<when green flag clicked>
<say[ Have fun!
<forever>
<say[ Have fun!
<end>


¿uʍop-ǝpısdn pɐǝɹ noʎ uɐɔ
Click here to get EPIC custom blocks on Scratch!

Offline

 

#12 2010-09-07 13:11:40

soraroxas11
Scratcher
Registered: 2010-03-24
Posts: 1

Re: Making things move

how do you make stuff go left? i did the right thing accept left but i went upside down

Offline

 

#13 2010-09-09 12:00:49

The_Dancing_Donut
Scratcher
Registered: 2010-08-03
Posts: 1000+

Re: Making things move

soraroxas11 wrote:

how do you make stuff go left? i did the right thing accept left but i went upside down

Ok, click on your sprite.
Now on the stage, at the top next to the mini pic of the sprite, you'll see 3 boxes: 2 have arrows in them, one has a square.
Click on the one which says 'don't rotate' when you hover over it with your mouse.
Now try again... tongue

Hope I helped  smile


Offending strangers since 2010.

Offline

 

#14 2010-10-28 16:54:15

legomany3448
Scratcher
Registered: 2010-08-30
Posts: 36

Re: Making things move

soraroxas11 wrote:

how do you make stuff go left? i did the right thing accept left but i went upside down

Good question...Right above the area in the left of the screen where the little tabs that say scripts, costumes, and sounds, there are three icons: one of them shows a full arrow sort of circle, another one shows a line that goes from left to right, an another one just shows a sprite sitting there doing nothing.  Click on the circle to make your sprite be able to turn upsidedown.  Click the line to make your sprite only face left and right.  Click the still dot to make a sprite not rotate at all.  Unfortunately, you cannot tell a sprite to change this durring programming.  (Note: When telling your sprite to not rotate or to only face left and right, it will still go up if you tell it to go up, it just won't show that it is pointing upwards unless you tell Scratch to show that sprite's direction. 
[blocks]
(If you DO wish to show a sprite's          direction on the screen on the website, in

presentation mode, and in programming mode, then click on the little box next to <direction> where you drag blocks from to show that sprite's direction.  It will show up as a variable on the screen, only it will be blue because that is the color for motion.  You can use this trick with other values too, like the <volume> in sound or even a predicate like        <mouse down?> from sensing.)
[blocks]
Good luck!   wink  <-- this is you (hopefully)


¿uʍop-ǝpısdn pɐǝɹ noʎ uɐɔ
Click here to get EPIC custom blocks on Scratch!

Offline

 

#15 2010-10-30 17:55:07

Soaringscorer
New Scratcher
Registered: 2010-10-30
Posts: 3

Re: Making things move

I'm new to scratch to but I may know what you meant but you can use<repeat until> then use <forever>if touching color dark gray move o step and point in direction of mouse to get the dot to continue moving. Or you could make the walls a sprite themselves and make them react using sensing. I hope your game turns out good.

Offline

 

Board footer