Innen: Hungarian Scratch-Wiki

Sablon:About Sablon:Block The Válasz blokk egy Érzékelő blokk és egy Riporter blokk is egyben. A blokk tárolja a legutóbbi szöveget, amelyet bevittek a Kérdezd meg: () és várj blokkal. Amikor még semmi sem vittek be, akkor még nincs értéke.

This block can be displayed as a Stage monitor.

Példák erre

As this block stores imputed text, it is very useful where a script has to refer to what has been inputted. For example, there are chatbots that let the Scratcher input their name. If the script needed to see the name, the Answer block could be used.

Néhány gyakori felhasználási mód a Válasz blokkra:

  • Információ tárolás (such as in projects that require a name to be inputted)
kérdezd meg: [Mi a neved?] és várj
[név v] legyen (válasz) 
  • Retrieving information (such as when the name must be retrieved)
kérdezd meg: [Mi a kedvenc színed?] és várj
mondd (együtt [Az én kedvenc színem is ] (együtt (válasz) [!])) 
  • When a setting has been imputed with the Ask () and Wait block, keeping the selecting setting somewhere
kérdezd meg: [Milyen szinten szeretnél játszani?] és várj
[szint v] legyen (válasz)
küldj üzenetet: (együtt [kezdő szint] (szint)) // This can actually be done in the Scratch editor. You can not, however, place reporters in "when I receive"
  • When quizzing
kérdezd meg: [Mennyi 30 + 9?] és várj
ha <(válasz) = [39]> akkor
mondd: [Helyes!]
[Pontszám v] változzon (1)
különben
mondd: [Helytelen]
[Pontszám v] változzon (-1)
end

Lásd még

Sablon:Érzékelő blokk

Cookies help us deliver our services. By using our services, you agree to our use of cookies.