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

#1 2008-07-15 22:36:49

stuntman021
Scratcher
Registered: 2008-07-15
Posts: 8

Smooth movement?

I am currently making a game. When I first hold down the right or left key, the character goes that direction once, then starts going. How do I eliminate this delay?

Offline

 

#2 2008-07-15 22:47:25

keroro645
Scratcher
Registered: 2008-06-07
Posts: 1000+

Re: Smooth movement?

<when green flag clicked>
<forever>
<if><key[ right arrowkey ]pressed?>
<move( the # u need )steps>
<end>

Last edited by keroro645 (2008-07-15 22:47:43)

Offline

 

#3 2008-07-15 22:48:09

stuntman021
Scratcher
Registered: 2008-07-15
Posts: 8

Re: Smooth movement?

Thanks.

Offline

 

#4 2008-07-15 22:49:34

joeyman
Scratcher
Registered: 2008-03-28
Posts: 1000+

Re: Smooth movement?

Here's how:

When Green flag clicked:
forever
------------------
if key left arrow pressed
change x by 3
----------------
if key right arrow pressed
change x by -3
-------------------
if key up arrow pressed
change y by 3
------------------
if key down arrow pressed
change y by -3
-end-

This is more accurate.  smile

Last edited by joeyman (2008-07-15 22:50:30)


Joeyman: On Scratch since March 28, 2008.
Over 142 projects! (And recently a Brony, and PROUD of it!)

Offline

 

#5 2008-07-16 12:07:01

shadow_and_sonic
Scratcher
Registered: 2008-07-14
Posts: 36

Re: Smooth movement?

joeyman wrote:

Here's how:

When Green flag clicked:
forever
------------------
if key left arrow pressed
change x by 3
----------------
if key right arrow pressed
change x by -3
-------------------
if key up arrow pressed
change y by 3
------------------
if key down arrow pressed
change y by -3
-end-

This is more accurate.  smile

What is the all about?

Offline

 

#6 2008-07-16 12:09:35

shadow_and_sonic
Scratcher
Registered: 2008-07-14
Posts: 36

Re: Smooth movement?

<say[abuser]for( 80 )secs> now ok
_____________________________
This distance aint far princess: by comic book sonic

Last edited by shadow_and_sonic (2008-07-16 12:12:27)

Offline

 

#7 2008-07-16 12:20:58

joeyman
Scratcher
Registered: 2008-03-28
Posts: 1000+

Re: Smooth movement?

it's the script for smooth movement. I didn't want to waste time and effort into images.


Joeyman: On Scratch since March 28, 2008.
Over 142 projects! (And recently a Brony, and PROUD of it!)

Offline

 

#8 2008-07-16 12:50:02

keroro645
Scratcher
Registered: 2008-06-07
Posts: 1000+

Re: Smooth movement?

joeyman wrote:

Here's how:

When Green flag clicked:
forever
------------------
if key left arrow pressed
change x by 3
----------------
if key right arrow pressed
change x by -3
-------------------
if key up arrow pressed
change y by 3
------------------
if key down arrow pressed
change y by -3
-end-

This is more accurate.  smile

I never thought of using the x and y thing.
That might really help me someday.

Offline

 

#9 2008-07-16 13:00:25

joeyman
Scratcher
Registered: 2008-03-28
Posts: 1000+

Re: Smooth movement?

Yeah, if you want to make him move, but NOT point where he goes, you use this... Glad I could help!


Joeyman: On Scratch since March 28, 2008.
Over 142 projects! (And recently a Brony, and PROUD of it!)

Offline

 

Board footer