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

#1 2011-07-15 19:40:52

rememberchicken
Scratcher
Registered: 2011-06-18
Posts: 500+

Okay, this is getting on my nerves.

I only want one song to play, but then scratch plays both. This is what I'm trying to do:
When green flag clicked
forever
play sound: "Friday" until done


When I receive: Failz!
stop all sounds
play sound: "youfail" until done
_____________________________
But when I receive failz, It plays both sounds!
Could somebody help me?


Hello.....

Offline

 

#2 2011-07-15 19:53:32

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

Re: Okay, this is getting on my nerves.

I don't see anything wrong with your scripting :S Are you sure there isn't a different script that's playing Friday?  hmm


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

Offline

 

#3 2011-07-15 19:55:27

rememberchicken
Scratcher
Registered: 2011-06-18
Posts: 500+

Re: Okay, this is getting on my nerves.

rememberchicken wrote:

I only want one song to play, but then scratch plays both. This is what I'm trying to do:
When green flag clicked
forever
play sound: "Tuesday" until done


When I receive: Failz!
stop all sounds
play sound: "youfail" until done
_____________________________
But when I receive failz, It plays both sounds!
Could somebody help me?


Hello.....

Offline

 

#4 2011-07-15 19:57:51

lilacfuzz101
Scratcher
Registered: 2010-05-22
Posts: 1000+

Re: Okay, this is getting on my nerves.

Since you have it playing forever, it will play forever even after you stop it because the stop only happens once and the forever will go on forever. Maybe use a variable so...
[blocks]<when I receive[failz]>
<set{playsong}to(1)>

<when green flag clicked>
<repeat until><( <{play song }> <=>1 )>[/blocks]
Something like that  smile

edit: i can never get blocks to work in the forums -_-

Last edited by lilacfuzz101 (2011-07-15 20:02:22)


http://25.media.tumblr.com/tumblr_lzqaicLrY01r5wdo7o1_500.gif

Offline

 

#5 2011-07-15 20:02:38

rememberchicken
Scratcher
Registered: 2011-06-18
Posts: 500+

Re: Okay, this is getting on my nerves.

Jonathanpb wrote:

I don't see anything wrong with your scripting :S Are you sure there isn't a different script that's playing Friday?  hmm

No, it's two separate scripts for "stage".


Hello.....

Offline

 

#6 2011-07-15 20:03:25

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

Re: Okay, this is getting on my nerves.

lilacfuzz101 wrote:

Since you have it playing forever, it will play forever even after you stop it because the stop only happens once and the forever will go on forever. Maybe use a variable so...
[blocks]<when I receive[failz!]>
<set{play song  }to(1)>
and then
<when green flag clicked>
<repeat until><( <{play song  }> <=>1  )>[/blocks]
Something like that  smile

edit: i can never get blocks to work in the forums -_-

I don't even bother with them. I think this is what you meant.

http://i.imgur.com/mgN9f.gif


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

 

#7 2011-07-15 20:18:22

rememberchicken
Scratcher
Registered: 2011-06-18
Posts: 500+

Re: Okay, this is getting on my nerves.

lilacfuzz101 wrote:

Since you have it playing forever, it will play forever even after you stop it because the stop only happens once and the forever will go on forever. Maybe use a variable so...
[blocks]<when I receive[failz]>
<set{playsong}to(1)>

<when green flag clicked>
<repeat until><( <{play song }> <=>1 )>[/blocks]
Something like that  smile

edit: i can never get blocks to work in the forums -_-

Thank you! That worked!  big_smile  You can see the project later today. It's called teh test ogf stupedness!


Hello.....

Offline

 

#8 2011-07-15 21:55:41

rememberchicken
Scratcher
Registered: 2011-06-18
Posts: 500+

Re: Okay, this is getting on my nerves.

Dang it! I think somethings wrong with the blocks again!
Here is the script:
When I receive: "this is not right"
switch to background: background 1
Ask: "What is the secret code" and wait
If: answers contains: secret code
   broadcast: rainbow?
else
     broadcast: Failz!
___________________
But either way, it will always broadcast Failz!


Hello.....

Offline

 

#9 2011-07-15 22:50:16

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

Re: Okay, this is getting on my nerves.

rememberchicken wrote:

Dang it! I think somethings wrong with the blocks again!
Here is the script:
When I receive: "this is not right"
switch to background: background 1
Ask: "What is the secret code" and wait
If: answers contains: secret code
   broadcast: rainbow?
else
     broadcast: Failz!
___________________
But either way, it will always broadcast Failz!

There is no <[] contains> boolean that takes a variable as an argument. Either you're using a different block, or you're using the <[] contains> block for lists.  hmm

I think the block that would be better suited there would be <answer = secret code>


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

 

#10 2011-07-16 01:24:47

rememberchicken
Scratcher
Registered: 2011-06-18
Posts: 500+

Re: Okay, this is getting on my nerves.

Harakou wrote:

rememberchicken wrote:

Dang it! I think somethings wrong with the blocks again!
Here is the script:
When I receive: "this is not right"
switch to background: background 1
Ask: "What is the secret code" and wait
If: answers contains: secret code
   broadcast: rainbow?
