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

#1 2008-12-21 23:02:54

ferret10
Scratcher
Registered: 2008-04-21
Posts: 58

Sprite won't follow scripts

Sometimes a sprite absolutely does not do what the script says.  I check and double-check to see if another script is preventing the script from being followed, and it all checks out.  Is there a reason the sprite won't perform the script?


A must-see animation about the Scratch cat! http://scratch.mit.edu/projects/ferret10/364723 ¡uʍopǝpısdn ǝdʎʇ uɐɔ ı

Offline

 

#2 2008-12-22 00:55:47

hmnwilson
Scratcher
Registered: 2007-07-04
Posts: 1000+

Re: Sprite won't follow scripts

Could you share the project you're having trouble with?


I'm taking a break from Scratch until 2.0 comes out. Any messages sent between then and now probably won't be read - sorry.
(Oct. 20, 2011)

Offline

 

#3 2008-12-25 18:36:21

pipchirisu
Scratcher
Registered: 2008-09-10
Posts: 4

Re: Sprite won't follow scripts

yeah im having trouble with that to it gets me frustrated X< its really hard to make games with that bug XP

Offline

 

#4 2008-12-28 17:44:34

ferret10
Scratcher
Registered: 2008-04-21
Posts: 58

Re: Sprite won't follow scripts

pipchirisu wrote:

yeah im having trouble with that to it gets me frustrated X< its really hard to make games with that bug XP

Combine that with the text glitch and its impossible to make a proper game.


A must-see animation about the Scratch cat! http://scratch.mit.edu/projects/ferret10/364723 ¡uʍopǝpısdn ǝdʎʇ uɐɔ ı

Offline

 

#5 2009-01-02 20:06:14

bosox397
Scratcher
Registered: 2008-02-17
Posts: 1000+

Re: Sprite won't follow scripts

what is the text glitch


Dear Scratch Users,
I'm done with scratch, or at least making projects. I have made one last big game, thats both fun and teaches a lesson about water. It'd mean a lot if you gave me feedback.                              http://scratch.mit.edu/projects/bosox397/569201

Offline

 

#6 2009-01-04 14:55:35

Daggart
Scratcher
Registered: 2008-08-22
Posts: 27

Re: Sprite won't follow scripts

