Making Sprites Talk and Think

The following set of looks code blocks, shown in Figure 10.5, is applicable only to sprites and can used to display text in speech and thought bubbles, making a sprite look like it is talking or thinking.

Figure 10.5. Using these code blocks, you can display text in both speech and thought bubbles.


Figure 10.6 provides examples of how speech and thought bubbles look.

Figure 10.6. Speech and thought bubbles resemble callouts used to display captions in cartoons found in many popular newspaper comic strips.


The first two code blocks are used to display text in speech bubbles. The difference between these two code blocks is that the first code block displays its text for a specified number of seconds, and the second code block permanently displays its text (until the text is overridden by another speech or thought bubble). For example, the following script could be used to display the text Hello! for two seconds in a speech bubble.

Tip

Any text displayed using the second and fourth code blocks shown in Figure 10.5 do not automatically go away. However, you can clear out the text displayed in a speech or thought bubble by executing a speech or thought code block with no text typed in it.


Similarly, the following script demonstrates how to display a text message of Hmm... in a thought bubble.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.141.47.221