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

#1 2011-08-11 00:05:41

4lover
Scratcher
Registered: 2010-04-24
Posts: 500+

2 questions

question1: how do you make a sprite move forever
question2: when a sprite reaches a wall how do you make it turn around (but not bounce)
please help me it would be greatly appreciated


Check out this awesome new zombie-cod type of game: http://scratch.mit.edu/projects/4lover/1975649

Offline

 

#2 2011-08-11 00:29:50

Thescratch3
Scratcher
Registered: 2011-06-14
Posts: 1000+

Re: 2 questions

Answer 0: Post this in All About Scratch.
Answer 1: This sort of concurs with answer 2. But here it is:
Sprite moving:
When Flag Clicked
Repeat until touching wall
point in direction 90
move whatever steps
End of Repeat Until
if touching wall
point in direction -90 (if the direction before is 90)

(you see where you type the sprite name at the top? There are three buttons.
Choose the middle one. So the direction will be only facing right or left and the -90 direction block will make it so it is still facing left but not flipped over.)


View my projects. Or face The scratch curse! (Get it?)
http://i56.tinypic.com/2cdk8hy.png

Offline

 

#3 2011-08-11 02:01:34

JJROCKER
Scratcher
Registered: 2010-09-06
Posts: 1000+

Re: 2 questions

1. Look in the controls pannel. It is pretty easy to find. Just look through the blocks. You'll find it.


http://www.blocks.scratchr.org/API.php?action=random&return=image&link1=http://img255.imageshack.us/img255/3491/signature1y.jpg&link2=http://img577.imageshack.us/img577/5272/signature1sx.jpg&link3=http://img4.imageshack.us/img4/8514/signature1et.jpg&link4=http://i.imgur.com/POEpQyZ.png&link5=http://img163.imageshack.us/img163/4640/jjrockerfinal.jpg

Offline

 

#4 2011-08-11 02:03:14

JJROCKER
Scratcher
Registered: 2010-09-06
Posts: 1000+

Re: 2 questions

Thescratch3 answered 2


http://www.blocks.scratchr.org/API.php?action=random&return=image&link1=http://img255.imageshack.us/img255/3491/signature1y.jpg&link2=http://img577.imageshack.us/img577/5272/signature1sx.jpg&link3=http://img4.imageshack.us/img4/8514/signature1et.jpg&link4=http://i.imgur.com/POEpQyZ.png&link5=http://img163.imageshack.us/img163/4640/jjrockerfinal.jpg

Offline

 

#5 2011-08-11 02:30:13

Flait7
Scratcher
Registered: 2008-04-14
Posts: 100+

Re: 2 questions

#1 use this block to continue something forever
<forever>
<end>
it's found in the control area.

#2 try
<if><touching[ wall ]>
<turn cw( 180 )degrees>
<end>


http://scratch.mit.edu/static/projects/Flait7/2248016_sm.pnghttp://scratch.mit.edu/static/projects/Flait7/1827934_sm.png

Offline

 

Board footer