Navigation

    CreatiCode Scratch Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • CreatiCode

    3D Speech Bubbles

    3D Blocks
    1
    1
    389
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • info-creaticode
      CreatiCode last edited by admin

      Introduction

      You can use speech bubbles to attach some text to an object or avatar. This can be used for many different purposes, such as a chat message.

       
       

      The “Show Speech Bubble” Block

      You can use the following block under “3D Action” to attach a speech bubble to the currently selected sprite object.

      af37e6b4-ad52-4b82-bef9-5329b9843bb1-image.png

       
      Many input options are available for you to fully customize the speech bubble:

       
       

      Text

      The first input is the text you want to show. Similar to the 2D “say” block, if the input text is empty, then the existing speech bubble will be removed.

      Note that you can use emojis in the text input, such as “😅”.

       
       

      Offset in X/Y/Z

      You can control where to place the speech bubble relative to the origin point of the sprite object.

      For example, if you would like the bubble to appear directly above an avatar, then the offset x and offset y will be 0, and offset z will be a number greater than the height of the avatar. If the avatar’s height is 100, and offset z is 110, then there will be a gap of 10 units between the bubble and the avatar’s top.

      a1ad365c-78cd-4b17-b4c4-1408ba076f39-image.png

       
       

      Max Width

      The width of the speech bubble will be automatically adjusted based on the text content. However, if the text is too long, then it will be wrapped into multiple lines, and each line’s width limit is controlled by this input.

      For example, suppose the max width is 100, then whenever the text is longer than 100 units, it will be split into multiple lines:

      9c8a9a7f-d7b1-4a09-8549-950b1517a7f8-image.png

       
       

      Text Font/Size/Color and Background Color

      These 4 inputs control the look of the text and bubble. Note that if you would like to show some text without the bubble, you can simply set the background color to 100% transparent.

       
       

      Time Period (How many seconds)

      You can set the speech bubble to disappear after some number of seconds using this input. If this input is empty, then the bubble will be displayed forever, until you run this block again.

       
       

      Camera Facing

      If “yes”, then the bubble will always rotate to face the camera. This way it is easy to see the text written on the speech bubble. If you set this input to “no”, then the bubble will face the same direction as the sprite object, so you won’t be able to read it from behind:

      v1.gif

       
       

      ID

      The ID is used to attach more than one speech bubble to the sprite object.

      You can attach up to 4 speech bubbles to any object. By default, the ID is 1. If we run this block 2 times, both with the ID of “1”, then the second bubble will cause the first bubble to be removed.

      However, if the second time you specify the ID of “2”, then both speech bubbles will be displayed.

       
       
       

      Demo

      In this program, we use 3 speech bubbles for different purposes. The name of the avatar is shown in front of him. A second bubble is used to show “+1” for adding a point for the player. A third bubble is shown over his head for a chat message for 3 seconds.

      77430d41-fb0c-48b3-aeb5-6e6d38f3313e-image.png

       
      Here is the result:

      1 Reply Last reply Reply Quote 0
      • First post
        Last post