{"id":873,"date":"2026-02-12T17:32:15","date_gmt":"2026-02-12T09:32:15","guid":{"rendered":"https:\/\/edu.circuspi.com\/?p=873"},"modified":"2026-03-09T15:22:22","modified_gmt":"2026-03-09T07:22:22","slug":"5-1-learning-to-use-prompts-splash-to-display-messages","status":"publish","type":"post","link":"https:\/\/edu.circuspi.com\/index.php\/gamebit-en\/5-1-learning-to-use-prompts-splash-to-display-messages\/","title":{"rendered":"5.1 Learning to Use &#8220;Prompts&#8221; (Splash) to Display Messages"},"content":{"rendered":"\n<p>Please prepare the Sprite you created. Of course, you can also select one from the Gallery.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/edu.circuspi.com\/wp-content\/uploads\/2026\/02\/\u82f105-1_01.png\" alt=\"\" class=\"wp-image-1110\"\/><\/figure>\n\n\n\n<p>The features related to <strong>&#8220;Prompts&#8221;<\/strong> are located within the <strong>&#8220;Game&#8221;<\/strong> category in the <strong>Block Toolbox<\/strong>. Click it to find the relevant blocks in the list that pops out on the right.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/edu.circuspi.com\/wp-content\/uploads\/2026\/02\/\u82f105-1_02.png\" alt=\"\" class=\"wp-image-1111\"\/><\/figure>\n\n\n\n<p>First, let&#8217;s select the <strong>&#8220;splash (<strong>&#8221; &#8220;<\/strong>) &#8220;<\/strong> block and place it at the very top inside the <strong>&#8220;on start&#8221;<\/strong> block.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/edu.circuspi.com\/wp-content\/uploads\/2026\/02\/\u82f105-1_03.png\" alt=\"\" class=\"wp-image-1112\"\/><\/figure>\n\n\n\n<p>We can type some messages into this block; both <strong>Chinese and English are supported<\/strong>. Here, we demonstrate by typing some introductory text for the character, as shown below:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/edu.circuspi.com\/wp-content\/uploads\/2026\/02\/\u82f105-1_04.png\" alt=\"\" class=\"wp-image-1113\"\/><\/figure>\n\n\n\n<p>In the <strong>Game Simulator<\/strong>, we can see that after the game starts, a <strong>&#8220;Prompt&#8221;<\/strong> pops up immediately, waiting for the player to press the <strong>&#8220;A button&#8221;<\/strong>. The message displayed is the text we just entered.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"864\" height=\"556\" src=\"https:\/\/edu.circuspi.com\/wp-content\/uploads\/2026\/02\/\u82f105-1_05.gif\" alt=\"\" class=\"wp-image-1114\"\/><\/figure>\n\n\n\n<p>Before the A button is pressed, the <strong>&#8220;Prompt&#8221;<\/strong> screen will remain. The subsequent code will only execute after the button is pressed.<\/p>\n\n\n\n<p>If the message you set is long, it will scroll to display the content. The display will pause briefly at the beginning, then scroll to the end of the message, repeating this cycle until you press the button, as shown below:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"874\" height=\"594\" src=\"https:\/\/edu.circuspi.com\/wp-content\/uploads\/2026\/02\/\u82f105-1_06.gif\" alt=\"\" class=\"wp-image-1116\"\/><\/figure>\n\n\n\n<p>Besides displaying messages, <strong>&#8220;Prompts&#8221;<\/strong> also come with three <strong>&#8220;Ask&#8221;<\/strong> functions. Let&#8217;s start with the first one: <strong>&#8220;ask (&#8221; &#8220;)&#8221;<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/edu.circuspi.com\/wp-content\/uploads\/2026\/02\/\u82f105-1_07.png\" alt=\"\" class=\"wp-image-1117\"\/><\/figure>\n\n\n\n<p>If you are a familiar <a href=\"https:\/\/makecode.microbit.org\/\">MakeCode<\/a> user, you shouldn&#8217;t be strangers to <strong>&#8220;blocks with pointy ends&#8221;<\/strong> or <strong>&#8220;blocks with round ends&#8221;<\/strong> These types of blocks usually need to be combined with other blocks to function.<\/p>\n\n\n\n<p><strong>Hexagonal blocks (Pointy ends)<\/strong>: Usually perform judgment functions and return two results: <strong>&#8220;True&#8221;<\/strong> or <strong>&#8220;False&#8221;<\/strong>.<\/p>\n\n\n\n<p>Please click <strong>&#8220;Logic&#8221;<\/strong> in the <strong>Block Toolbox<\/strong> and select the <strong>&#8220;if &lt;true&gt; then&#8230; else&#8230;&#8221;<\/strong> block.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1190\" height=\"686\" src=\"https:\/\/edu.circuspi.com\/wp-content\/uploads\/2026\/02\/\u82f105-1_08.png\" alt=\"\" class=\"wp-image-1118\"\/><\/figure>\n\n\n\n<p>Combine them and place them as the second item inside <strong>&#8220;on start&#8221;<\/strong>, as shown below:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1190\" height=\"749\" src=\"https:\/\/edu.circuspi.com\/wp-content\/uploads\/2026\/02\/\u82f105-1_09.png\" alt=\"\" class=\"wp-image-1119\"\/><\/figure>\n\n\n\n<p>Enter a message inside the <strong>&#8220;ask (&#8221; &#8220;)&#8221;<\/strong> block, such as asking whether to view the character we made.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1190\" height=\"798\" src=\"https:\/\/edu.circuspi.com\/wp-content\/uploads\/2026\/02\/\u82f105-1_10.png\" alt=\"\" class=\"wp-image-1120\"\/><\/figure>\n\n\n\n<p>When we use <strong>&#8220;ask&#8221;<\/strong>, a window will pop up asking you to choose <strong>&#8220;OK&#8221;<\/strong> or <strong>&#8220;CANCEL&#8221;<\/strong>.<\/p>\n\n\n\n<p>Choosing <strong>&#8220;OK&#8221;<\/strong> returns a <strong>&#8220;True&#8221;<\/strong> result.<\/p>\n\n\n\n<p>Choosing <strong>&#8220;CANCEL&#8221;<\/strong> returns a <strong>&#8220;False&#8221;<\/strong> result.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1190\" height=\"458\" src=\"https:\/\/edu.circuspi.com\/wp-content\/uploads\/2026\/02\/\u82f105-1_11.png\" alt=\"\" class=\"wp-image-1121\"\/><\/figure>\n\n\n\n<p>We can then fill in the corresponding follow-up messages in the appropriate positions, as shown below:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1190\" height=\"774\" src=\"https:\/\/edu.circuspi.com\/wp-content\/uploads\/2026\/02\/\u82f105-1_12.png\" alt=\"\" class=\"wp-image-1122\"\/><\/figure>\n\n\n\n<p>Once finished, test it in the Game Simulator.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"818\" height=\"584\" src=\"https:\/\/edu.circuspi.com\/wp-content\/uploads\/2026\/02\/\u82f105-1_13.gif\" alt=\"\" class=\"wp-image-1123\"\/><\/figure>\n\n\n\n<p>The other two &#8220;Ask&#8221; functions are similar, but they retrieve input content from the user. Let&#8217;s take <strong>&#8220;ask (&#8221; &#8220;) for string&#8221;<\/strong> as an example.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1190\" height=\"657\" src=\"https:\/\/edu.circuspi.com\/wp-content\/uploads\/2026\/02\/\u82f105-1_14.png\" alt=\"\" class=\"wp-image-1124\"\/><\/figure>\n\n\n\n<p>To facilitate the next steps, let&#8217;s first delete the <strong>&#8220;ask (&#8221; &#8220;)&#8221;<\/strong> block we just used.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1190\" height=\"686\" src=\"https:\/\/edu.circuspi.com\/wp-content\/uploads\/2026\/02\/\u82f105-1_15.png\" alt=\"\" class=\"wp-image-1125\"\/><\/figure>\n\n\n\n<p>First, click <strong>&#8220;Logic&#8221;<\/strong> in the <strong>Block Toolbox<\/strong> and select the block highlighted in the image below (Comparison Block). This block allows us to compare if two texts match.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1190\" height=\"694\" src=\"https:\/\/edu.circuspi.com\/wp-content\/uploads\/2026\/02\/\u82f105-1_16.png\" alt=\"\" class=\"wp-image-1126\"\/><\/figure>\n\n\n\n<p>Next, combine the <strong>&#8220;text comparison&#8221;<\/strong> block with the <strong>&#8220;ask (&#8221; &#8220;) for string&#8221;<\/strong> block, and place it inside the <strong>&#8220;if&#8230; then&#8230;&#8221;<\/strong> block, as shown below:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1190\" height=\"528\" src=\"https:\/\/edu.circuspi.com\/wp-content\/uploads\/2026\/02\/\u82f105-1_17.png\" alt=\"\" class=\"wp-image-1127\"\/><\/figure>\n\n\n\n<p>We can type our question inside the &#8220;ask&#8221; block and type the correct answer on the right side of the <strong>&#8220;equals sign&#8221;<\/strong>. Note that text input only supports English.<\/p>\n\n\n\n<p>If the input content matches the answer, the program will execute the prompt &#8220;<strong>No problem!<\/strong>&#8220;.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1190\" height=\"717\" src=\"https:\/\/edu.circuspi.com\/wp-content\/uploads\/2026\/02\/\u82f105-1_18.png\" alt=\"\" class=\"wp-image-1128\"\/><\/figure>\n\n\n\n<p>Once finished, test it in the Game Simulator. You can also try entering the wrong message to see the result.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"280\" height=\"360\" src=\"https:\/\/edu.circuspi.com\/wp-content\/uploads\/2026\/02\/\u82f105-1_19.gif\" alt=\"\" class=\"wp-image-1129\"\/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Please prepare the Sprite you created. Of course, you c [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":330,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21,23],"tags":[],"table_tags":[],"class_list":{"0":"post-873","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-gamebit-en","8":"category-freeinfo-en","9":"czr-hentry"},"_links":{"self":[{"href":"https:\/\/edu.circuspi.com\/index.php\/wp-json\/wp\/v2\/posts\/873","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/edu.circuspi.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/edu.circuspi.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/edu.circuspi.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/edu.circuspi.com\/index.php\/wp-json\/wp\/v2\/comments?post=873"}],"version-history":[{"count":2,"href":"https:\/\/edu.circuspi.com\/index.php\/wp-json\/wp\/v2\/posts\/873\/revisions"}],"predecessor-version":[{"id":1140,"href":"https:\/\/edu.circuspi.com\/index.php\/wp-json\/wp\/v2\/posts\/873\/revisions\/1140"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/edu.circuspi.com\/index.php\/wp-json\/wp\/v2\/media\/330"}],"wp:attachment":[{"href":"https:\/\/edu.circuspi.com\/index.php\/wp-json\/wp\/v2\/media?parent=873"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/edu.circuspi.com\/index.php\/wp-json\/wp\/v2\/categories?post=873"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/edu.circuspi.com\/index.php\/wp-json\/wp\/v2\/tags?post=873"},{"taxonomy":"table_tags","embeddable":true,"href":"https:\/\/edu.circuspi.com\/index.php\/wp-json\/wp\/v2\/table_tags?post=873"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}