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

#1 2010-08-26 08:57:53

IHeartGaming
Scratcher
Registered: 2010-07-23
Posts: 1000+

If <answer> = <part of sound name>

If <answer> = <part of sound name>
<play sound <sound> until done>

HELP!!!!!!!!!


IHeartGaming

Offline

 

#2 2010-08-26 09:08:02

what-the
Scratcher
Registered: 2009-10-04
Posts: 1000+

Re: If <answer> = <part of sound name>

IHeartGaming wrote:

If <answer> = <part of sound name>
<play sound <sound> until done>

HELP!!!!!!!!!

I would suggest saving the name of the sound as a variable or a list if you have many sounds.
Then use that as the test.

<set{ Sound name variable }to( Name of sound
<if> <(  <answer> <=> <{ Sound name }>  )>

Last edited by what-the (2010-08-26 09:09:29)


http://imageshack.us/m/64/9034/ddfss.pngMy site
Find someone post count. Click posts under username. Find number of pages. Times that by 40 for min and 60 for max and you have a rough estimate of post count.

Offline

 

#3 2010-08-26 09:10:37

Ace-of-Spades
Scratcher
Registered: 2010-01-08
Posts: 1000+

Re: If <answer> = <part of sound name>

what-the wrote:

IHeartGaming wrote:

If <answer> = <part of sound name>
<play sound <sound> until done>

HELP!!!!!!!!!

I would suggest saving the name of the sound as a variable or a list if you have many sounds.
Then use that as the test.

<set{ Sound name variable }to( Name of sound
<if> <(  <answer> <=> <{ Sound name }>  )>

But s/he wants to make it that even if you only enter part of the name, it plays the sound anyways.


11110010100011010100011010101000100011011011001010111100101000110101000110101010001000110110110010101111001010001101010001101010100010001101101100101011110010100011010100011010101000100011011011001010
110101010010001010101010101010101010101010100110101010010101010010101001101011010101010010101010101

Offline

 

#4 2010-08-26 09:13:52

what-the
Scratcher
Registered: 2009-10-04
Posts: 1000+

Re: If <answer> = <part of sound name>

Ace-of-Spades wrote:

what-the wrote:

IHeartGaming wrote:

If <answer> = <part of sound name>
<play sound <sound> until done>

HELP!!!!!!!!!

I would suggest saving the name of the sound as a variable or a list if you have many sounds.
Then use that as the test.

<set{ Sound name variable }to( Name of sound
<if> <(  <answer> <=> <{ Sound name }>  )>

But s/he wants to make it that even if you only enter part of the name, it plays the sound anyways.

Then use a list and put in; if Sound name (any) contains <answer> then


http://imageshack.us/m/64/9034/ddfss.pngMy site
Find someone post count. Click posts under username. Find number of pages. Times that by 40 for min and 60 for max and you have a rough estimate of post count.

Offline

 

#5 2010-08-26 09:20:25

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

Re: If <answer> = <part of sound name>

Only part of the name needs to be entered? That might be hard-you'd have to make the project distinguish between what is close enough to the name and what is not.


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

 

#6 2010-08-26 09:22:46

AtomicBawm3
Scratcher
Registered: 2009-06-27
Posts: 1000+

Re: If <answer> = <part of sound name>

You could just add the parts of the name that you want it to be able to identify to the list.


http://i50.tinypic.com/j0yw0p.jpg

Offline

 

#7 2010-08-26 09:27:33

IHeartGaming
Scratcher
Registered: 2010-07-23
Posts: 1000+

Re: If <answer> = <part of sound name>

Its too hard right now.
Maybe in the next release of the project.
Thanks for the help.

Anyway, HERE IT IS!!!


IHeartGaming

Offline

 

#8 2010-08-26 09:52:24

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

Re: If <answer> = <part of sound name>

Oh, cool! Regarding your problem about importing sounds, it should work as long as all the sounds are in the stage and not a sprite.


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

 

#9 2010-08-26 11:22:35

fg123
Scratcher
Registered: 2008-11-13
Posts: 1000+

Re: If <answer> = <part of sound name>

I can make a project about that...


Hai.

Offline

 

Board footer