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

#1 2009-10-22 19:22:45

msfamily
Scratcher
Registered: 2009-10-22
Posts: 1

ask and wait

At present it seems that if one has a sprite "ask and wait" all the sprites stop and the program pauses until user input is completed (via return) I'd like to write a script that quizzes the user with *timed* questions: but as far as I can see, there's no way to do that, as I can't run a timer (or anything at all) while the user is being prompted for input; the program just waits.

Or is there some way around that that I haven't noticed?

Thanks for your help!

themsfamily

.

Offline

 

#2 2009-10-22 21:42:25

Greatdane
Scratcher
Registered: 2007-06-05
Posts: 1000+

Re: ask and wait

There is something called a timer.
[blocks]
<timer>
you can reset it
<reset timer>
[/blocks]
I don't think there is any way to stop it.

Last edited by Greatdane (2009-10-22 21:42:40)


The future belongs to those who believe in the beauty of their dreams.
        ~ Eleanor Roosevelt

Offline

 

#3 2009-10-23 18:10:19

Ralphjos
Scratcher
Registered: 2009-10-10
Posts: 100+

Re: ask and wait

No. The ask and wait block is not able to be timed.


http://i33.tinypic.com/2dt3j9j.gif

Offline

 

#4 2009-10-23 18:26:43

samurai768
Scratcher
Registered: 2009-07-21
Posts: 1000+

Re: ask and wait

Wait, look at this:

If you make a sprite that hides the whole time and that's the timer(with a costume that says you lose or good try or replay that shows when you are out of time), you could do something like this:
For timer:
When green flag clicked:
forever
hide

When i receive Question 1
set timer to (blah blah blah)
If timer=zero
switch to costume you lose
show
wait 5 seconds
stop all

Offline

 

Board footer