I have been working on a project for two weeks. Well, yesterday I ran into a problem. My sprite is supposed to hide until a message is broadcasted to it, in which it shows and goes to a certain coordinate. Some variables are then set, like [blocks]<set{ lives }to(3)[/blocks] and [blocks]<set{ water }to(100)[/blocks]. Well, all the sprite does is "teleport" to the bottom of the screen. Even when I drag the sprite, it always sticks to the bottom. The coordinates in which it appears is well above the bottom of the screen, and I programmed it to have gravity. There is nothing wrong with the gravity. I first thoought it was the [blocks]<color[ ]is over[ ][/blocks] that was causing the problem, but even when I reprogram it, the sprite still teleports. Is it Scratch's fault, or did I make a mistake in my programming? :I
Offline
Edit: i first thought it was the [blocks]<touching color[red}[/blocks] that was causing the problem.
Offline
Hmmm... you say that the sprite wants to stay there, even if you drag it? This looks like there's a forever block that constantly sets the x and y position to that spot.
Offline
No!!! the script is like this:
[blocks] <when I receive[ letsago
<wait( 5 )secsc>
<show>
<switch to costume[ 1
<go to x
-210 )y
-80
<set{ Lives }to( 3
<set{ Water }to( 100
<forever>
<if><touching color[ gray
...
Offline
That's helpful, thanks!
Maybe the broadcast is continuously being broadcasted? That would cause the sticking effect also.
Last edited by Jonathanpb (2009-12-16 02:18:43)
Offline
I already fixed the problem. But thanks!
Offline
Yay, it's fixed!
Offline