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

#1 2013-04-22 08:46:56

CapiG
New Scratcher
Registered: 2013-04-22
Posts: 2

Change Variable by one - NOT WORKING

Hello,
Can you please check my project : TOP CANON2

The up arrow should increase the speed by 1 (and it works on my PC), but once uploaded on the website, each press on the up arrow increases the speed by nearly a thousand !

WHY?

CapiG

Offline

 

#2 2013-04-22 09:49:50

7734f
Scratcher
Registered: 2010-12-23
Posts: 500+

Re: Change Variable by one - NOT WORKING

Ok, I think I found your problem.

Your script is like this:

forever
 if <key [up arrow v] pressed?>
  change [speed v] by [1]
 end
But your script needs to be like this:
forever
 if <key [up arrow v] pressed?>
  change [speed v] by [1]
  wait [0.1] secs//or whatever amount of time you want it to wait
 end
It needs to have a wait period, so it doesn't go up for every frame the up arrow is pushed.

Hope that helped!

With regards,
~7734f


http://internetometer.com/image/38992.png   http://i37.tinypic.com/2qixx6c.png

Offline

 

#3 2013-04-23 14:33:29

CapiG
New Scratcher
Registered: 2013-04-22
Posts: 2

Re: Change Variable by one - NOT WORKING

Thank you soooo much! Thanks to you I can finally post Top Canon2 on the site without it having a funny glitch!

Offline

 

#4 2013-04-23 18:29:11

7734f
Scratcher
Registered: 2010-12-23
Posts: 500+

Re: Change Variable by one - NOT WORKING

CapiG wrote:

Thank you soooo much! Thanks to you I can finally post Top Canon2 on the site without it having a funny glitch!

No problem  wink

With regards,
~7734f


http://internetometer.com/image/38992.png   http://i37.tinypic.com/2qixx6c.png

Offline

 

Board footer