search
HomeSoftware TutorialComputer SoftwareTutorial on how to use Scratch query module to achieve dialogue effects using Scratch

Want to make Scratch characters have conversations, but don’t know how to do it? Don't worry, PHP editor Xinyi brings you a Scratch query module tutorial. It will teach you step by step how to use the query module to create dynamic dialogues and make your Scratch projects more lively and interesting. Come and find out!

1. The computer outputs the game rules and is ready to start the game!

Idea: The kitten character acts as the host and announces the rules of the game through the [Say xxx for a few seconds] module in the appearance.

Scratch询问模块怎么用 Scratch实现对话效果的教程

2. Add a variable [random number],

Idea: Design a range of numbers, and let the computer select random numbers in this range. After completing the following procedures, when After we click the green flag, we will find that random numbers between 1 and 10 begin to appear in the variable box in the upper left corner of the stage.

Scratch询问模块怎么用 Scratch实现对话效果的教程 Scratch询问模块怎么用 Scratch实现对话效果的教程 Scratch询问模块怎么用 Scratch实现对话效果的教程

3. Human-computer interaction, start the guessing number game

Idea: The computer asks [guess what the number is? 】Players can enter numbers to answer.

Scratch询问模块怎么用 Scratch实现对话效果的教程

4. Determine whether the guess result is correct

Idea:

answer>random number, then the output guess is too large and the game continues

Answer

Answer = random number, then the output guess is correct, congratulations.

Scratch询问模块怎么用 Scratch实现对话效果的教程 Scratch询问模块怎么用 Scratch实现对话效果的教程

5. The basic program has been completed. There is still a small step to make the game more interesting, which is to hide the random number variables. Otherwise, there will be Digital reminders directly expose the answers.

Scratch询问模块怎么用 Scratch实现对话效果的教程

6. Game time: Next, you can start the guessing number game.

The above is the detailed content of Tutorial on how to use Scratch query module to achieve dialogue effects using Scratch. For more information, please follow other related articles on the PHP Chinese website!

Statement
This article is reproduced at:zol. If there is any infringement, please contact admin@php.cn delete

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),