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

#1 2007-07-12 14:17:06

TheMudFairy
Scratcher
Registered: 2007-07-12
Posts: 2

Movement

I have a problematic sprite (the "fiish").
I say it is to do with movement - it is worse when it is "standing" still.
Here is the code:

When (flag) clicked:
go to mouse pointer
forever
>if touching sprite2
>>change lives by -1
>>wait 2 secs
>>go to mouse pointer
>else
>>move 8 steps
>>point towards mouse pointer
>
=============================

When (flag) clicked:
set lives to 20
forever if touching mouse pointer
>move 0 steps
==============================

Those are the only movement-related code.
It doesn't rotate at all.

The problem is it is all jerky and when I stop moving the mouse, I just want

Offline

 

#2 2007-07-12 14:52:40

kevin_karplus
Scratcher
Registered: 2007-04-27
Posts: 1000+

Re: Movement

You have conflicting move instructions in the two scripts.  what is the purpose of the
forever if touching mouse pointer
>move 0 steps
?

Try eliminating that and seeing how it behaves.

Offline

 

Board footer