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

#1 2011-08-11 19:30:44

4lover
Scratcher
Registered: 2010-04-24
Posts: 500+

I have a question

I created this script: 

   <when I receive[ 1
<change{  }by( 1
but instead of increasing only by 1 it constantly increases please help me

Last edited by 4lover (2011-08-11 19:33:12)


Check out this awesome new zombie-cod type of game: http://scratch.mit.edu/projects/4lover/1975649

Offline

 

#2 2011-08-11 19:38:05

bob6
Scratcher
Registered: 2010-07-01
Posts: 100+

Re: I have a question

did you put <forever>
<broadcast[
<end>

?


http://i46.tinypic.com/3148ksz.gif

Offline

 

#3 2011-08-11 19:39:03

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: I have a question

Well, I would guess that the message keeps betting broadcast somehow. I can't really tell anything without seeing everything else, but check your scripts. There's probably one somewhere that gets stuck in a broadcasting loop.


http://www.blocks.scratchr.org/API.php?action=random&amp;return=image&amp;link1=http://i.imgur.com/OZn2RD3.png&amp;link2=http://i.imgur.com/duzaGTB.png&amp;link3=http://i.imgur.com/CrDGvvZ.png&amp;link4=http://i.imgur.com/POEpQyZ.png&amp;link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

#4 2011-08-11 19:44:57

bob6
Scratcher
Registered: 2010-07-01
Posts: 100+

Re: I have a question

<when green flag clicked>
<forever>
<broadcast[ 1
<end>


http://i46.tinypic.com/3148ksz.gif

Offline

 

#5 2011-08-11 20:06:57

Death_Wish
Scratcher
Registered: 2011-07-26
Posts: 1000+

Re: I have a question

bob6 wrote:

<when green flag clicked>
<forever>
<broadcast[ 1
<end></block>

Did you do this and then that? Because if you did it would constantly broadcast 1, making the first script (On the top of the page) keep on going in an infinite loop, until the project is stopped.


With a straight flush.
http://4.bp.blogspot.com/-FlUhnzmIROE/TgtpjdJl4tI/AAAAAAAABCM/W19pvFTZFaU/s1600/save_the_world.png http://blocsonic.com/images/special/rip-stevejobs.jpg

Offline

 

#6 2011-08-11 21:35:48

shiguy101
Scratcher
Registered: 2010-11-17
Posts: 1000+

Re: I have a question

tri adding
<when green flag clicked>

<change{ x }by( 1 )

<wait(  .9  )secsc>

Offline

 

#7 2011-08-11 22:51:59

456bingo123
Scratcher
Registered: 2010-10-30
Posts: 1000+

Re: I have a question

Try This...

<when I receive[ 1
<change{ whatever }by( 1
<stop script>


My username is now elfin8er! I will not be using this account any more!! ELF OS! (Community Collab)

Offline

 

#8 2011-08-11 23:05:57

4lover
Scratcher
Registered: 2010-04-24
Posts: 500+

Re: I have a question

Ive tried that but it doesnt work and its really necessary for our zombie game


Check out this awesome new zombie-cod type of game: http://scratch.mit.edu/projects/4lover/1975649

Offline

 

#9 2011-08-11 23:14:43

456bingo123
Scratcher
Registered: 2010-10-30
Posts: 1000+

Re: I have a question

Oh yeah! Hmm, I don't know. Do you have somewhere where it says

<forever>
<broadcast[ Whatever

You may be brodcasting too many times.

You could also use

You could have

<when green flag clicked>
<set{ Brodacst }to(False

Instead of having 'Brodcast whatever' you could use

<set{ Brodcast }to(True

and then, instead of having 'When I recieve whatever' You could have

<when green flag clicked>
<forever if> <( <{ Whatever }> <=> True )>

And then what ever you want after that.
Sorry if any of my blocks are wrong.
Hope this helps!


My username is now elfin8er! I will not be using this account any more!! ELF OS! (Community Collab)

Offline

 

#10 2011-08-17 06:45:22

LFCm4d227
New Scratcher
Registered: 2011-08-03
Posts: 16

Re: I have a question

You probably put a forever around the broadcast 1, which means it will constantly broadcast it. This would cause the score to go up infinitely.

Offline

 

#11 2011-08-17 15:17:40

JayB30
Scratcher
Registered: 2011-08-17
Posts: 6

Re: I have a question

<stop script>They should make a stop sprite control button.

Offline

 

Board footer