Discuss Scratch

mozarty
Scratcher
54 posts

Cancel Button for Ask Block

There should SERIOUSLY be a cancel button when a sprite asks you a question (
ask [] and wait
). It's really annoying.

Una mela.
mozarty
Scratcher
54 posts

Cancel Button for Ask Block

I mean, next to the checkmark when answering a question, there should be an cancel button.

Una mela.
Sonickyle
Scratcher
1000+ posts

Cancel Button for Ask Block

What use would it serve? Just leave the answer box blank.

No I don't make projects anymore. I left some time ago.
I only check the forums every now and then, but other than that consider me retired.
AonymousGuy
Scratcher
1000+ posts

Cancel Button for Ask Block

Sonickyle wrote:

What use would it serve? Just leave the answer box blank.
What if you want to close the box? The user might not do that.

However, leaving it up to the user to close it isn't really any better…
Sonickyle
Scratcher
1000+ posts

Cancel Button for Ask Block

But what would happen when you close the box?

No I don't make projects anymore. I left some time ago.
I only check the forums every now and then, but other than that consider me retired.
LeDerpy123
Scratcher
1000+ posts

Cancel Button for Ask Block

As sonicklye said, what would happen? Would the script just stop? Thank wouldn't be very useful. Would it keep going? What would it do then? Would the answer string be blank or would it say something like “answer cancelled”? There are too many possibilities for what would happen. So sorry, no support.

My specs: Windows 8.1.2 - 3 GB RAM - Intel Core2 Quad - IE11
A-no-meep
Scratcher
100+ posts

Cancel Button for Ask Block

LeDerpy123 wrote:

As sonicklye said, what would happen? Would the script just stop? Thank wouldn't be very useful. Would it keep going? What would it do then? Would the answer string be blank or would it say something like “answer cancelled”? There are too many possibilities for what would happen. So sorry, no support.
Also, you could just put a null answer.

[ v]
A dropdown to nowhere
DadOfMrLog
Scratcher
1000+ posts

Cancel Button for Ask Block

I think the main problem is that he only way to get rid of an “ask” is to stop the whole project (e.g. “stop all”).

I don't see how there could be any real difference between having a “cancel” button, and just clicking the tick button with nothing typed in - in the case of “cancel”, the only sensible way would be to have “answer” being blank. Anything else (except perhaps stopping the script, or adding a new boolean reporter [“answer cancelled”!], which seems unnecessary and cumbersome) would be a string that the user could also have typed as the answer (as mentioned, “answer cancelled”. say).

In terms of “cancel”, then, the user giving a blank answer seems to be what you want (i.e. clicking the tick with no text entered).

In terms of actually being able to programmatically remove the ask box (which I think would be useful), the quickest and least problematic solution I can think of would be to have another item in the “stop” block list that says something like “stop asking”. That would allow easy removal of the ask box under the appropriate conditions (e.g. the user clicked some other button-sprite to get back to a main menu), and, importantly, it wouldn't cause any changes to the behaviour of any existing scripts.


Alternate account: TheLogFather –– HowTos and useful custom blocks (see studio). Examples below…


- String manipulation - - - X to power of Y - - - Clone point to clone - Detect New Scratcher - Speed tests studio -

davidkt
Scratcher
1000+ posts

Cancel Button for Ask Block

LeDerpy123 wrote:

As sonicklye said, what would happen? Would the script just stop? Thank wouldn't be very useful. Would it keep going? What would it do then? Would the answer string be blank or would it say something like “answer cancelled”? There are too many possibilities for what would happen. So sorry, no support.
+1

Remember when I looked like this? I still do.


Float, my Scratch 2.0 mod | My (somewhat under-construction) blog
ExtremelyGamer
Scratcher
1 post

Cancel Button for Ask Block

The ‘cancel’ would be useful if you have a time limit. For example you want the user to only answer the question in let's say 10 seconds. Then you would have when 10 seconds have passed, cancel ask. Then the user cannot answer anymore. I really need this in the project I'm working on now. Because I don't want the player to have an infinite amount of time to answer the question…

Edit: Lol, first post on the Scratch 2.0 site XD

Last edited by ExtremelyGamer (Jan. 12, 2014 18:45:18)

mariobros406
Scratcher
500+ posts

Cancel Button for Ask Block

