I have a simple script that has a sprite follow the mouse, then should continously stamp if the mouse button is down. It looks like this:
When [green flag] clicked
Clear
Forever
Go to Mouse X, Mouse Y
If Mouse Down
Stamp
End
End
I would expect this to create trails of my sprite on the stage if I click and drag the mouse. However, this only seems to work some of the time. It seems like if I'm already moving the mouse when I click the mouse button it works as expected.
However, if I'm not moving the mouse or only moving it a little, it stamps once or twice but then stops. If I step through it looks like everything just pauses shortly after I click the mouse button unless I was already moving the mouse, then it works as expected. As soon as I release the mouse button it continues processing.
This is in Scratch 1.1 in Windows. Any ideas?
Thanks,
Josh
Offline
Hi, Josh.
I suspect what's happening is that you are actually picking up the sprite and dragging it. When you are dragging a sprite, it's scripts don't run. Your script should work the way you expect in presentation mode and in the Java player.
-- John
Last edited by johnm (2007-05-18 18:50:50)
Offline
John,
Thanks, that was it. It would be nice if it didn't drag when scripts were running or if there were a way to turn it off. Presentation mode is really ugly since everything gets blown up.
Anyway, thanks a lot for the heads up.
Josh
Last edited by weissjd (2007-05-19 07:23:29)
Offline