else
     broadcast: Failz!
___________________
But either way, it will always broadcast Failz!

There is no <[] contains> boolean that takes a variable as an argument. Either you're using a different block, or you're using the <[] contains> block for lists.  hmm

I think the block that would be better suited there would be <answer = secret code>

It didn't work.


Hello.....

Offline

 

#11 2011-07-16 01:31:11

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

Re: Okay, this is getting on my nerves.

rememberchicken wrote:

Harakou wrote:

rememberchicken wrote:

Dang it! I think somethings wrong with the blocks again!
Here is the script:
When I receive: "this is not right"
switch to background: background 1
Ask: "What is the secret code" and wait
If: answers contains: secret code
   broadcast: rainbow?
else
     broadcast: Failz!
___________________
But either way, it will always broadcast Failz!

There is no <[] contains> boolean that takes a variable as an argument. Either you're using a different block, or you're using the <[] contains> block for lists.  hmm

I think the block that would be better suited there would be <answer = secret code>

It didn't work.

Can you post a screencap of your script?


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

 

#12 2011-07-16 11:06:18

rememberchicken
Scratcher
Registered: 2011-06-18
Posts: 500+

Re: Okay, this is getting on my nerves.

[blocks] http://scratch.mit.edu/forums/post.php?action=post&tid=68721#req_messagehttp://scratch.mit.edu/forums/post.php?action=post&tid=68721#req_messagehttp://scratch.mit.edu/forums/post.php?action=post&tid=68721#req_messagehttp://scratch.mit.edu/forums/post.php?action=post&tid=68721#req_messagehttp://scratch.mit.edu/forums/post.php?action=post&tid=68721#req_messagehttp://scratch.mit.edu/forums/post.php?action=post&tid=68721#req_messagehttp://scratch.mit.edu/forums/post.php?action=post&tid=68721#req_messhttp://scratch.mit.edu/forums/post.php?action=post&tid=68721#req_messageage [/blocks]


Hello.....

Offline

 

#13 2011-07-16 11:10:10

rememberchicken
Scratcher
Registered: 2011-06-18
Posts: 500+

Re: Okay, this is getting on my nerves.

bkueguyhdscfkdbnfgkhbfkbnskjgbsiudfghsufgkisdngoushd!  I can never make the blocks show!
Lost connection!?!?!? STUPID 2WIRE!


Hello.....

Offline

 

#14 2011-07-16 11:19:30

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

Re: Okay, this is getting on my nerves.

What? Just hit Print Screen on your keyboard, (alternatively Prt Sc on some keyboards), paste into an image editor like Paint, save the image and upload it to an image sharing site like Imgur, and provide the link to the image.


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

 

#15 2011-07-16 11:27:00

rememberchicken
Scratcher
Registered: 2011-06-18
Posts: 500+

Re: Okay, this is getting on my nerves.

Harakou wrote:

What? Just hit Print Screen on your keyboard, (alternatively Prt Sc on some keyboards), paste into an image editor like Paint, save the image and upload it to an image sharing site like Imgur, and provide the link to the image.

I don't want to go through all that trouble. I'll post the project and you can check out the script and see whats wrong. DON'T MESS WITH IT.


Hello.....

Offline

 

#16 2011-07-16 11:33:25

rememberchicken
Scratcher
Registered: 2011-06-18
Posts: 500+

Re: Okay, this is getting on my nerves.

It messes up when I ask, what is the secret code? It always broadcasts Failz!


Hello.....

Offline

 

#17 2011-07-16 11:52:16

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

Re: Okay, this is getting on my nerves.

Because you used a list variable. You want the "answer" reporter from the Sensing category.


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

 

#18 2011-07-16 15:25:20

rememberchicken
Scratcher
Registered: 2011-06-18
Posts: 500+

Re: Okay, this is getting on my nerves.

Harakou wrote:

Because you used a list variable. You want the "answer" reporter from the Sensing category.

Whats the answer reporter?


Hello.....

Offline

 

#19 2011-07-16 15:29:02

LivelyStickDude
Scratcher
Registered: 2011-07-08
Posts: 84

Re: Okay, this is getting on my nerves.

because it is playing it forever. it wont stop if you make it play forever. it will just stop for a second and play again.

Offline

 

#20 2011-07-16 16:05:04

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

Re: Okay, this is getting on my nerves.

rememberchicken wrote:

Harakou wrote:

Because you used a list variable. You want the "answer" reporter from the Sensing category.

Whats the answer reporter?

This:
http://wiki.scratch.mit.edu/images/Answer.png


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

 

#21 2011-07-16 17:53:53

rememberchicken
Scratcher
Registered: 2011-06-18
Posts: 500+

Re: Okay, this is getting on my nerves.

Harakou wrote:

rememberchicken wrote:

Harakou wrote:

Because you used a list variable. You want the "answer" reporter from the Sensing category.

Whats the answer reporter?

This:
[=http://wiki.scratch.mit.edu/wiki/Answer_(block)][url]http://wiki.scratch.mit.edu/images/Answer.png

Thanks! I got it to work!


Hello.....

Offline

 

Board footer