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

#1 2010-05-29 16:56:49

meew0
Scratcher
Registered: 2010-02-22
Posts: 1000+

Laser doesn't work right

http://scratch.mit.edu/projects/Porygon-Z/1083932

The laser and the machine should turn simultaneously.
But if you let them turn for a while, you'll see that the machine turns faster...
What's wrong?


http://i.imgur.com/mJV3j.pnghttp://i.imgur.com/HwWAX.pnghttp://i.imgur.com/sZ7Ui.pnghttp://i.imgur.com/0y6yh.pnghttp://i.imgur.com/nOC4l.png

Offline

 

#2 2010-05-29 17:41:18

coolstuff
Community Moderator
Registered: 2008-03-06
Posts: 1000+

Re: Laser doesn't work right

I see what happened there - you've got more blocks on the script for your laser sprite than that of your machine. The laser sprite has to do more each time it runs through the script, so it turns a little bit less often than the machine. A way to fix this would be to put the "if...else" blocks in a seperate script. Or you could always get them to point in the same direction:

Code:

// On the laser sprite:
point in direction ([direction] of [machine])
// Keep the machine sprite the same

Offline

 

#3 2010-05-30 01:51:30

meew0
Scratcher
Registered: 2010-02-22
Posts: 1000+

Re: Laser doesn't work right

Ah, thanks!


http://i.imgur.com/mJV3j.pnghttp://i.imgur.com/HwWAX.pnghttp://i.imgur.com/sZ7Ui.pnghttp://i.imgur.com/0y6yh.pnghttp://i.imgur.com/nOC4l.png

Offline

 

#4 2010-05-30 09:32:15

coolstuff
Community Moderator
Registered: 2008-03-06
Posts: 1000+

Re: Laser doesn't work right

meew0 wrote:

Ah, thanks!

No problemo! Always here to help  big_smile

Offline

 

Board footer