Am I the only one here who agrees with you? There could be 2 uses:
  • A cancel button while answering
  • A cancel block. Here are a few ways it may look:
    cancel question // category=sensing
    ask [What's your name?] for (10) secs // category=sensing
    ask [What's your name?] // category=sensing
    The last one would make sense if the first one was created.

I only check in to Scratch from time to time to see what others have been up to. I don't really post anything anymore. I'll occasionally post a question in the AT forum if I can't find an answer anywhere else.
DadOfMrLog
Scratcher
1000+ posts

Cancel Button for Ask Block

mariobros406 wrote:

Am I the only one here who agrees with you?
,,,
I think you're quite right in suggesting there needs to be some way to remove a question (i.e. an “ask” that's currently showing) - it was a pain to hack around the problem in this hangman project (via “stop all”, which is currently the only way to get rid of an ask box, and then “when timer” to make the project continue on again).

Personally, I would have expected “stop other scripts in this sprite” to remove ask boxes (that were showing from another script in that sprite) - but it doesn't, and making it do so would be a change in behaviour that might break some existing scripts (though I wonder how many…?)

I suggested above that having an extra “asking” menu item in the “stop” block menu might be a possibility (which wouldn't break any existing scripts). Adding something like a “cancel asking” block, as you suggest, might also be a way to do it (more obvious, because it's in the same section as the “ask” block).


However, I think the original poster was suggesting an actual cancel button on the box itself (at least, that's how it seemed?) I don't think there's any need for such a thing (clicking the tick, or hitting return, with a blank response, seems like the closest thing), and it's really unclear how that would be implemented in terms of the script knowing it had happened (as others have pointed out above).

Besides, adding a way to remove the ask box from a script (with “cancel asking”, for example), then it's easy enough to create a button yourself in the project somewhere that performs that functionality…

Last edited by DadOfMrLog (Jan. 12, 2014 21:35:20)



Alternate account: TheLogFather –– HowTos and useful custom blocks (see studio). Examples below…


- String manipulation - - - X to power of Y - - - Clone point to clone - Detect New Scratcher - Speed tests studio -

Rodrigo_Rodrigues
Scratcher
12 posts

Cancel Button for Ask Block

The“Stop all” is a problem but we can use event scripts. I maked a very simple program: https://scratch.mit.edu/projects/52408418/
stickfire-test
Scratcher
100+ posts

Cancel Button for Ask Block

Support for
stop asking :: sensing
I think it should be in the sensing category rather than part of the existing stop block, because that one is used to stop scripts and doesn't seem very related to this one. It would set
(answer)
to an empty string when it was triggered.

Last edited by stickfire-test (March 14, 2015 11:53:16)



CatsUnited
Scratcher
1000+ posts

Cancel Button for Ask Block

stickfire-test wrote:

Support for
stop asking :: sensing
I think it should be in the sensing category rather than part of the existing stop block, because that one is used to stop scripts and doesn't seem very related to this one. It would set
(answer)
to an empty string when it was triggered.
this.

bottom text
GyroscopeBill
Scratcher
500+ posts

Cancel Button for Ask Block

stickfire-test wrote:

Support for
stop asking :: sensing
I think it should be in the sensing category rather than part of the existing stop block, because that one is used to stop scripts and doesn't seem very related to this one. It would set
(answer)
to an empty string when it was triggered.
^

Pingu is learning about politics with this amazing project.
readingBunny
Scratcher
3 posts

Cancel Button for Ask Block

stickfire-test wrote:

Support for
stop asking :: sensing
I think it should be in the sensing category rather than part of the existing stop block, because that one is used to stop scripts and doesn't seem very related to this one. It would set
(answer)
to an empty string when it was triggered.

Support. I think there should be one. When you close an answer window, if you've set it to add the answer to a list, it adds an empty space, and can cause errors. It would be much more convenient.

forever

if <(evil kumquats) > [0]> then

set [evil kumquats v] to [0]
patch eaten signatures
end

end
PrincessPanda_test_
Scratcher
1000+ posts

Cancel Button for Ask Block

stickfire-test wrote:

Support for
stop asking :: sensing
I think it should be in the sensing category rather than part of the existing stop block, because that one is used to stop scripts and doesn't seem very related to this one. It would set
(answer)
to an empty string when it was triggered.
That.

DadOfMrLog
Scratcher
1000+ posts

Cancel Button for Ask Block

Just to note that there's been a breakthrough in this particular issue…

I've been wrong all this time in thinking that the only way to remove an ask box was “stop all” - it turns out you can also do it by having it ask within a broadcast receiver script, and then resending the broadcast (but have it not do the ask on the second time).

Restarting the receiver script removes the ask prompt.
(Also when restarting “when this sprite clicked” and “when backdrop switches” scripts, though I think those are less generic than “when I receive”)

The basic procedure then looks like this: https://scratch.mit.edu/discuss/post/1593995/

Much less destructive than “stop all”!

stickfire-test wrote:

Support for
stop asking :: sensing
I think it should be in the sensing category rather than part of the existing stop block, because that one is used to stop scripts and doesn't seem very related to this one. It would set
(answer)
to an empty string when it was triggered.
The main question I would have about that is what happens to the script that was running the ask block? Does it get stopped? If not, how does it know the answer was cancelled? (Having answer blank is the same as someone typing nothing.)

Here's an alternative idea, where it does make it clear that it is stopping the script doing the asking:
stop [asking script v] :: control // should have tab at the bottom so you can append blocks
That would basically work in a very similar way to the broadcast method above, and there's no chance of confusion over the value of “answer” for blocks after the ask block (since they don't get run).

The main downside I see is that it's not near the ask block itself in the block palette, so it's not going to be obvious how to find it (and so how to stop asking) unless you already know about it. (Though I think once you see it, then it is clear what it does, right?)

Last edited by DadOfMrLog (Nov. 14, 2015 08:16:53)



Alternate account: TheLogFather –– HowTos and useful custom blocks (see studio). Examples below…


- String manipulation - - - X to power of Y - - - Clone point to clone - Detect New Scratcher - Speed tests studio -

Zekrom01
Scratcher
1000+ posts

Cancel Button for Ask Block

Enter a null answer, no support

Also, I found a workaround here

20 something years old
Probably doing college work

Powered by DjangoBB