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?
Offline
I don't see anything wrong with your scripting :S Are you sure there isn't a different script that's playing Friday?
Offline
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?
Offline
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
edit: i can never get blocks to work in the forums -_-
Last edited by lilacfuzz101 (2011-07-15 20:02:22)

Offline
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?
![]()
No, it's two separate scripts for "stage".
Offline
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![]()
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.
Offline
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![]()
edit: i can never get blocks to work in the forums -_-
Thank you! That worked!
You can see the project later today. It's called teh test ogf stupedness!
Offline
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!
Offline
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.
I think the block that would be better suited there would be <answer = secret code>
Offline
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.
![]()
I think the block that would be better suited there would be <answer = secret code>
It didn't work.
Offline
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.
![]()
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?
Offline
[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]
Offline
bkueguyhdscfkdbnfgkhbfkbnskjgbsiudfghsufgkisdngoushd! I can never make the blocks show!
Lost connection!?!?!? STUPID 2WIRE!
Offline
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.
Offline
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.
Offline
It messes up when I ask, what is the secret code? It always broadcasts Failz!
Offline
Harakou wrote:
Because you used a list variable. You want the "answer" reporter from the Sensing category.
Whats the answer reporter?
Offline
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
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!
Offline