Discuss Scratch

NZombeh
Scratcher
100+ posts

Saying without saying?

When space pressed
say pick random between 1 and 5 for 1 secs
if pick random between 1 and 5 = 5
Say <Something>

I want it so “say pick random between 1 and 5 for 1 secs” doesn't pop up, it's just invisible…


scubajerry
Scratcher
1000+ posts

Saying without saying?

Can you share your project?
scubajerry
Scratcher
1000+ posts

Saying without saying?

If you don't want it to show up, why are you SAYing it? Are you just trying to cause a WAIT <1>
scubajerry
Scratcher
1000+ posts

Saying without saying?

I now see your project. What you want to do is

delete your first SAY

make a variable called RANDOM

Set RANDOM to PICK RANDOM 1 to 5

Use the variable RANDOM in all your remaining IFs, instead if PICK RANDOM.


What can happen if PICK RANDOM on the 1st IF returns 5, it won't SAY anything.
By the time it gets to the 5th IF, that PICK RANDOM probably won't return 5, so it won;t SAY anything.
NZombeh
Scratcher
100+ posts

Saying without saying?

scubajerry wrote:

If you don't want it to show up, why are you SAYing it? Are you just trying to cause a WAIT <1>
This one http://scratch.mit.edu/projects/11799326/


fleurymarc
Scratcher
71 posts

Saying without saying?

I like your project idea, NZombeh!

scubajerry is correct that you will want to do the random number once, and put that number in a variable. Then do all the IF checks against that variable. Otherwise you are picking a new random number every time.


Just for fun, I added a remix, for when you are ready to move on to Lists. (edit: oops, looks like it didn't save!)




Last edited by fleurymarc (Aug. 11, 2013 12:59:44)


My Projects, in development:
Game mechanics test for Tank Wars
Partial clone of Asteroids
Foundation for future card games: Card Game base
scubajerry
Scratcher
1000+ posts

Saying without saying?

fleurymarc wrote:

I like your project idea, NZombeh!

scubajerry is correct that you will want to do the random number once, and put that number in a variable. Then do all the IF checks against that variable. Otherwise you are picking a new random number every time.


Just for fun, I added a remix, for when you are ready to move on to Lists. (edit: oops, looks like it didn't save!)




If his project has saved, it would have had a LIST maybe name COMPLIMENTS.
You would add each of your compliments to the list.

Then you do what the next post says. It is much better than mine.

Last edited by scubajerry (Aug. 11, 2013 15:33:57)

fleurymarc
Scratcher
71 posts

Saying without saying?

scubajerry wrote:

fleurymarc wrote:

I like your project idea, NZombeh!

scubajerry is correct that you will want to do the random number once, and put that number in a variable. Then do all the IF checks against that variable. Otherwise you are picking a new random number every time.


Just for fun, I added a remix, for when you are ready to move on to Lists. (edit: oops, looks like it didn't save!)




If his project has saved, it would have had a LIST maybe name COMPLIMENTS.
You would add each of your compliments to the list.

Then you SAY< ITEM (PICK RANDOM 1 to LENGTH OF LIST COMPLIMENTS)>


Yup. (Even simpler for picking a random item from a list, though… Say: Item (random) from (Compliments)


(Turns out it did save, I just had to share! lol)


Last edited by fleurymarc (Aug. 11, 2013 14:39:13)


My Projects, in development:
Game mechanics test for Tank Wars
Partial clone of Asteroids
Foundation for future card games: Card Game base
MinecraftParty77
Scratcher
100+ posts

Saying without saying?

scubajerry wrote:

fleurymarc wrote:

I like your project idea, NZombeh!

scubajerry is correct that you will want to do the random number once, and put that number in a variable. Then do all the IF checks against that variable. Otherwise you are picking a new random number every time.


Just for fun, I added a remix, for when you are ready to move on to Lists. (edit: oops, looks like it didn't save!)




If his project has saved, it would have had a LIST maybe name COMPLIMENTS.
You would add each of your compliments to the list.

Then you do what the next post says. It is much better than mine.

That may seem impossible to the New Scratchers, but its really not. So, NZombeh, just make a variable called “random” and make a list called “compliments” and have it so "When pressed“ ”set to ((pick random ( ) through ( )“ and finnaly put this block ”say [item ((random)) of for ( ) secs" (of course you will have to add some compliments into the list)

Zombies: Remastered

A Brand New Survival game, based off the original game ZOMBIES and ZOMBIES II: TNT Apocalypse.

Play it when it's available!
MinecraftParty77
Scratcher
100+ posts

Saying without saying?

NZombeh wrote:

MinecraftParty77 wrote:

scubajerry wrote:

fleurymarc wrote:

I like your project idea, NZombeh!

scubajerry is correct that you will want to do the random number once, and put that number in a variable. Then do all the IF checks against that variable. Otherwise you are picking a new random number every time.


Just for fun, I added a remix, for when you are ready to move on to Lists. (edit: oops, looks like it didn't save!)




If his project has saved, it would have had a LIST maybe name COMPLIMENTS.
You would add each of your compliments to the list.

Then you do what the next post says. It is much better than mine.

That may seem impossible to the New Scratchers, but its really not. So, NZombeh, just make a variable called “random” and make a list called “compliments” and have it so "When pressed“ ”set to ((pick random ( ) through ( )“ and finnaly put this block ”say [item ((random)) of for ( ) secs" (of course you will have to add some compliments into the list)

THANKS!!!

Your Welcome

Zombies: Remastered

A Brand New Survival game, based off the original game ZOMBIES and ZOMBIES II: TNT Apocalypse.

Play it when it's available!
Storeractior67
Scratcher
50 posts

Saying without saying?

if <key [a v] pressed?> then

forever

say [Bannana] for (7) secs
turn ccw (95) degrees
end



(im a bannana!)
  • Moo!
    Moo!
    Moo!
    Moo!
    Moo!
    Moo!
    Moo!
    Moo!
    Moo!
    Moo!
    Moo!
    Moo!
    Moo!
    Moo!
    Moo!
    Moo!
    Moo!
    Moo!
    Moo!
    Moo!
    Moo!
    Moo!
    Moo!
    Moo!
    Moo!

Last edited by Storeractior67 (Oct. 13, 2014 15:48:38)


Find the five 9's

6666666666666666666666666666666666666666666666666666666666666666
6666666666666666666666666666666666666666666666666666666666666666
6666666669666666666666666696666666666666666666966666666666666666
6666666666666666666966666666666666666666666666666666666666666666
6666666666666666666666666666666666666666666666666666666666666666

Did you find them?

Powered by DjangoBB