the text glitch is when you put all the scripts you want together, but then the words
on the blocks dissapear, also if you save the project on a file it will erase the files name.(good thing it doesn't happen to me).

Last edited by Daggart (2009-01-04 14:57:24)


I like stuff... that's all

Offline

 

#7 2009-01-06 20:36:12

bosox397
Scratcher
Registered: 2008-02-17
Posts: 1000+

Re: Sprite won't follow scripts

pipchirisu wrote:

yeah im having trouble with that to it gets me frustrated X< its really hard to make games with that bug XP

Yeah that glitch gets me mad!  mad


Dear Scratch Users,
I'm done with scratch, or at least making projects. I have made one last big game, thats both fun and teaches a lesson about water. It'd mean a lot if you gave me feedback.                              http://scratch.mit.edu/projects/bosox397/569201

Offline

 

#8 2009-01-07 02:43:34

Buddy_ca111
Scratcher
Registered: 2008-08-30
Posts: 100+

Re: Sprite won't follow scripts

If someone would post a project with the problem I would check it out for you


By reading this you agree to giving me your soul, money, passwords, projects, abiltys and your bases

Offline

 

#9 2009-02-03 21:02:12

rjenkins
Scratcher
Registered: 2009-02-03
Posts: 1

Re: Sprite won't follow scripts

Icant get the cat to move a step

Offline

 

#10 2009-02-03 22:03:16

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: Sprite won't follow scripts

rjenkins wrote:

Icant get the cat to move a step

Have you tried building a script that will make the cat go...something like this:

[blocks]
<when green flag clicked>
<forever>
<move( 5 )steps>
<if on edge, bounce>
<end>
[/blocks]

Then, click on the Green Flag and the cat should move.


http://i39.tinypic.com/2nav6o7.gif

Offline

 

#11 2009-02-04 01:58:04

ihaveamac
Scratcher
Registered: 2007-09-22
Posts: 1000+

Re: Sprite won't follow scripts

...Or sometimes Scratch lags, like mine.


~ihaveamac - visit ihaveamac.net

Offline

 

#12 2009-02-15 20:11:36

sailorgrl
Scratcher
Registered: 2009-02-07
Posts: 20

Re: Sprite won't follow scripts

I have my script so it is like this but Scratch isn't following the code.
<when I receive[ add energy
<change{ energy }by( 50
IT keeps running as if I put forever around it!

Offline

 

#13 2009-02-15 21:41:31

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: Sprite won't follow scripts

sailorgrl wrote:

I have my script so it is like this but Scratch isn't following the code.
<when I receive[ add energy
<change{ energy }by( 50
IT keeps running as if I put forever around it!

Take a look at the conditions you have set up for when the broadcast message is sent.  You may find that you have the broadcasting taking place in a loop so the script receiving the broadcast is acting like it is in a loop as well.


http://i39.tinypic.com/2nav6o7.gif

Offline

 

#14 2009-02-16 09:46:26

sailorgrl
Scratcher
Registered: 2009-02-07
Posts: 20

Re: Sprite won't follow scripts

Looks like you were right! How can I fix it so my project isn't messed up completely
here is a link to my project:(the sprite finish line contains the script) http://scratch.mit.edu/projects/sailorgrl/418694

Last edited by sailorgrl (2009-02-16 09:52:26)

Offline

 

#15 2009-02-16 16:49:32

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: Sprite won't follow scripts

sailorgrl wrote:

Looks like you were right! How can I fix it so my project isn't messed up completely
here is a link to my project:(the sprite finish line contains the script) http://scratch.mit.edu/projects/sailorgrl/418694

Okay, you are trying to set up something that will happen just once.  So a loop is maybe not the best way to go here.  Rather, try using the "Wait Until" block.  Something like

[blocks]
<when green flag clicked>
<wait until>   << <( <{ laps  }> <=> 3 )> <and> <(  <{ timer }> <<> 206 )> >>
<broadcast[ add energy
[/blocks]

might work.  If will be set up when the project starts and trigger just once (at most, it may not trigger at all if the conditions aren't met).


http://i39.tinypic.com/2nav6o7.gif

Offline

 

#16 2009-02-19 20:47:34

sailorgrl
Scratcher
Registered: 2009-02-07
Posts: 20

Re: Sprite won't follow scripts

I have another problem. I imported sprites from a previous scratch file and now they won't follow the code. I even tried dragging the sprite on top of the other sprite and it would not work! Here is my code: <if><touching[ sprite 22
                                            <change{ checkpoints }by( 1

Last edited by sailorgrl (2009-02-19 20:48:20)

Offline

 

#17 2009-02-20 16:39:10

sailorgrl
Scratcher
Registered: 2009-02-07
Posts: 20

Re: Sprite won't follow scripts

sailorgrl wrote:

I have another problem. I imported sprites from a previous scratch file and now they won't follow the code. I even tried dragging the sprite on top of the other sprite and it would not work! Here is my code: <if><touching[ sprite 22
                                            <change{ checkpoints }by( 1

I no longer have this problem, however now the number of laps changes when I have gone through only one checkpoint even though I have it set up like this:

<forever>
<if><( <{ checkpoints }> <=> 2 )>
<change{ laps }by( 1
<set{ checkpoints }to( 0

Offline

 

#18 2009-02-24 10:52:55

SmartIrishKid
Scratcher
Registered: 2008-07-19
Posts: 1000+

Re: Sprite won't follow scripts

Daggart wrote:

the text glitch is when you put all the scripts you want together, but then the words on the blocks dissapear, also if you save the project on a file it will erase the files name.(good thing it doesn't happen to me).

That (or something like it) happened while I was working on my Elviad RPG.  It never happened before, and it seemed to do it more when I saved, edit project notes, switched to another window, or left it unattended too long.

(P.S. Is this the reason that mysterious file "tmp0" suddenly appeared in the folder I saved it to?)


Discuss future Scratch RPGs, online games, and more!

Offline

 

#19 2009-02-24 12:01:44

yambanshee
Scratcher
Registered: 2007-11-06
Posts: 500+

Re: Sprite won't follow scripts

sailorgrl wrote:

sailorgrl wrote:

I have another problem. I imported sprites from a previous scratch file and now they won't follow the code. I even tried dragging the sprite on top of the other sprite and it would not work! Here is my code: <if><touching[ sprite 22
                                            <change{ checkpoints }by( 1

I no longer have this problem, however now the number of laps changes when I have gone through only one checkpoint even though I have it set up like this:

<forever>
<if><( <{ checkpoints }> <=> 2 )>
<change{ laps }by( 1
<set{ checkpoints }to( 0

any chance that this was imported as well? Try saving it, because when you import variables, they get glitched, and they need to be replaced with the exact same variable from the variable section, or (according to P2S, as i haven't tried it myself) save it

Offline

 

#20 2009-03-08 11:03:46

scratchisthebest
Scratcher
Registered: 2009-02-08
Posts: 500+

Re: Sprite won't follow scripts

SmartIrishKid wrote:

That (or something like it) happened while I was working on my Elviad RPG.  It never happened before, and it seemed to do it more when I saved, edit project notes, switched to another window, or left it unattended too long.

(P.S. Is this the reason that mysterious file "tmp0" suddenly appeared in the folder I saved it to?)

That happened to me too. It's weird! The file could (I don't know) be corrupt.
I had all these "tmp"s in my old file:
tmp0
tmp1
tmp2
tmp3
I deleted 'em.

Last edited by scratchisthebest (2009-04-16 18:31:07)


bye 1.4, we all loved you. but we all outgrew the site. 2.0 is a welcome change.
http://scratch.mit.edu/img/Pico3-med.pnghttp://scratch.mit.edu/img/Pico3-med.pnghttp://scratch.mit.edu/img/Pico3-med.pnghttp://scratch.mit.edu/img/Pico3-med.pnghttp://scratch.mit.edu/img/Pico3-med.png

Offline

 

Board footer