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

#1 2012-04-20 15:56:48

k4den
Scratcher
Registered: 2012-01-25
Posts: 9

direction help!

how do you make a sprite turn and stop at a certain degree with this script?:

when gf clicked
forever
  if (key [left arrow v] pressed?)
    change x by (10)
end

Offline

 

#2 2012-04-20 17:37:52

SOScratch
Scratcher
Registered: 2010-02-01
Posts: 100+

Re: direction help!

You would have to make a script like this:

when gf clicked
repeat until <(direction) = [enter the degrees of direction you want here]>
wait until <key [left arrow v] pressed?>
turn left (15) degrees //change the degrees to whatever you want
wait until <not <key [left arrow v] pressed?> >
end
This should work.
Just ask if anything in this script doesn't work.

Last edited by SOScratch (2012-04-20 17:38:15)


-SOScratch
Scratch On!

Offline

 

#3 2012-04-20 20:11:36

k4den
Scratcher
Registered: 2012-01-25
Posts: 9

Re: direction help!

SOScratch wrote:

You would have to make a script like this:

when gf clicked
repeat until <(direction) = [enter the degrees of direction you want here]>
wait until <key [left arrow v] pressed?>
turn left (15) degrees //change the degrees to whatever you want
wait until <not <key [left arrow v] pressed?> >
end
This should work.
Just ask if anything in this script doesn't work.

how do I do that and move too?

Offline

 

#4 2012-04-20 20:13:05

k4den
Scratcher
Registered: 2012-01-25
Posts: 9

Re: direction help!

k4den wrote:

SOScratch wrote:

You would have to make a script like this:

when gf clicked
repeat until <(direction) = [enter the degrees of direction you want here]>
wait until <key [left arrow v] pressed?>
turn left (15) degrees //change the degrees to whatever you want
wait until <not <key [left arrow v] pressed?> >
end
This should work.
Just ask if anything in this script doesn't work.

how do I do that and move too?

and it does absolutely NOTHING.

Offline

 

#5 2012-04-20 20:21:22

Greenatic
Scratcher
Registered: 2009-05-03
Posts: 1000+

Re: direction help!

k4den wrote:

k4den wrote:

SOScratch wrote:

You would have to make a script like this:

when gf clicked
repeat until <(direction) = [enter the degrees of direction you want here]>
wait until <key [left arrow v] pressed?>
turn left (15) degrees //change the degrees to whatever you want
wait until <not <key [left arrow v] pressed?> >
end
This should work.
Just ask if anything in this script doesn't work.

how do I do that and move too?

and it does absolutely NOTHING.

Use turn 1 degrees, and it should work.

Offline

 

Board footer