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

#1 2009-12-15 14:55:17

masterhand7
Scratcher
Registered: 2009-10-05
Posts: 100+

Teleporting Sprite Bug?!!

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


Click here to see the first iPhone virus!
http://www.danasoft.com/sig/MASTERHAND7PWNZ.jpg

Offline

 

#2 2009-12-15 14:57:15

masterhand7
Scratcher
Registered: 2009-10-05
Posts: 100+

Re: Teleporting Sprite Bug?!!

Edit: i first thought it was the [blocks]<touching color[red}[/blocks] that was causing the problem.


Click here to see the first iPhone virus!
http://www.danasoft.com/sig/MASTERHAND7PWNZ.jpg

Offline

 

#3 2009-12-15 15:28:04

Jonathanpb
Scratcher
Registered: 2008-07-25
Posts: 1000+

Re: Teleporting Sprite Bug?!!

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.


"Human beings... must have action; and they will make it if they cannot find it.
-Charlotte Brontë

Offline

 

#4 2009-12-15 22:45:59

masterhand7
Scratcher
Registered: 2009-10-05
Posts: 100+

Re: Teleporting Sprite Bug?!!

No!!! the script is like this:
[blocks] <when I receive[ letsago
<wait( 5 )secsc>
<show>
<switch to costume[ 1
<go to x sad  -210 )y sad -80
<set{ Lives }to( 3
<set{ Water }to( 100
<forever>
<if><touching color[ gray
...


Click here to see the first iPhone virus!
http://www.danasoft.com/sig/MASTERHAND7PWNZ.jpg

Offline

 

#5 2009-12-16 02:18:08

Jonathanpb
Scratcher
Registered: 2008-07-25
Posts: 1000+

Re: Teleporting Sprite Bug?!!

That's helpful, thanks!  smile

Maybe the broadcast is continuously being broadcasted? That would cause the sticking effect also.

Last edited by Jonathanpb (2009-12-16 02:18:43)


"Human beings... must have action; and they will make it if they cannot find it.
-Charlotte Brontë

Offline

 

#6 2009-12-16 02:31:02

masterhand7
Scratcher
Registered: 2009-10-05
Posts: 100+

Re: Teleporting Sprite Bug?!!

I already fixed the problem. But thanks!


Click here to see the first iPhone virus!
http://www.danasoft.com/sig/MASTERHAND7PWNZ.jpg

Offline

 

#7 2009-12-16 04:02:52

Jonathanpb
Scratcher
Registered: 2008-07-25
Posts: 1000+

Re: Teleporting Sprite Bug?!!

Yay, it's fixed!  big_smile


"Human beings... must have action; and they will make it if they cannot find it.
-Charlotte Brontë

Offline

 

Board footer