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

#1 2010-06-21 12:02:54

GlitchSprite
Scratcher
Registered: 2010-06-08
Posts: 1000+

How do I stop a broadcasting script?

I am confused. I am making a mario game and I made it so that when he touches a color, his life counter goes down and he reappears at a certain point. I used broadcasting, but now he can't move from that spot. How do I stop the script from repeating itself? I've tried to use the Stop Script block, but it doesn't work.

Here is the way I have it set up.
[blocks]<when I receive[ firstdeath ]>
<go to x sad -45)y: (-80)>[/blocks] 

then I have four blocks that say if colors on my sensor for mario touch that color, set the variable that triggers the life counter to 1.

I've tried this:

[blocks]<when I receive[ firstdeath ]>
<repeat(1)>
<go to x sad -45) y: (-80)>
<stop script>
<end>

And then the sensor stuff. Could someone please help me?

Last edited by GlitchSprite (2010-06-21 12:04:49)


http://www.mspaintadventures.com/storyfiles/hs2/02915.gif

Offline

 

#2 2010-06-21 12:08:39

meew0
Scratcher
Registered: 2010-02-22
Posts: 1000+

Re: How do I stop a broadcasting script?

Hmm... can you show me the sensor script?


http://i.imgur.com/mJV3j.pnghttp://i.imgur.com/HwWAX.pnghttp://i.imgur.com/sZ7Ui.pnghttp://i.imgur.com/0y6yh.pnghttp://i.imgur.com/nOC4l.png

Offline

 

#3 2010-06-21 12:43:57

GlitchSprite
Scratcher
Registered: 2010-06-08
Posts: 1000+

Re: How do I stop a broadcasting script?

http://www.ff.org/img/.png

where realdie is the variable that triggers the life counter.

I think you have to save the picture to see it.

Last edited by GlitchSprite (2010-06-21 12:45:09)


http://www.mspaintadventures.com/storyfiles/hs2/02915.gif

Offline

 

#4 2010-06-21 12:55:50

meew0
Scratcher
Registered: 2010-02-22
Posts: 1000+

Re: How do I stop a broadcasting script?

That image does not exist... ?


http://i.imgur.com/mJV3j.pnghttp://i.imgur.com/HwWAX.pnghttp://i.imgur.com/sZ7Ui.pnghttp://i.imgur.com/0y6yh.pnghttp://i.imgur.com/nOC4l.png

Offline

 

#5 2010-06-21 12:59:16

GlitchSprite
Scratcher
Registered: 2010-06-08
Posts: 1000+

Re: How do I stop a broadcasting script?

meew0 wrote:

That image does not exist... ?

Arg!!!

I'll just make it with blocks...

[blocks]<if><color[ black ]is over[ light blue ]
<set{ realdie }to( 2 )
<if><color[ red ]is over[ light blue ]
<set{ realdie }to( 2 )
<if><color[ orange ]is over[ light blue ]
<set{ realdie }to( 2 )
<if><color[ yellow ]is over[ light blue ]
<set{ realdie }to( 2 )
<end>

Last edited by GlitchSprite (2010-06-21 13:08:43)


http://www.mspaintadventures.com/storyfiles/hs2/02915.gif

Offline

 

#6 2010-06-21 13:02:06

meew0
Scratcher
Registered: 2010-02-22
Posts: 1000+

Re: How do I stop a broadcasting script?

GlitchSprite wrote:

meew0 wrote:

That image does not exist... ?

Arg!!!

http://www.ff.org/img/.png

I get that error:

404 - Not Found
The page you are trying to access does not exist.
If this error persists, please contact the website webmaster.
If you are the webmaster of this site make sure that:

    * You have uploaded correctly your files to the public_html directory which is the web-root of your account;
    * You have not misspelled the URL. Bear in mind that letters are case sensitive and no blank spaces are recommended;
    * In case you have applied SEO - SEF URL rewrite rules, make sure you have renamed the htaccess.txt file to .htaccess. If there is already a non-empty .htaccess file, check it and make sure the necessary rules are uncommented.


http://i.imgur.com/mJV3j.pnghttp://i.imgur.com/HwWAX.pnghttp://i.imgur.com/sZ7Ui.pnghttp://i.imgur.com/0y6yh.pnghttp://i.imgur.com/nOC4l.png

Offline

 

#7 2010-06-21 14:03:14

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

Re: How do I stop a broadcasting script?

From the looks of it, the most likely problem is firstdeath is being broadcasted over and over for some reason. You didn't post the broadcasting script so I don't know exactly how it works, but first try putting this after firstdeath is broadcasted:

<wait until><not> (whatever triggers the broadcasting script) >>[/blocks]

This should keep it from broadcasting more than once.

Last edited by hmnwilson (2010-06-21 14:04:13)


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

 

#8 2010-06-21 14:40:09

waveOSBeta
Scratcher
Registered: 2009-12-08
Posts: 1000+

Re: How do I stop a broadcasting script?

Set the variable back to normal after broadcasting the message.


http://internetometer.com/image/10202.png]
New signature coming soon!  smile

Offline

 

Board footer